mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Apply FS#9195 (LCD disable for sansa c200), which puts the sansa c200 display controller in standby when the backlight is turned off and thereby improves runtime. I measured 40 minutes improvement over a runtime of about 14h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18198 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b0b72a84ff
commit
f2213c8fc2
2 changed files with 25 additions and 1 deletions
|
@ -48,7 +48,7 @@
|
||||||
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
|
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
|
||||||
|
|
||||||
/* define this if you have LCD enable function */
|
/* define this if you have LCD enable function */
|
||||||
/* TODO: #define HAVE_LCD_ENABLE */
|
#define HAVE_LCD_ENABLE
|
||||||
|
|
||||||
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
|
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
|
||||||
should be defined as well. */
|
should be defined as well. */
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
/* Display status */
|
/* Display status */
|
||||||
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
||||||
|
static bool is_lcd_enabled = true;
|
||||||
|
|
||||||
/* LCD command set for Samsung S6B33B2 */
|
/* LCD command set for Samsung S6B33B2 */
|
||||||
|
|
||||||
|
@ -189,6 +190,29 @@ void lcd_set_invert_display(bool yesno)
|
||||||
(void)yesno;
|
(void)yesno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcd_enable(bool yesno)
|
||||||
|
{
|
||||||
|
if (yesno == is_lcd_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (yesno)
|
||||||
|
{
|
||||||
|
lcd_send_command(R_STANDBY_OFF);
|
||||||
|
lcd_send_command(R_DISPLAY_ON);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lcd_send_command(R_STANDBY_ON);
|
||||||
|
}
|
||||||
|
is_lcd_enabled = yesno;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool lcd_enabled(void)
|
||||||
|
{
|
||||||
|
return is_lcd_enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* turn the display upside down (call lcd_update() afterwards) */
|
/* turn the display upside down (call lcd_update() afterwards) */
|
||||||
void lcd_set_flip(bool yesno)
|
void lcd_set_flip(bool yesno)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue