From b3d6677f06bd1ff35f1e069615bd1e6916602366 Mon Sep 17 00:00:00 2001 From: lvhaiyu Date: Wed, 23 Oct 2024 21:20:25 +0800 Subject: [PATCH] feat(p4): Fix the lvgl_port DPI callback initialization issue --- 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 | 2 +- components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/esp_lvgl_port/CHANGELOG.md b/components/esp_lvgl_port/CHANGELOG.md index 26860eb4..ed90c901 100644 --- a/components/esp_lvgl_port/CHANGELOG.md +++ b/components/esp_lvgl_port/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.4.1 + +### Fixes +Fix the issue of the DPI callback function not being initialized. + ## 2.4.0 ### Features diff --git a/components/esp_lvgl_port/idf_component.yml b/components/esp_lvgl_port/idf_component.yml index 6d123258..bbc8ecea 100644 --- a/components/esp_lvgl_port/idf_component.yml +++ b/components/esp_lvgl_port/idf_component.yml @@ -1,4 +1,4 @@ -version: "2.4.0" +version: "2.4.1" 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 c4fe5cdb..d311f147 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 @@ -110,7 +110,7 @@ lv_display_t *lvgl_port_add_disp_dsi(const lvgl_port_display_cfg_t *disp_cfg, co disp_ctx->disp_type = LVGL_PORT_DISP_TYPE_DSI; #if (CONFIG_IDF_TARGET_ESP32P4 && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) - esp_lcd_dpi_panel_event_callbacks_t cbs; + esp_lcd_dpi_panel_event_callbacks_t cbs = {0}; if (dsi_cfg->flags.avoid_tearing) { cbs.on_refresh_done = lvgl_port_flush_dpi_vsync_ready_callback; } else { 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 10fc56dc..a5ea8034 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 @@ -123,7 +123,7 @@ lv_display_t *lvgl_port_add_disp_dsi(const lvgl_port_display_cfg_t *disp_cfg, co disp_ctx->disp_type = LVGL_PORT_DISP_TYPE_DSI; #if (CONFIG_IDF_TARGET_ESP32P4 && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) - esp_lcd_dpi_panel_event_callbacks_t cbs; + esp_lcd_dpi_panel_event_callbacks_t cbs = {0}; if (dsi_cfg->flags.avoid_tearing) { cbs.on_refresh_done = lvgl_port_flush_dpi_vsync_ready_callback; } else {