forked from len0rd/rockbox
Got rid of backlight wink between bootloader and firmware start by removing redundant lcd reset
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10751 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
93bbd44ccc
commit
7a75aad26e
2 changed files with 18 additions and 4 deletions
|
|
@ -341,12 +341,16 @@ static void lcd_display_off(void)
|
|||
void lcd_init_device(void)
|
||||
{
|
||||
/* Reset settings */
|
||||
power_on = false;
|
||||
display_on = false;
|
||||
y_offset = 0;
|
||||
roll_offset = 0;
|
||||
disp_control_rev = 0x0004;
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
/* Initial boot requires setting up chip registers but a full reset is
|
||||
not needed again. */
|
||||
power_on = false;
|
||||
display_on = false;
|
||||
|
||||
/* LCD Reset */
|
||||
and_l(~0x00000010, &GPIO1_OUT);
|
||||
or_l(0x00000010, &GPIO1_ENABLE);
|
||||
|
|
@ -357,6 +361,11 @@ void lcd_init_device(void)
|
|||
sleep(HZ/100);
|
||||
|
||||
lcd_display_on();
|
||||
#else
|
||||
/* Power and display already ON */
|
||||
power_on = true;
|
||||
display_on = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void lcd_enable(bool on)
|
||||
|
|
|
|||
|
|
@ -172,9 +172,14 @@ void pcf50606_init(void)
|
|||
/* D305A datasheet says PWM clock frequency should be 400Hz - 2000Hz so
|
||||
* I changed it from 7kHz to 512Hz. The lower frequency looks the same.
|
||||
* GPO1 is also inverted so that display brightness increases with PWM
|
||||
* setting which also lets the X5 share the H300's
|
||||
* set_backlight_brightness code.
|
||||
* cycle.
|
||||
*/
|
||||
pcf50606_write(0x35, 0x11); /* Backlight PWM = 512Hz, 8/16, Active */
|
||||
#ifdef BOOTLOADER
|
||||
/* Backlight starts OFF in bootloader */
|
||||
pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=011 */
|
||||
#else
|
||||
/* Keep backlight on when changing to firmware */
|
||||
pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue