mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Don't enable the current sink for the Clip Zip backlight until its actually needed.
Patch by Mihail Zenkov who measured a modest increase in power consumption with the current sink enabled. Change-Id: Ib1c1639318de35d449ca51a9bd480005cb6a2ee0 Reviewed-on: http://gerrit.rockbox.org/989 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com> Tested: Michael Giacomelli <giac2000@hotmail.com>
This commit is contained in:
parent
02414bf286
commit
23dc0b0179
1 changed files with 4 additions and 5 deletions
|
|
@ -29,16 +29,14 @@
|
|||
|
||||
bool _backlight_init()
|
||||
{
|
||||
/* GPIO B1 controls backlight */
|
||||
GPIOB_DIR |= (1 << 1);
|
||||
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91);
|
||||
GPIOB_PIN(1) = (1 << 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void _backlight_on(void)
|
||||
{
|
||||
/* GPIO B1 controls backlight */
|
||||
GPIOB_DIR |= (1 << 1);
|
||||
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90);
|
||||
GPIOB_PIN(1) = (1 << 1);
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true);
|
||||
|
|
@ -50,6 +48,7 @@ void _backlight_off(void)
|
|||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(false);
|
||||
#endif
|
||||
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0);
|
||||
GPIOB_PIN(1) = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue