diff options
| author | Rani Hod <raenye@gmail.com> | 2006-08-08 22:03:56 +0000 |
|---|---|---|
| committer | Rani Hod <raenye@gmail.com> | 2006-08-08 22:03:56 +0000 |
| commit | c9f59e6f75bcfa25a563fedd77bfa77b3617f133 (patch) | |
| tree | ceff51afb679acb2935ed18072384819abf4281e /apps/settings.c | |
| parent | f8866a3a9c3a12b72e87ae96445eca1b52ed23fb (diff) | |
| download | rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.zip rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.gz rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.bz2 rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.xz | |
Accepted FS #5772 by Michael Sevakis
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
Diffstat (limited to 'apps/settings.c')
| -rw-r--r-- | apps/settings.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/apps/settings.c b/apps/settings.c index 673b8fe..3c036d8 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -24,11 +24,11 @@ #include "config.h" #include "kernel.h" #include "thread.h" +#include "button.h" #include "settings.h" #include "disk.h" #include "panic.h" #include "debug.h" -#include "button.h" #include "usb.h" #include "backlight.h" #include "lcd.h" @@ -40,7 +40,6 @@ #include "ata.h" #include "fat.h" #include "power.h" -#include "backlight.h" #include "powermgmt.h" #include "status.h" #include "atoi.h" @@ -244,7 +243,7 @@ static const struct bit_entry rtc_bits[] = {6, S_O(contrast), DEFAULT_CONTRAST_SETTING, "contrast", NULL }, #endif #ifdef CONFIG_BACKLIGHT - {5, S_O(backlight_timeout), 5, "backlight timeout", backlight_times_conf }, + {5, S_O(backlight_timeout), 6, "backlight timeout", backlight_times_conf }, #ifdef CONFIG_CHARGING {5, S_O(backlight_timeout_plugged), 11, "backlight timeout plugged", backlight_times_conf }, @@ -296,7 +295,7 @@ static const struct bit_entry rtc_bits[] = {6, S_O(remote_contrast), 42, "remote contrast", NULL }, {1, S_O(remote_invert), false, "remote invert", off_on }, {1, S_O(remote_flip_display), false, "remote flip display", off_on }, - {5, S_O(remote_backlight_timeout), 5, "remote backlight timeout", + {5, S_O(remote_backlight_timeout), 6, "remote backlight timeout", backlight_times_conf }, #ifdef CONFIG_CHARGING {5, S_O(remote_backlight_timeout_plugged), 11, @@ -319,8 +318,7 @@ static const struct bit_entry rtc_bits[] = {1, S_O(remote_bl_filter_first_keypress), false, "backlight filters first remote keypress", off_on }, #endif - -#endif +#endif /* CONFIG_BACKLIGHT */ /* new stuff to be added here */ /* If values are just added to the end, no need to bump the version. */ @@ -574,6 +572,20 @@ static const struct bit_entry hd_bits[] = {1, S_O(warnon_erase_dynplaylist), false, "warn when erasing dynamic playlist", off_on }, +#ifdef CONFIG_BACKLIGHT +#ifdef HAS_BUTTON_HOLD + {2, S_O(backlight_on_button_hold), 0, "backlight on button hold", + "normal,off,on" }, +#endif + +#ifdef HAVE_LCD_SLEEP + {4, S_O(lcd_sleep_after_backlight_off), 3, + "lcd sleep after backlight off", + "always,never,5,10,15,20,30,45,60,90" }, +#endif +#endif /* CONFIG_BACKLIGHT */ + + /* If values are just added to the end, no need to bump the version. */ /* new stuff to be added at the end */ @@ -1183,7 +1195,13 @@ void settings_apply(void) #ifdef HAVE_REMOTE_LCD set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); #endif +#ifdef HAS_BUTTON_HOLD + backlight_set_on_button_hold(global_settings.backlight_on_button_hold); +#endif +#ifdef HAVE_LCD_SLEEP + lcd_set_sleep_after_backlight_off(global_settings.lcd_sleep_after_backlight_off); #endif +#endif /* CONFIG_BACKLIGHT */ } |