From c567fc9be20d12b9f6e246dffa99472b66677c28 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sat, 21 Feb 2009 11:10:50 +0000 Subject: 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 --- firmware/target/arm/ipod/backlight-nano_video.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/ipod/backlight-nano_video.c') 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) void _backlight_hw_enable(bool on) { +#ifdef HAVE_LCD_SLEEP + if (on) + /* If the fade-out is interrupted, enabled will be true, but + lcd_awake() needs to be called anyways because the LCD + may be sleeping. + */ + lcd_awake(); +#endif + if (on == enabled) return; - + if (on) { GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); -- cgit v1.2.3