From 74a2a5ea517792f87ba8d22ff948d0dc609bc24b Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sun, 20 Jan 2019 10:42:24 +0800 Subject: [PATCH] Per datasheet to adjust delay --- src/target/devof12e/tw8816.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/target/devof12e/tw8816.c b/src/target/devof12e/tw8816.c index 25f2d241c3..30d7e75731 100644 --- a/src/target/devof12e/tw8816.c +++ b/src/target/devof12e/tw8816.c @@ -299,9 +299,9 @@ static void TW8816_Init_Ports() static void TW8816_Reset() { gpio_clear(GPIOE, GPIO7); - _msleep(250); + _msleep(10); gpio_set(GPIOE, GPIO7); - _msleep(100); + _msleep(10); } static void TW8816_ResetLoop() @@ -315,7 +315,7 @@ static void TW8816_ResetLoop() break; count++; if (count < 250) { - Delay(0x800); + usleep(100); } else { count = 0; TW8816_Reset(); @@ -329,7 +329,7 @@ static void TW8816_ReinitPixelClock() u8 reg2 = LCD_ReadReg(0xB2); LCD_WriteReg(0xB6, reg1 | 0x80); LCD_WriteReg(0xB2, reg2); - Delay(0x60000); + usleep(10); LCD_WriteReg(0xB6, reg1 & 0x7F); LCD_WriteReg(0xB2, reg2); }