rg_display: Wait a bit longer before turning on the backlight
This commit is contained in:
parent
0ddee3e53c
commit
ca3940d88f
@ -250,10 +250,6 @@ static void lcd_init(void)
|
||||
ILI9341_CMD(0x11); // Exit Sleep
|
||||
rg_usleep(10 * 1000);// Wait 10ms after sleep out
|
||||
ILI9341_CMD(0x29); // Display on
|
||||
|
||||
rg_display_clear(C_BLACK);
|
||||
rg_usleep(10 * 1000);
|
||||
lcd_set_backlight(config.backlight);
|
||||
}
|
||||
|
||||
static void lcd_deinit(void)
|
||||
|
||||
@ -582,6 +582,7 @@ void rg_display_clear(uint16_t color_le)
|
||||
void rg_display_deinit(void)
|
||||
{
|
||||
rg_task_send(display_task_queue, &(rg_task_msg_t){.type = RG_TASK_MSG_STOP});
|
||||
// lcd_set_backlight(0);
|
||||
lcd_deinit();
|
||||
RG_LOGI("Display terminated.\n");
|
||||
}
|
||||
@ -609,6 +610,9 @@ void rg_display_init(void)
|
||||
display.screen.width -= display.screen.margins.left + display.screen.margins.right;
|
||||
display.screen.height -= display.screen.margins.top + display.screen.margins.bottom;
|
||||
lcd_init();
|
||||
rg_display_clear(C_BLACK);
|
||||
rg_task_delay(80); // Wait for the screen be cleared before turning on the backlight (40ms doesn't seem to be enough...)
|
||||
lcd_set_backlight(config.backlight);
|
||||
display_task_queue = rg_task_create("rg_display", &display_task, NULL, 4 * 1024, RG_TASK_PRIORITY_6, 1);
|
||||
if (config.border_file)
|
||||
load_border_file(config.border_file);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user