1
0
Fork 0
forked from len0rd/rockbox

iPod Nano 2G LCD sleep: Powering down LDO2 also affects USB, so we can't do that to shut off the LCD. Leave it on for now, and use the lightweight approach for waking up the Leadis LCD.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28601 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2010-11-14 20:39:18 +00:00
parent ba64cf697e
commit 6574040b18
2 changed files with 665 additions and 858 deletions

View file

@ -27,6 +27,7 @@
#include "pmu-target.h"
#ifdef HAVE_LCD_SLEEP
bool lcd_active(void);
void lcd_awake(void);
void lcd_update(void);
#endif
@ -38,11 +39,13 @@ void _backlight_set_brightness(int brightness)
void _backlight_on(void)
{
if(pmu_read(0x29) == 1) return;
#ifdef HAVE_LCD_SLEEP
lcd_awake();
lcd_update();
sleep(HZ/10);
if (!lcd_active())
{
lcd_awake();
lcd_update();
sleep(HZ/8);
}
#endif
pmu_write(0x29, 1);
}

File diff suppressed because it is too large Load diff