fix(drivers): generic MIPI add missing lv_display_flush_ready (#7693)
This commit is contained in:
@@ -118,6 +118,12 @@ Example
|
|||||||
static void my_lcd_send_color(lv_display_t *disp, const uint8_t *cmd, size_t cmd_size, uint8_t *param, size_t param_size)
|
static void my_lcd_send_color(lv_display_t *disp, const uint8_t *cmd, size_t cmd_size, uint8_t *param, size_t param_size)
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
|
|
||||||
|
/* This must be called to signal that the transfer has finished.
|
||||||
|
* It is typically called in a "DMA transfer complete" callback
|
||||||
|
* long after `my_lcd_send_color` has returned.
|
||||||
|
*/
|
||||||
|
lv_display_flush_ready(disp);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char ** argv)
|
int main(int argc, char ** argv)
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ static void send_color(lv_lcd_generic_mipi_driver_t * drv, uint8_t cmd, uint8_t
|
|||||||
{
|
{
|
||||||
uint8_t cmdbuf = cmd; /* MIPI uses 8 bit commands */
|
uint8_t cmdbuf = cmd; /* MIPI uses 8 bit commands */
|
||||||
drv->send_color(drv->disp, &cmdbuf, 1, param, param_size);
|
drv->send_color(drv->disp, &cmdbuf, 1, param, param_size);
|
||||||
|
/* note: LVGL waits for your callback to call `lv_display_flush_ready` to know when the transfer has finished. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -179,7 +179,8 @@ typedef struct {
|
|||||||
* @param ver_res vertical resolution
|
* @param ver_res vertical resolution
|
||||||
* @param flags default configuration settings (mirror, RGB ordering, etc.)
|
* @param flags default configuration settings (mirror, RGB ordering, etc.)
|
||||||
* @param send_cmd platform-dependent function to send a command to the LCD controller (usually uses polling transfer)
|
* @param send_cmd platform-dependent function to send a command to the LCD controller (usually uses polling transfer)
|
||||||
* @param send_color platform-dependent function to send pixel data to the LCD controller (usually uses DMA transfer: must implement a 'ready' callback)
|
* @param send_color platform-dependent function to send pixel data to the LCD controller (usually uses DMA transfer).
|
||||||
|
* `lv_display_flush_ready` must be called after the transfer has finished.
|
||||||
* @return pointer to the created display
|
* @return pointer to the created display
|
||||||
*/
|
*/
|
||||||
lv_display_t * lv_lcd_generic_mipi_create(uint32_t hor_res, uint32_t ver_res, lv_lcd_flag_t flags,
|
lv_display_t * lv_lcd_generic_mipi_create(uint32_t hor_res, uint32_t ver_res, lv_lcd_flag_t flags,
|
||||||
|
|||||||
Reference in New Issue
Block a user