diff --git a/project/Core/Inc/lcd_api.h b/project/Core/Inc/lcd_api.h index 0dafb8a..dee9190 100644 --- a/project/Core/Inc/lcd_api.h +++ b/project/Core/Inc/lcd_api.h @@ -95,4 +95,13 @@ void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t co */ void lcd_draw_bmp(const void* p_src, uint32_t x_pos, uint32_t y_pos, uint32_t x_size, uint32_t y_size, uint32_t color_mode); +/** + * @brief Clear LCD screen + * Clears the whole LCD screen to the desired color + * + *@param[in] color Color to which the LCD should be cleared + */ + +void lcd_clear(uint32_t color); + #endif /* INC_LCD_API_H_ */ diff --git a/project/Core/Src/lcd_api.c b/project/Core/Src/lcd_api.c index 4eaa68b..9e3c264 100644 --- a/project/Core/Src/lcd_api.c +++ b/project/Core/Src/lcd_api.c @@ -95,3 +95,7 @@ void lcd_draw_bmp(const void* p_src, uint32_t x_pos, uint32_t y_pos, uint32_t x_ LOG_INFO(TAG, "DMA2D poll"); HAL_DMA2D_PollForTransfer(&hDma2dHandler2, 10); } + +void lcd_clear(uint32_t color){ + BSP_LCD_Clear(color); +}