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:
@@ -60,6 +60,9 @@ void GPIO_Init(void)
|
||||
// SGM_CTRL (P1.7), LCD 控制管脚 (P1.0, P1.1, P1.4, P1.5, P1.6) 置为推挽输出
|
||||
P1M1 &= ~((1 << 7) | (1 << 0) | (1 << 1) | (1 << 4) | (1 << 5) | (1 << 6));
|
||||
P1M0 |= ((1 << 7) | (1 << 0) | (1 << 1) | (1 << 4) | (1 << 5) | (1 << 6));
|
||||
SGM_CTRL = 1; // 背光从上电第一刻起就确定关闭 (LEDA=1),避免推挽模式生效前电平不确定造成瞬间闪烁
|
||||
|
||||
|
||||
|
||||
// SHUT (P3.5) 射频/外设开启使能脚置为推挽输出
|
||||
P3M1 &= ~(1 << 5);
|
||||
|
||||
Reference in New Issue
Block a user