Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion platforms/stm32f469disco/bootloader/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
/// Alert text y offset from the last line of alert text
#define ALERT_ACTION_Y_OFF 50U

// Latency of LCD register write in milliseconds
#define LCD_REGISTER_LATENCY_MS 2U

/// GUI page identifier
typedef enum gui_page_t {
gui_page_progress = 0, ///< Progress page
Expand Down Expand Up @@ -129,6 +132,7 @@ static void lcd_layer_init(uint16_t LayerIndex, uint32_t FB_Address) {
BSP_LCD_SetBackColor(COLOR_BG);
BSP_LCD_Clear(COLOR_BG);
BSP_LCD_SetLayerVisible(LayerIndex, ENABLE);
HAL_Delay(LCD_REGISTER_LATENCY_MS);
}

/**
Expand All @@ -149,10 +153,11 @@ static void lcd_init_if_needed(void) {
BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_BACKGROUND);

// Turn the display on
HAL_Delay(100);
HAL_Delay(100U);
BSP_LCD_DisplayOn();
ctx.displayed_page = gui_page_none;
ctx.lcd_initialized = true;
HAL_Delay(LCD_REGISTER_LATENCY_MS);
}
}

Expand Down Expand Up @@ -414,6 +419,7 @@ bool gui_update_progress(const char* caption, const char* operation,
BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_BACKGROUND);
BSP_LCD_SetBackColor(COLOR_BG);
BSP_LCD_Clear(COLOR_BG);
HAL_Delay(LCD_REGISTER_LATENCY_MS);
ok = ok && draw_text(0, PAGE_CAPTION_Y, CENTER_MODE, PAGE_CAPTION_FONT,
COLOR_TEXT, "Firmware Upgrade",
text_render_uppercase, NULL);
Expand Down