summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/iriver
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
commit009cebeab263085d142c413386f1fc7760792b6d (patch)
treeb78e716cd627ad53bad8a51cad007b3a2a1fa421 /firmware/target/arm/iriver
parentbdc6e624bc7dd9c798a024a951b3da0dabf1ddc4 (diff)
downloadrockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.gz
rockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.bz2
rockbox-009cebeab263085d142c413386f1fc7760792b6d.zip
Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to 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
Diffstat (limited to 'firmware/target/arm/iriver')
-rw-r--r--firmware/target/arm/iriver/h10/backlight-h10.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/firmware/target/arm/iriver/h10/backlight-h10.c b/firmware/target/arm/iriver/h10/backlight-h10.c
index 8033aebf71..5d211d26bf 100644
--- a/firmware/target/arm/iriver/h10/backlight-h10.c
+++ b/firmware/target/arm/iriver/h10/backlight-h10.c
@@ -25,8 +25,10 @@
void _backlight_on(void)
{
#ifdef HAVE_LCD_SLEEP
- lcd_enable(true);
- _lcd_sleep_timer = 0;
+ backlight_lcd_sleep_countdown(false); /* stop counter */
+#endif
+#ifdef HAVE_LCD_ENABLE
+ lcd_enable(true); /* power on lcd + visible display */
#endif
GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x20);
}
@@ -34,15 +36,10 @@ void _backlight_on(void)
void _backlight_off(void)
{
GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x20);
+#ifdef HAVE_LCD_ENABLE
+ lcd_enable(false); /* power off visible display */
+#endif
#ifdef HAVE_LCD_SLEEP
- lcd_enable(false);
- /* Start LCD sleep countdown */
- if (_lcd_sleep_timeout < 0)
- {
- _lcd_sleep_timer = 0; /* Setting == Always */
- lcd_sleep();
- }
- else
- _lcd_sleep_timer = _lcd_sleep_timeout;
+ backlight_lcd_sleep_countdown(true); /* start countdown */
#endif
}