ST7789: Add template for update_cb
We might use this callback to be able to rotate the display at runtime using the displa controller configuration bytes
This commit is contained in:
parent
83c08f6a2a
commit
dfe54e8573
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue