From 9282f524db0ad8a6701d143dbdc389ee9c9b62f8 Mon Sep 17 00:00:00 2001 From: Sani7 Date: Sun, 12 Nov 2023 16:20:30 +0100 Subject: [PATCH] LCD_api Change lcd_display_text text paramter from const char* to uint8_t* to remove a generated warning --- 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 387904b..464bfdf 100644 --- a/project/Core/Inc/lcd_api.h +++ b/project/Core/Inc/lcd_api.h @@ -75,7 +75,7 @@ void lcd_init(bool bl_on); * @param[in] bg_color Background color for the text * @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(uint8_t* text, uint16_t x_pos, uint16_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 fa14340..60250c8 100644 --- a/project/Core/Src/lcd_api.c +++ b/project/Core/Src/lcd_api.c @@ -27,7 +27,7 @@ void lcd_init(bool bl_on) { } } -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(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font) { uint16_t tot_length = x_pos + (strlen(text) * font->Width); if ((x_pos % font->Width) != 0) { x_pos -= (x_pos % font->Width);