From 0b9c1984ac0cf6dd7f2282588518c1516e0dd4a7 Mon Sep 17 00:00:00 2001 From: xoreo Date: Sun, 3 Dec 2023 14:51:47 +0100 Subject: [PATCH 1/2] Switch all position params in LCD_API to uint32_t --- project/Core/Inc/lcd_api.h | 2 +- project/Core/Src/lcd_api.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Core/Inc/lcd_api.h b/project/Core/Inc/lcd_api.h index cdc2f7d..6f342be 100644 --- a/project/Core/Inc/lcd_api.h +++ b/project/Core/Inc/lcd_api.h @@ -105,7 +105,7 @@ void lcd_task(void); * @param[in] bg_color Text background color * @param[in] font Font size, see defines above in file */ -void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font); +void lcd_display_text(const char* text, uint32_t x_pos, uint32_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font); /** * @brief Draw BMP image on screen diff --git a/project/Core/Src/lcd_api.c b/project/Core/Src/lcd_api.c index 6ea7cbb..f5957d7 100644 --- a/project/Core/Src/lcd_api.c +++ b/project/Core/Src/lcd_api.c @@ -84,7 +84,7 @@ void lcd_task(void) { } } -void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT* font) { +void lcd_display_text(const char* text, uint32_t x_pos, uint32_t y_pos, uint32_t color, uint32_t bg_color, sFONT* font) { BSP_LCD_SelectLayer(1); LOG_INFO(TAG, "Display text: %s @x=%d,y=%d", text, x_pos, y_pos); From a5bf40acf796c9de8a53e20495d14a2294370602 Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Sun, 3 Dec 2023 15:58:41 +0100 Subject: [PATCH 2/2] Update docs for lcd_display_text --- docs/lcd_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lcd_api.md b/docs/lcd_api.md index 28f9b8a..32d3be5 100644 --- a/docs/lcd_api.md +++ b/docs/lcd_api.md @@ -104,7 +104,7 @@ void main(void) { #### Drawing text on the screen ```c -void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font); +void lcd_display_text(const char* text, uint32_t x_pos, uint32_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font); ``` ```c