Addhere to some missed style guidlines
This commit is contained in:
@@ -22,11 +22,11 @@ void lcd_init(bool bl_on) {
|
||||
if (bl_on) {
|
||||
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOI, GPIO_PIN_12, GPIO_PIN_SET);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOI, GPIO_PIN_12, GPIO_PIN_RESET);
|
||||
}
|
||||
}
|
||||
|
||||
void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font) {
|
||||
LOG_INFO(TAG, "Display text: %s @x=%d,y=%d", text, x_pos, y_pos);
|
||||
@@ -50,17 +50,16 @@ void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t co
|
||||
}
|
||||
x_pos = 0;
|
||||
y_pos += font->Height;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
BSP_LCD_DisplayChar(x_pos, y_pos, text[i]);
|
||||
x_pos += font->Width;
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
BSP_LCD_DisplayStringAt(x_pos, y_pos, text, LEFT_MODE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void lcd_draw_raw_img(const void* p_src, uint32_t x_pos, uint32_t y_pos, uint32_t x_size, uint32_t y_size, uint32_t color_mode) {
|
||||
|
||||
uint32_t address = hLtdcHandler.LayerCfg[1].FBStartAdress + (((BSP_LCD_GetXSize() * y_pos) + x_pos) * (4));
|
||||
|
||||
Reference in New Issue
Block a user