LCD_api
Change lcd_display_text text paramter from const char* to uint8_t* to remove a generated warning
This commit is contained in:
@@ -75,7 +75,7 @@ void lcd_init(bool bl_on);
|
|||||||
* @param[in] bg_color Background color for the text
|
* @param[in] bg_color Background color for the text
|
||||||
* @param[in] font Font size, see defines above in file
|
* @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
|
* @brief Draw BMP image on screen
|
||||||
|
|||||||
@@ -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);
|
uint16_t tot_length = x_pos + (strlen(text) * font->Width);
|
||||||
if ((x_pos % font->Width) != 0) {
|
if ((x_pos % font->Width) != 0) {
|
||||||
x_pos -= (x_pos % font->Width);
|
x_pos -= (x_pos % font->Width);
|
||||||
|
|||||||
Reference in New Issue
Block a user