forked from len0rd/rockbox
hm60x: Fix white screen bug.
Lcd should be reseted after power is supplied. Change-Id: I2a47ffb7d9b20d9ef2ad90aee15f4ada2fdd7f2e
This commit is contained in:
parent
527b1885a1
commit
3fd11c370e
1 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,15 @@
|
||||||
|
|
||||||
static bool display_on = false;
|
static bool display_on = false;
|
||||||
|
|
||||||
|
static void reset_lcd(void)
|
||||||
|
{
|
||||||
|
GPIO_PCCON |= (1<<7);
|
||||||
|
GPIO_PCDR &= ~(1<<7);
|
||||||
|
udelay(10);
|
||||||
|
GPIO_PCDR |= (1<<7);
|
||||||
|
udelay(5000);
|
||||||
|
}
|
||||||
|
|
||||||
void lcd_v1_display_init(void)
|
void lcd_v1_display_init(void)
|
||||||
{
|
{
|
||||||
unsigned int x, y;
|
unsigned int x, y;
|
||||||
|
@ -286,6 +295,7 @@ static void lcd_v2_update_rect(int x, int y, int width, int height)
|
||||||
|
|
||||||
void lcd_display_init(void)
|
void lcd_display_init(void)
|
||||||
{
|
{
|
||||||
|
reset_lcd();
|
||||||
identify_lcd();
|
identify_lcd();
|
||||||
if (lcd_type == LCD_V1)
|
if (lcd_type == LCD_V1)
|
||||||
lcd_v1_display_init();
|
lcd_v1_display_init();
|
||||||
|
@ -323,6 +333,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
|
|
||||||
void lcd_display_init(void)
|
void lcd_display_init(void)
|
||||||
{
|
{
|
||||||
|
reset_lcd();
|
||||||
lcd_v1_display_init();
|
lcd_v1_display_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue