fix(boot): hold backlight off until first frame is drawn
SGM_CTRL was turned on at the very start of LCD_Init(), before the ST7789V register sequence and first frame ran, showing garbage/blank content briefly on every boot. GPIO_Init() now forces backlight off at power-on, LCD_Init() no longer touches it, and main() only turns it on right before entering the main loop (after HomeApp's first frame is drawn). Wakeup_Restore()'s existing on-then-reinit sequence is untouched since it sets the level itself before calling LCD_Init().
This commit is contained in:
@@ -85,8 +85,9 @@ void LCD_Init(void)
|
||||
P1M1 &= ~((1<<0) | (1<<1) | (1<<4) | (1<<5) | (1<<6) | (1<<7));
|
||||
P1M0 |= ((1<<0) | (1<<1) | (1<<4) | (1<<5) | (1<<6) | (1<<7));
|
||||
|
||||
// 设置各控制引脚初始默认电平
|
||||
SGM_CTRL = 0; // PMOS低电平点亮背光 (LEDA = 0)
|
||||
// 设置各控制引脚初始默认电平 (LEDA 背光电平不在这里设置——开机路径由 GPIO_Init() 提前
|
||||
// 关闭、main() 即将进入主循环前才点亮;休眠唤醒路径由 Wakeup_Restore() 在调用本函数前
|
||||
// 先行点亮;两条路径对背光的时序要求不同,LCD_Init() 本身不做任何背光电平的假设)
|
||||
LCD_CS = 1;
|
||||
LCD_SCL = 1;
|
||||
LCD_RST = 1;
|
||||
|
||||
Reference in New Issue
Block a user