summaryrefslogtreecommitdiffstats
path: root/firmware/export/backlight.h
AgeCommit message (Collapse)AuthorFilesLines
2019-02-08Fix red and remove duplicated function declarationSebastian Leonhardt1-4/+0
Change-Id: I5fed7fdad077eedfc1e36fbd9e1669f11b90288d
2019-02-07Fix lcd not waking up when backlight is always offSebastian Leonhardt1-0/+4
This patch is relevant for targets with a transflective display. If the backlight was set to "always off" (e.g. to use the lcd in a pure passive way), and the sleep timer ran off, the LCD would stay disabled and didn't wake up when a button is pressed. Change-Id: I0a157c7f421d9fc4c7d8ba903f2cf93f6cef51d0
2019-02-07YH820: implement LCD sleepSebastian Leonhardt1-0/+4
use sleep setting to keep transflective LCD active without backlight Change-Id: Iccd97e956d5e4a2a22abc90d15e9123782126ecb
2018-12-22Auto-Ranging Time Formatting For Menus (hh:mm:ss:mss)William Wilgus1-1/+1
Unifies time formatting in settings_list.c allows time format to display as HH:MM:SS.MSS or any consecutive combination thereof (hh:mm:ss, mm:ss, mm:ss.mss, ss.mss, hh, mm, ss ,mss) works in INT and TABLE settings with the addition of flag 'F_TIME_SETTING' Time is auto-ranged dependent on value Adds talk_time_intervals to allow time values to be spoken similar to display format: x Hours, x Minutes, x Seconds, x Milliseconds Table lookups merged or removed from recording, clip meter and lcd timeout -String_Choice replaced with TABLE_SETTING or INT_SETTING for these functions as well, cleaned-up cfg_vals that get saved to cfgfile RTL Languages ARE supported Negative values ARE supported Backlight on/off are now Always and Never to share formatter with LCD Timeout Added flag to allow ranged units to be locked to a minimum index Added flag to allow leading zero to be supressed from the largest unit merged talk_time_unit() and talk_time_intervals() optimized time_split() optimized format_time_auto() Backlight time-out list same as original Change-Id: I59027c62d3f2956bd16fdcc1a48b2ac32c084abd
2017-01-17Selective Backlight/Advanced Softlock - Selective actions based on contextWilliam Wilgus1-1/+2
Selective backlight allows the user to choose actions that will not enable the backlight when pressed. Advanced softlock allows user to choose actions that will not be blocked by screenlock on devices without a hold button. Both only occur in FM and WPS Contexts. Update: Back from the dead -Cleaned up code, removed unnecessary calls, re-arranged last filter action timeout conditional to work in case last_filtered_action_tick was never set -Added entries to the manual -Fixed back button on some menus not activating backlight -Made menus more intuitive, no actions selected now changes menu item to off. -Added talk fuctionality. -Added option to disable selective backlight while on external power. -Rewrote backlight and softlock handling code to fix issue with scrollwheels -Menu changed to have toggle(yes/no) and settings -Optimized selective actions lookup -Added option to disable notification of 'buttons locked' while softlocked -Removed uneeded code, consolidated action lookup to single function -Fixed incorrect name on selective softlock menu -Added option to disable touch on touchscreen devices -Fixed backlight on original screenlock without selective screenlock active -Added text selection in mask_select for when show_icons is off -Fixed voice in mask_select to speak if voice is defined instead of spelling -Added more lang defines (play skip seek) -Added option to disable unknown keys turning on backlight -Fixed Conditional argument In wrong place causing players without backlight to fail to build -Fixed Disable Unknown blocking detection of context change -Fixed canceling menu didn't update new settings -Added Autolock on backlight off -Removed backlight_on_force from backlight.c, Now sets ignore next to false and uses backlight_on -Cleaned up autolock code added strings to lang file -Fixed issue where rapid presses would bypass softlock -Removed old softlock code, Cleaned selective actions code -Changed menu to match existing RB menus -Fixed Backlight_on_Hold blocked by backlight_ignore_next -Fixed ignore_next for ipod -Fixed bug allowing context with softlock to bypass selective backlight -Changed mask_select to no longer prompt for changes to be saved -Changed menu names -Added ignore timeout to allow ipod scroll wheel to work properly and other players to still work properly, removed some previous code including ignore_event -Increased ignore timeout to prevent sd card accesses from interrupting action code and turning on backlight -Changed Unknown action to unmapped action in menu, changed handling code -Removed unneeded logic and variables for handling unfiltered actions -Reverted unmapped action code to previous functionality -Added manual entries (thanks JohnB) -Removed elusive unhandled unicode character from manual, changed formatting slightly Actions: Volume,Play,Seek,Skip Extras: Disable unmapped actions Disable selective backlight on external power Disable touch during softlock on touchscreen devices Disable softlock notifications (power button still notifies) Autolock on backlight off Method: Adds a function to ignore backlight on next call If selected action occurs backlight is forced on, Filter_first_keypress stays intact. Selective softlock allows selected actions through, bypasses the normal softlock routine. ToDo: DONE previous commit (#1) has attribution for folder_select.c which mask_select is based from. Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2015-01-12Get rid of stupid _backlight_* function namesMarcin Bukat1-2/+2
_remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2012-01-07move _remote_backlight_* to common headerRafaël Carré1-0/+2
remove unused REMOTE_INIT_LCD / REMOTE_DEINIT_LCD git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31607 a1c6a512-1295-4272-9138-f99709370657
2010-03-03FS#10756 - Free unused init codeThomas Martitz1-1/+1
Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
2009-04-26Remove the calls to backlight_lcd_sleep_countdown from target specific code ↵Thomas Martitz1-4/+1
and move it into backlight.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20793 a1c6a512-1295-4272-9138-f99709370657
2009-04-25Restructure backlight timeout management a bit by factoring out the ↵Thomas Martitz1-0/+1
get_current_timeout code. No functional change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20789 a1c6a512-1295-4272-9138-f99709370657
2009-04-25Fix red.Thomas Martitz1-0/+11
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20785 a1c6a512-1295-4272-9138-f99709370657
2009-04-25Rename _buttonlight_timeout and use a function call instead of extern'ing ↵Thomas Martitz1-1/+1
buttonlight_timeout to be more inline with backlight, and use a #define instead of a const variable for !HAVE_LCD_SLEEP_SETTING (no functional changes) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20784 a1c6a512-1295-4272-9138-f99709370657
2009-01-26Commit FS#9724, which reworks the preprocessor defines related to backlight ↵Thomas Martitz1-4/+2
fading to a CONFIG_BACKLIGHT_FADING style. The apps/ code will only see which setting is supposed to be used, specific backlight fading handling is kept in firmware, slightly reword the manual text about software fading too with regards to the Gigabeat S git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19860 a1c6a512-1295-4272-9138-f99709370657
2008-11-26Add hardware backlight fading on Gigabeat S with fade up and down options in ↵Michael Sevakis1-1/+2
LCD Settings. USE_BACKLIGHT_CUSTOM_FADING_BOOL is used to specify the setting type needed but leave the fading code itself implementation-defined. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19237 a1c6a512-1295-4272-9138-f99709370657
2008-11-26Fix reds. Also note my r19221 commit message had a typo - shoudld have been ↵Steve Bavin1-2/+1
e200/c200, not e100. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19224 a1c6a512-1295-4272-9138-f99709370657
2008-11-26Add software backlight fading for E100/H300/X5/D2, by Thomas Martitz and ↵Steve Bavin1-1/+7
others - see FS#6800 for credits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19221 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-05-14Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to ↵Michael Sevakis1-5/+3
backlight.c to handle lcd sleep timer. Make HAVE_LCD_SLEEP useable without a setting and use HAVE_LCD_SLEEP_SETTING when a setting is available in addition to HCD_HAVE_SLEEP. If a setting isn't used, the target must define the timeout to be used in the config. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17505 a1c6a512-1295-4272-9138-f99709370657
2008-05-10Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
2008-04-02Greyscale library: * Implement linearisation curve flipping for 1st/2nd Gen ↵Jens Arnold1-2/+2
iPods (LCD is inverted when backlight is on, so the curve is also inverted). This needs a slight extension of is_backlight_on() functionality in the core. * Thorough recalibration of all reachable greyscale targets, and #ifdef cleanup. * Reduce on-target gamma a bit, because the displayable contrast range of a monochrome/greyscale isn't that high. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16936 a1c6a512-1295-4272-9138-f99709370657
2007-11-26Allow (almost) arbitrary backlight fade in and fade out times (on targets ↵Jens Arnold1-2/+2
with software PWM fading), and comvert the associated settings to table settings. * Settings system: Unify a bunch of formatters and getlang helpers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15817 a1c6a512-1295-4272-9138-f99709370657
2007-11-25New way of handling integer settings with variable steps: table settings (FS ↵Jens Arnold1-6/+5
#8186, with fixes by me). This allows to get rid of those synchronised tables in firmware/ and apps/, making things more flexible and less error prone. First application: backlight timeouts. * Make some more things 'const'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15803 a1c6a512-1295-4272-9138-f99709370657
2007-11-12Hardware controlled backlight brightness for iPod Video and Nano, retaining ↵Jens Arnold1-0/+9
the software PWM fade in/ fade out. * Backlight handling cleanup, getting rid of one layer of 'lowlevelness'. * Use atomic GPIO bit manipulation for PP502x backlight handling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15599 a1c6a512-1295-4272-9138-f99709370657
2007-10-07Name all button light functions and variables consistently starting with ↵Jens Arnold1-3/+3
buttonlight_ . git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15016 a1c6a512-1295-4272-9138-f99709370657
2007-08-12Removed special X5 backlight handling, and replaced it with a generic system ↵Jens Arnold1-5/+0
that makes the backlight light up on shutdown and not time out unless it's completely disabled in the current player state. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14292 a1c6a512-1295-4272-9138-f99709370657
2007-05-08Add in buttonlight brightness setting for the Gigabeat, and setup the ↵Karl Kurbjun1-0/+4
framework for future players that have adjustable button light brightness settings. Also fixed a bug in the backlight code when the brightness was set to 0. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13356 a1c6a512-1295-4272-9138-f99709370657
2007-04-22e200: Make the wheel light timeout configurable (under settings > system) ↵Jonathan Gordon1-0/+6
(FS#7067) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13244 a1c6a512-1295-4272-9138-f99709370657
2007-04-12Moved archos backlight code to target tree. Changed old mutlivalue ↵Jens Arnold1-3/+3
CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
2007-02-18Fix CONFIG_BACKLIGHT warnings.Jens Arnold1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12393 a1c6a512-1295-4272-9138-f99709370657
2006-11-10Removed the settings #defines from backlight.h since they are now in the ↵Michael Sevakis1-12/+0
players' config files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11489 a1c6a512-1295-4272-9138-f99709370657
2006-09-10Added remote backlight on hold option to players with remote hold switch. ↵Michael Sevakis1-4/+19
Disabled IRQs while reading pcf50606 ADC. This seems to have stopped buttons becoming unresponsive when using remote. Maybe fixes other button glitches as well? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10911 a1c6a512-1295-4272-9138-f99709370657
2006-08-08Accepted FS #5772 by Michael SevakisRani Hod1-2/+14
1. X5 lcd sleep 2. #define HAVE_LCD_ENABLE 3. add "backlight (on hold switch)" setting, adapted from FS #5735 Note that the while(1) yield ==> asm("halt") part is NOT commited here, I prefer it would be discussed separately. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10489 a1c6a512-1295-4272-9138-f99709370657
2006-07-25Patch FS#5712 by Michael Sevakis - X5 Backlight brightness improvement/fixLinus Nielsen Feltzing1-2/+11
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10322 a1c6a512-1295-4272-9138-f99709370657
2006-04-01Patch #4934 by Ralf Herz: FixesHristo Kovachev1-1/+1
1) Backlight stays on when set to always off (at least on the iPods (signed/unsigned problem)) 2) Buttons not working when the backlight is set to always off and turned on the "first keypress enables backlight only" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9396 a1c6a512-1295-4272-9138-f99709370657
2006-03-25Patch #4913 by David Rothenberger with some changes by me: add only ↵Hristo Kovachev1-0/+1
backlight on first keypress to the lcd remotes, too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9253 a1c6a512-1295-4272-9138-f99709370657
2006-03-24New option: First keypress enables backlight only. Patch #2920 by Nicolas ↵Björn Stenberg1-0/+1
Pennequin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9228 a1c6a512-1295-4272-9138-f99709370657
2006-03-19Reworked backlight fading by GPIO based PWM to work for other targetsThom Johansen1-1/+1
than H1x0. iPod Nano and 5G backlight fading is enabled. To try for your device, just define HAVE_BACKLIGHT_PWM_FADING in the relevant config-xxxx.h file. NOTE: Will break your settings, so save a config file first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9121 a1c6a512-1295-4272-9138-f99709370657
2005-12-22Oops:) Make the brightness setting purely numericalHristo Kovachev1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8281 a1c6a512-1295-4272-9138-f99709370657
2005-12-22Patch No 1387627 by Peter D'Hoye: Backlight Brightness setting for H300Hristo Kovachev1-0/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8280 a1c6a512-1295-4272-9138-f99709370657
2005-11-23Replaced the booolean 'Backlight On When Plugged' setting with a complete ↵Jens Arnold1-4/+3
alternative 'Backlight When Plugged' timeout setting. * Yield during poweroff to make backlight_off() work. * Bumped config version, save your settings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8053 a1c6a512-1295-4272-9138-f99709370657
2005-11-21Backlight handling: * Added 'Caption Backlight' and 'Backlight On When ↵Jens Arnold1-5/+13
Charging' for the iriver remote LCD. * Enabled the backlight code for the simulator, and prepared backlight simulation. It's only a stub atm, writing messages to the console window. * Added tick task handling to the simulators for this to work. * Code cleanup in backlight.c, less dead code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8034 a1c6a512-1295-4272-9138-f99709370657
2005-11-14completed the CONFIG_BACKLIGHT transitionDaniel Stenberg1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7887 a1c6a512-1295-4272-9138-f99709370657
2005-07-26Moved implementation of user timer to the firmware layer, implemented it for ↵Jens Arnold1-3/+0
iriver, and made it shareable based on priorities. On iriver, the user timer is shared between the backlight fading and other use, so if a plugin registers the timer, the backlight will resort to simple on/off switching until the plugin releases the timer again. Sorted and bumped the plugin api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7242 a1c6a512-1295-4272-9138-f99709370657
2005-06-20Iriver: Backlight fading is now configurable. Added a function to stop the ↵Jens Arnold1-0/+7
backlight from using timer1, freeing it for usage in plugins. Grouped together some related settings functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6779 a1c6a512-1295-4272-9138-f99709370657
2005-05-30Remote LCD: added own backlight timeout stuffChristian Gmeiner1-0/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6533 a1c6a512-1295-4272-9138-f99709370657
2005-04-15iRiver: Independent backlight timers for the main and remote LCDLinus Nielsen Feltzing1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6303 a1c6a512-1295-4272-9138-f99709370657
2004-01-30inconsistent argument type for backlight_set_timeout() fixedJörg Hohensohn1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4287 a1c6a512-1295-4272-9138-f99709370657
2003-04-23Added caption backlight: Turns on backlight briefly at the start and end of ↵Björn Stenberg1-0/+1
each track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3585 a1c6a512-1295-4272-9138-f99709370657
2003-02-07Include File Cleanup And Move-Around Party 2003.Daniel Stenberg1-0/+31
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3213 a1c6a512-1295-4272-9138-f99709370657