diff --git a/lvgl_tft/st7789.c b/lvgl_tft/st7789.c index e81844f..c85107b 100644 --- a/lvgl_tft/st7789.c +++ b/lvgl_tft/st7789.c @@ -232,3 +232,8 @@ static void st7789_set_orientation(lv_disp_drv_t *drv, uint8_t orientation) st7789_send_data(drv, (void *) &data[orientation], 1); } +/* Display update callback, we could update the orientation in here */ +void st7789_update_cb(lv_disp_drv_t *drv) +{ + (void) drv; +} diff --git a/lvgl_tft/st7789.h b/lvgl_tft/st7789.h index 8c29765..e09f6a7 100644 --- a/lvgl_tft/st7789.h +++ b/lvgl_tft/st7789.h @@ -107,10 +107,37 @@ extern "C" #define ST7789_NVMSET 0xFC // NVM setting #define ST7789_PROMACT 0xFE // Program action +/** + * Initialize the ST7789 display controller with default configuration + * + * @param drv Pointer to lv_disp_drv_t being used + */ void st7789_init(lv_disp_drv_t *drv); + +/** + * Send buffer content to display + * + * @param drv Pointer to lv_disp_drv_t being used + * @param area Pointer to area to be sent + * @param color_map Pointer to color map + */ void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map); + +/** + * Control display backlight + * + * @param drv Pointer to lv_disp_drv_t being used + * @param backlight Backlight control + */ void st7789_enable_backlight(lv_disp_drv_t *drv, bool backlight); +/** + * Display updated callback + * + * @param drv Pointer to lv_disp_drv_t being used + */ +void st7789_update_cb(lv_disp_drv_t *drv) + #ifdef __cplusplus } /* extern "C" */ #endif