summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/backlight-nano_video.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2009-02-21 11:10:50 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2009-02-21 11:10:50 +0000
commitc567fc9be20d12b9f6e246dffa99472b66677c28 (patch)
tree20cb2bec2853c8c9b9d8c08368b1dd2efce40e8c /firmware/target/arm/ipod/backlight-nano_video.c
parent34e120928447d4afbaae1fac2477f1975a100e0c (diff)
downloadrockbox-c567fc9be20d12b9f6e246dffa99472b66677c28.tar.gz
rockbox-c567fc9be20d12b9f6e246dffa99472b66677c28.zip
Submit FS#9890 by Boris Gjenero. Enabling option for iPod Video to shut down LCD and BCM (controller) after backlight was switched off. With this option the user can decide whether to keep the transflective LCD switched on (e.g. during daylight use) or to switch it off (to save power). The power saving is extreme and increases the battery runtime by far (measured >30%).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20076 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/backlight-nano_video.c')
-rw-r--r--firmware/target/arm/ipod/backlight-nano_video.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/backlight-nano_video.c b/firmware/target/arm/ipod/backlight-nano_video.c
index 5eb5198b73..2f56f94225 100644
--- a/firmware/target/arm/ipod/backlight-nano_video.c
+++ b/firmware/target/arm/ipod/backlight-nano_video.c
@@ -73,9 +73,18 @@ void _backlight_set_brightness(int val)
73 73
74void _backlight_hw_enable(bool on) 74void _backlight_hw_enable(bool on)
75{ 75{
76#ifdef HAVE_LCD_SLEEP
77 if (on)
78 /* If the fade-out is interrupted, enabled will be true, but
79 lcd_awake() needs to be called anyways because the LCD
80 may be sleeping.
81 */
82 lcd_awake();
83#endif
84
76 if (on == enabled) 85 if (on == enabled)
77 return; 86 return;
78 87
79 if (on) 88 if (on)
80 { 89 {
81 GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); 90 GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08);