forked from len0rd/rockbox
Fix red. No bother with lcd power management calls in bootloader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17508 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
14698f5a20
commit
41b235dacf
6 changed files with 19 additions and 14 deletions
|
|
@ -47,6 +47,7 @@
|
|||
#define LCD_DEPTH 16 /* 65536 colours */
|
||||
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* define this if you have LCD enable function */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
||||
|
|
@ -54,6 +55,7 @@
|
|||
should be defined as well. */
|
||||
#define HAVE_LCD_SLEEP
|
||||
#define HAVE_LCD_SLEEP_SETTING
|
||||
#endif
|
||||
|
||||
/* define this if you can flip your LCD */
|
||||
#define HAVE_LCD_FLIP
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#define LCD_DEPTH 16 /* 65k colours */
|
||||
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Define this if your LCD can be enabled/disabled */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
/* We don't use a setting but a fixed delay after the backlight has
|
||||
* turned off */
|
||||
#define LCD_SLEEP_TIMEOUT (5*HZ)
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
#define CONFIG_KEYPAD GIGABEAT_PAD
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#define LCD_DEPTH 16 /* 65536 colours */
|
||||
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Define this if your LCD can be enabled/disabled */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
* We can currently put the lcd to sleep but it won't wake up properly */
|
||||
#define HAVE_LCD_SLEEP
|
||||
#define HAVE_LCD_SLEEP_SETTING
|
||||
#endif
|
||||
|
||||
/* define this if you can flip your LCD */
|
||||
#define HAVE_LCD_FLIP
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
|
||||
#define LCD_REMOTE_PIXELFORMAT VERTICAL_INTERLEAVED
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Define this if your LCD can be enabled/disabled */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
||||
|
|
@ -66,6 +67,7 @@
|
|||
should be defined as well. */
|
||||
#define HAVE_LCD_SLEEP
|
||||
#define HAVE_LCD_SLEEP_SETTING
|
||||
#endif
|
||||
|
||||
#define CONFIG_KEYPAD IAUDIO_X5M5_PAD
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ extern struct viewport* current_vp;
|
|||
extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
|
||||
int width, int height);
|
||||
|
||||
bool lcd_enabled()
|
||||
bool lcd_enabled(void)
|
||||
{
|
||||
return lcd_on;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,11 @@ bool _backlight_init(void)
|
|||
void _backlight_on(void)
|
||||
{
|
||||
int level;
|
||||
lcd_enable(true);
|
||||
#ifndef BOOTLOADER
|
||||
_lcd_sleep_timer = 0; /* LCD should be awake already */
|
||||
#ifdef HAVE_LCD_SLEEP
|
||||
backlight_lcd_sleep_countdown(false); /* stop counter */
|
||||
#endif
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true); /* power on lcd + visible display */
|
||||
#endif
|
||||
level = disable_irq_save();
|
||||
pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */
|
||||
|
|
@ -49,16 +51,11 @@ void _backlight_off(void)
|
|||
int level = disable_irq_save();
|
||||
pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */
|
||||
restore_irq(level);
|
||||
lcd_enable(false);
|
||||
#ifndef BOOTLOADER
|
||||
/* Start LCD sleep countdown */
|
||||
if (_lcd_sleep_timeout < 0)
|
||||
{
|
||||
_lcd_sleep_timer = 0; /* Setting == Always */
|
||||
lcd_sleep();
|
||||
}
|
||||
else
|
||||
_lcd_sleep_timer = _lcd_sleep_timeout;
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(false); /* power off visible display */
|
||||
#endif
|
||||
#ifdef HAVE_LCD_SLEEP
|
||||
backlight_lcd_sleep_countdown(true); /* start countdown */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue