1
0
Fork 0
forked from len0rd/rockbox

Sansa Connect: Power off LCD to save power

Prevent startup screen flash by properly using AVR LCM functions. Power
off LCD when not needed to improve battery runtime.

Change-Id: I76e3c5c0208774f189fbc6f7d7b3c9e22c062285
This commit is contained in:
Tomasz Moń 2021-07-05 15:15:30 +02:00
parent 89d3ca77b6
commit 2acf8db3e1
No known key found for this signature in database
GPG key ID: 92BA8820D4D517C8
5 changed files with 92 additions and 48 deletions

View file

@ -239,9 +239,7 @@ void main(void)
font_init();
button_init();
#ifdef HAVE_LCD_ENABLE
lcd_enable(true);
#endif
lcd_setfont(FONT_SYSFIXED);
reset_screen();
show_logo();
@ -288,10 +286,12 @@ void main(void)
if (ret > 0)
{
lcd_enable(false);
system_prepare_fw_start();
kernel_entry = (void*)0x01008000;
ret = kernel_entry();
lcd_enable(true);
printf("FAILED to boot OF");
}
}
@ -309,10 +309,12 @@ void main(void)
}
else
{
lcd_enable(false);
system_prepare_fw_start();
kernel_entry = (void*) loadbuffer;
ret = kernel_entry();
lcd_enable(true);
printf("FAILED!");
}