diff --git a/components/esp_lvgl_port/examples/rgb_lcd/main/main.c b/components/esp_lvgl_port/examples/rgb_lcd/main/main.c index ad5f34841..cf445550b 100644 --- a/components/esp_lvgl_port/examples/rgb_lcd/main/main.c +++ b/components/esp_lvgl_port/examples/rgb_lcd/main/main.c @@ -237,9 +237,9 @@ static esp_err_t app_lvgl_init(void) const lvgl_port_display_rgb_cfg_t rgb_cfg = { .flags = { #if EXAMPLE_LCD_RGB_BOUNCE_BUFFER_MODE - .bb_mode = 1, + .bb_mode = true, #else - .bb_mode = 0, + .bb_mode = false, #endif } }; @@ -271,9 +271,6 @@ static void app_main_display(void) { lv_obj_t *scr = lv_scr_act(); - /* Task lock */ - lvgl_port_lock(0); - /* Your LVGL objects code here .... */ /* Create image */ @@ -299,9 +296,6 @@ static void app_main_display(void) lv_label_set_text_static(label, "Rotate screen"); lv_obj_align(btn, LV_ALIGN_BOTTOM_MID, 0, -30); lv_obj_add_event_cb(btn, _app_button_cb, LV_EVENT_CLICKED, NULL); - - /* Task unlock */ - lvgl_port_unlock(); } void app_main(void) @@ -316,6 +310,8 @@ void app_main(void) ESP_ERROR_CHECK(app_lvgl_init()); /* Show LVGL objects */ + lvgl_port_lock(0); //app_main_display(); lv_demo_music(); + lvgl_port_unlock(); } 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 0ce2b4082..d7237dcd9 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 @@ -365,7 +365,7 @@ static bool lvgl_port_flush_vsync_ready_callback(esp_lcd_panel_handle_t panel_io { BaseType_t need_yield = pdFALSE; - lv_display_t *disp_drv = (lv_display_t *)user_ctx; + lv_disp_drv_t *disp_drv = (lv_display_t *)user_ctx; assert(disp_drv != NULL); need_yield = lvgl_port_task_notify(ULONG_MAX);