mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 12:25:03 +02:00
example: update example_lvgl_demo_ui prototype
This commit is contained in:
@@ -74,7 +74,7 @@ static const char *TAG = "example";
|
||||
// Supported alignment: 16, 32, 64. A higher alignment can enables higher burst transfer size, thus a higher i80 bus throughput.
|
||||
#define EXAMPLE_PSRAM_DATA_ALIGNMENT 64
|
||||
|
||||
extern void example_lvgl_demo_ui(lv_obj_t *scr);
|
||||
extern void example_lvgl_demo_ui(lv_disp_t *disp);
|
||||
|
||||
static bool example_notify_lvgl_flush_ready(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx)
|
||||
{
|
||||
@@ -268,8 +268,7 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(esp_timer_start_periodic(lvgl_tick_timer, EXAMPLE_LVGL_TICK_PERIOD_MS * 1000));
|
||||
|
||||
ESP_LOGI(TAG, "Display LVGL animation");
|
||||
lv_obj_t *scr = lv_disp_get_scr_act(disp);
|
||||
example_lvgl_demo_ui(scr);
|
||||
example_lvgl_demo_ui(disp);
|
||||
|
||||
while (1) {
|
||||
// raise the task priority of LVGL and/or reduce the handler period can improve the performance
|
||||
|
||||
@@ -74,8 +74,10 @@ static void anim_timer_cb(lv_timer_t *timer)
|
||||
}
|
||||
}
|
||||
|
||||
void example_lvgl_demo_ui(lv_obj_t *scr)
|
||||
void example_lvgl_demo_ui(lv_disp_t *disp)
|
||||
{
|
||||
lv_obj_t *scr = lv_disp_get_scr_act(disp);
|
||||
|
||||
// Create image
|
||||
img_logo = lv_img_create(scr);
|
||||
lv_img_set_src(img_logo, &esp_logo);
|
||||
|
||||
Reference in New Issue
Block a user