From 84c86f743cde6edd86ba3db365b7fa1aa14dab66 Mon Sep 17 00:00:00 2001 From: Vilem Zavodny Date: Tue, 11 Jun 2024 15:32:43 +0200 Subject: [PATCH] fix(esp_lvgl_port): Fixed missing callback in IDF4.4.3 and lower --- components/esp_lvgl_port/CHANGELOG.md | 5 +++++ components/esp_lvgl_port/idf_component.yml | 2 +- components/esp_lvgl_port/src/lvgl8/esp_lvgl_port_disp.c | 3 +++ components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/esp_lvgl_port/CHANGELOG.md b/components/esp_lvgl_port/CHANGELOG.md index f46f3cc3..0c3f6938 100644 --- a/components/esp_lvgl_port/CHANGELOG.md +++ b/components/esp_lvgl_port/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.2.2 + +### Fixes +- Fixed missing callback in IDF4.4.3 and lower for LVGL port + ## 2.2.1 ### Fixes diff --git a/components/esp_lvgl_port/idf_component.yml b/components/esp_lvgl_port/idf_component.yml index 5b81a88f..960b4241 100644 --- a/components/esp_lvgl_port/idf_component.yml +++ b/components/esp_lvgl_port/idf_component.yml @@ -1,4 +1,4 @@ -version: "2.2.1" +version: "2.2.2" description: ESP LVGL port url: https://github.com/espressif/esp-bsp/tree/master/components/esp_lvgl_port dependencies: diff --git a/components/esp_lvgl_port/src/lvgl8/esp_lvgl_port_disp.c b/components/esp_lvgl_port/src/lvgl8/esp_lvgl_port_disp.c index ae8f786b..46db46a9 100644 --- a/components/esp_lvgl_port/src/lvgl8/esp_lvgl_port_disp.c +++ b/components/esp_lvgl_port/src/lvgl8/esp_lvgl_port_disp.c @@ -82,11 +82,14 @@ lv_disp_t *lvgl_port_add_disp(const lvgl_port_display_cfg_t *disp_cfg) disp_ctx->disp_type = LVGL_PORT_DISP_TYPE_OTHER; assert(disp_ctx->io_handle != NULL); + +#if LVGL_PORT_HANDLE_FLUSH_READY const esp_lcd_panel_io_callbacks_t cbs = { .on_color_trans_done = lvgl_port_flush_io_ready_callback, }; /* Register done callback */ esp_lcd_panel_io_register_event_callbacks(disp_ctx->io_handle, &cbs, &disp_ctx->disp_drv); +#endif } return disp; diff --git a/components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c b/components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c index 45459109..0eb6b2b3 100644 --- a/components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c +++ b/components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c @@ -86,11 +86,14 @@ lv_display_t *lvgl_port_add_disp(const lvgl_port_display_cfg_t *disp_cfg) disp_ctx->disp_type = LVGL_PORT_DISP_TYPE_OTHER; assert(disp_cfg->io_handle != NULL); + +#if LVGL_PORT_HANDLE_FLUSH_READY const esp_lcd_panel_io_callbacks_t cbs = { .on_color_trans_done = lvgl_port_flush_io_ready_callback, }; /* Register done callback */ esp_lcd_panel_io_register_event_callbacks(disp_ctx->io_handle, &cbs, disp); +#endif /* Apply rotation from initial display configuration */ lvgl_port_disp_rotation_update(disp_ctx);