Description
Use two simultaneous displays on the same mcu that show different lvgl screens.
Utilitzo una pantalla amb 8080 8 bits i l’altre fa servir SPI
What MCU/Processor/Board and compiler are you using?
ESP32-S3-DevKit
ESP-IDF v5.4.0
What LVGL version are you using?
8.4.11
What do you want to achieve?
I want to be able to use two simultaneous displays on the same mcu that show different lvgl screens.
What have you tried so far?
I’ve tried making two different UIs with squareLine and sending each one to a different display.
I’ve also tried making a single UI and sending one screen to one display and the other screen to the other display.
The two options I’ve tried compile fine, and everything initializes correctly but the screen stays white and does nothing.
If I just initialize one display it works fine.
Code to reproduce
void ui_init(lv_disp_t * dispp)
{
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
false, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
ui_Screen1_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr(ui_Screen1);
}
void ui2_init(lv_disp_t * dispp)
{
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
false, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
ui_Screen2_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr(ui_Screen2);
}
/* main */
void app_main(void)
{
lv_disp_t * disp_spi = start_spi_display();
lv_disp_t * disp = Start_Display();
if(lvgl_lock(-1))
{
ui_init(disp);
}
lvgl_unlock();
if(lvgl_spi_lock(-1))
{
ui2_init(disp_spi);
}
lvgl_spi_unlock();
}