diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec97333..039a9cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # ChangeLog -## v0.2.2 - 2024-12-23 +## v0.2.2 - 2025-01-09 ### Bugfixes: * fix(lcd): use 'delete[]' instead of 'delete' for C array shared pointer @FranciscoMoya (#142) +* fix(lcd): load vendor config from bus +* fix(board): fix GT911 init error for waveshare boards * fix(Kconfig): fix build error on esp-idf and incorrect descriptions @Cathgao (#133) +* fix(examples): update PlatformIO lib & platform URLs ## v0.2.1 - 2024-11-14 diff --git a/examples/PlatformIO/platformio.ini b/examples/PlatformIO/platformio.ini index fd3b4b11..8d592e61 100644 --- a/examples/PlatformIO/platformio.ini +++ b/examples/PlatformIO/platformio.ini @@ -3,19 +3,19 @@ platform = espressif32 board = ESP-LCD framework = arduino platform_packages = - platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git - platformio/framework-arduinoespressif32-libs@https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1 + platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#3.0.3 + platformio/framework-arduinoespressif32-libs@https://github.com/esp-arduino-libs/arduino-esp32-sdk.git#high_perf/v3.0.3 upload_speed = 921600 monitor_speed = 115200 build_flags = - -DBOARD_HAS_PSRAM - -DLV_CONF_INCLUDE_SIMPLE - -DDISABLE_ALL_LIBRARY_WARNINGS - -DARDUINO_USB_CDC_ON_BOOT=1 - -DCORE_DEBUG_LEVEL=1 - -DLV_LVGL_H_INCLUDE_SIMPLE - -I src + -DBOARD_HAS_PSRAM + -DLV_CONF_INCLUDE_SIMPLE + -DDISABLE_ALL_LIBRARY_WARNINGS + -DARDUINO_USB_CDC_ON_BOOT=1 + -DCORE_DEBUG_LEVEL=1 + -DLV_LVGL_H_INCLUDE_SIMPLE + -I src lib_deps = - https://github.com/esp-arduino-libs/ESP32_Display_Panel.git - https://github.com/esp-arduino-libs/ESP32_IO_Expander.git - https://github.com/lvgl/lvgl.git#release/v8.3 + https://github.com/esp-arduino-libs/ESP32_Display_Panel.git + https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.1.0 + https://github.com/lvgl/lvgl.git#release/v8.3 diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h index c6708dcd..f71b04b0 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -205,7 +205,7 @@ #define ESP_PANEL_TOUCH_IO_RST (-1) #define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level /* IO num of INT pin, set to -1 if not use */ -#define ESP_PANEL_TOUCH_IO_INT (-1) +#define ESP_PANEL_TOUCH_IO_INT (4) #define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level #endif /* ESP_PANEL_USE_TOUCH */ @@ -242,7 +242,7 @@ * If set to 1, the driver will skip to initialize the corresponding host. Users need to initialize the host in advance. * It is useful if other devices use the same host. Please ensure that the host is initialized only once. */ -#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (1) // 0/1 +#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (0) // 0/1 /* IO expander parameters */ #define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 #define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) @@ -262,9 +262,37 @@ // #define ESP_PANEL_BEGIN_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_4_3 LCD start function"); \ + constexpr int LCD_BL = 2; \ + constexpr int LCD_RST = 3; \ + auto expander = static_cast(panel->getExpander()); \ + expander->enableAllIO_Output(); \ + expander->digitalWrite(LCD_BL, HIGH); \ + expander->digitalWrite(LCD_RST, HIGH); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + } + // #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_4_3 touch start function"); \ + gpio_num_t touch_int = static_cast(ESP_PANEL_TOUCH_IO_INT); \ + gpio_num_t touch_rst = static_cast(1); \ + auto expander = static_cast(panel->getExpander()); \ + gpio_set_direction(touch_int, GPIO_MODE_OUTPUT); \ + gpio_set_level(touch_int, 0); \ + vTaskDelay(pdMS_TO_TICKS(10)); \ + expander->digitalWrite(touch_rst, 0); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + expander->digitalWrite(touch_rst, 1); \ + vTaskDelay(pdMS_TO_TICKS(200)); \ + gpio_reset_pin(touch_int); \ + } + // #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel ) diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h index c6708dcd..d360fcfb 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h @@ -205,7 +205,7 @@ #define ESP_PANEL_TOUCH_IO_RST (-1) #define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level /* IO num of INT pin, set to -1 if not use */ -#define ESP_PANEL_TOUCH_IO_INT (-1) +#define ESP_PANEL_TOUCH_IO_INT (4) #define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level #endif /* ESP_PANEL_USE_TOUCH */ @@ -242,7 +242,7 @@ * If set to 1, the driver will skip to initialize the corresponding host. Users need to initialize the host in advance. * It is useful if other devices use the same host. Please ensure that the host is initialized only once. */ -#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (1) // 0/1 +#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (0) // 0/1 /* IO expander parameters */ #define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 #define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) @@ -262,12 +262,35 @@ // #define ESP_PANEL_BEGIN_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_4_3_B LCD start function"); \ + constexpr int LCD_DSIP = 2; \ + constexpr int LCD_RST = 3; \ + auto expander = static_cast(panel->getExpander()); \ + expander->enableAllIO_Output(); \ + expander->digitalWrite(LCD_DSIP, HIGH); \ + expander->digitalWrite(LCD_RST, HIGH); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + } + // #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_END_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_4_3_B touch start function"); \ + gpio_num_t touch_int = static_cast(ESP_PANEL_TOUCH_IO_INT); \ + gpio_num_t touch_rst = static_cast(1); \ + auto expander = static_cast(panel->getExpander()); \ + gpio_set_direction(touch_int, GPIO_MODE_OUTPUT); \ + gpio_set_level(touch_int, 0); \ + vTaskDelay(pdMS_TO_TICKS(10)); \ + expander->digitalWrite(touch_rst, 0); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + expander->digitalWrite(touch_rst, 1); \ + vTaskDelay(pdMS_TO_TICKS(200)); \ + gpio_reset_pin(touch_int); \ + } // *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_5.h b/src/board/waveshare/ESP32_S3_Touch_LCD_5.h index c6708dcd..b9d707b0 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_5.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_5.h @@ -205,7 +205,7 @@ #define ESP_PANEL_TOUCH_IO_RST (-1) #define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level /* IO num of INT pin, set to -1 if not use */ -#define ESP_PANEL_TOUCH_IO_INT (-1) +#define ESP_PANEL_TOUCH_IO_INT (4) #define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level #endif /* ESP_PANEL_USE_TOUCH */ @@ -242,7 +242,7 @@ * If set to 1, the driver will skip to initialize the corresponding host. Users need to initialize the host in advance. * It is useful if other devices use the same host. Please ensure that the host is initialized only once. */ -#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (1) // 0/1 +#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (0) // 0/1 /* IO expander parameters */ #define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 #define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) @@ -262,9 +262,37 @@ // #define ESP_PANEL_BEGIN_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_5 LCD start function"); \ + constexpr int LCD_DSIP = 2; \ + constexpr int LCD_RST = 3; \ + auto expander = static_cast(panel->getExpander()); \ + expander->enableAllIO_Output(); \ + expander->digitalWrite(LCD_DSIP, HIGH); \ + expander->digitalWrite(LCD_RST, HIGH); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + } + // #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_5 touch start function"); \ + gpio_num_t touch_int = static_cast(ESP_PANEL_TOUCH_IO_INT); \ + gpio_num_t touch_rst = static_cast(1); \ + auto expander = static_cast(panel->getExpander()); \ + gpio_set_direction(touch_int, GPIO_MODE_OUTPUT); \ + gpio_set_level(touch_int, 0); \ + vTaskDelay(pdMS_TO_TICKS(10)); \ + expander->digitalWrite(touch_rst, 0); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + expander->digitalWrite(touch_rst, 1); \ + vTaskDelay(pdMS_TO_TICKS(200)); \ + gpio_reset_pin(touch_int); \ + } + // #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel ) diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h b/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h index 63bd5cbe..5bde04db 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h @@ -205,7 +205,7 @@ #define ESP_PANEL_TOUCH_IO_RST (-1) #define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level /* IO num of INT pin, set to -1 if not use */ -#define ESP_PANEL_TOUCH_IO_INT (-1) +#define ESP_PANEL_TOUCH_IO_INT (4) #define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level #endif /* ESP_PANEL_USE_TOUCH */ @@ -242,7 +242,7 @@ * If set to 1, the driver will skip to initialize the corresponding host. Users need to initialize the host in advance. * It is useful if other devices use the same host. Please ensure that the host is initialized only once. */ -#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (1) // 0/1 +#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (0) // 0/1 /* IO expander parameters */ #define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 #define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) @@ -262,9 +262,37 @@ // #define ESP_PANEL_BEGIN_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_5_B LCD start function"); \ + constexpr int LCD_DSIP = 2; \ + constexpr int LCD_RST = 3; \ + auto expander = static_cast(panel->getExpander()); \ + expander->enableAllIO_Output(); \ + expander->digitalWrite(LCD_DSIP, HIGH); \ + expander->digitalWrite(LCD_RST, HIGH); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + } + // #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_5_B touch start function"); \ + gpio_num_t touch_int = static_cast(ESP_PANEL_TOUCH_IO_INT); \ + gpio_num_t touch_rst = static_cast(1); \ + auto expander = static_cast(panel->getExpander()); \ + gpio_set_direction(touch_int, GPIO_MODE_OUTPUT); \ + gpio_set_level(touch_int, 0); \ + vTaskDelay(pdMS_TO_TICKS(10)); \ + expander->digitalWrite(touch_rst, 0); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + expander->digitalWrite(touch_rst, 1); \ + vTaskDelay(pdMS_TO_TICKS(200)); \ + gpio_reset_pin(touch_int); \ + } + // #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel ) // #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel ) diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_7.h b/src/board/waveshare/ESP32_S3_Touch_LCD_7.h index c6708dcd..43b7c0a9 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_7.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_7.h @@ -205,7 +205,7 @@ #define ESP_PANEL_TOUCH_IO_RST (-1) #define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level /* IO num of INT pin, set to -1 if not use */ -#define ESP_PANEL_TOUCH_IO_INT (-1) +#define ESP_PANEL_TOUCH_IO_INT (4) #define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level #endif /* ESP_PANEL_USE_TOUCH */ @@ -242,7 +242,7 @@ * If set to 1, the driver will skip to initialize the corresponding host. Users need to initialize the host in advance. * It is useful if other devices use the same host. Please ensure that the host is initialized only once. */ -#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (1) // 0/1 +#define ESP_PANEL_EXPANDER_SKIP_INIT_HOST (0) // 0/1 /* IO expander parameters */ #define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 #define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) @@ -259,15 +259,36 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////// Please utilize the following macros to execute any additional code if required. ////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// #define ESP_PANEL_BEGIN_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_7 LCD start function"); \ + constexpr int LCD_DSIP = 2; \ + constexpr int LCD_RST = 3; \ + auto expander = static_cast(panel->getExpander()); \ + expander->enableAllIO_Output(); \ + expander->digitalWrite(LCD_DSIP, HIGH); \ + expander->digitalWrite(LCD_RST, HIGH); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + } + // #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel ) -// #define ESP_PANEL_BEGIN_END_FUNCTION( panel ) + +#define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel ) \ + { \ + ESP_LOGD(TAG, "Run ESP32_S3_Touch_LCD_7 touch start function"); \ + gpio_num_t touch_int = static_cast(ESP_PANEL_TOUCH_IO_INT); \ + gpio_num_t touch_rst = static_cast(1); \ + auto expander = static_cast(panel->getExpander()); \ + gpio_set_direction(touch_int, GPIO_MODE_OUTPUT); \ + gpio_set_level(touch_int, 0); \ + vTaskDelay(pdMS_TO_TICKS(10)); \ + expander->digitalWrite(touch_rst, 0); \ + vTaskDelay(pdMS_TO_TICKS(100)); \ + expander->digitalWrite(touch_rst, 1); \ + vTaskDelay(pdMS_TO_TICKS(200)); \ + gpio_reset_pin(touch_int); \ + } + // *INDENT-OFF* diff --git a/src/lcd/EK9716B.cpp b/src/lcd/EK9716B.cpp index 727c7852..49214ffe 100644 --- a/src/lcd/EK9716B.cpp +++ b/src/lcd/EK9716B.cpp @@ -64,7 +64,7 @@ bool ESP_PanelLcd_EK9716B::init(void) ESP_PANEL_CHECK_ERR_RET(gpio_config(&gpio_conf), false, "`Config RST gpio failed"); } - /* Load RGB configurations from bus to vendor configurations */ + /* Load configurations from bus to vendor configurations */ ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); /* Create panel handle */ diff --git a/src/lcd/GC9503.cpp b/src/lcd/GC9503.cpp index 8c96b8fe..9b6aa83c 100644 --- a/src/lcd/GC9503.cpp +++ b/src/lcd/GC9503.cpp @@ -42,7 +42,7 @@ bool ESP_PanelLcd_GC9503::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); - /* Load RGB configurations from bus to vendor configurations */ + /* Load configurations from bus to vendor configurations */ ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); /* Create panel handle */ diff --git a/src/lcd/GC9A01.cpp b/src/lcd/GC9A01.cpp index 775e46ea..63da8ce4 100644 --- a/src/lcd/GC9A01.cpp +++ b/src/lcd/GC9A01.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_GC9A01::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_gc9a01(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/GC9B71.cpp b/src/lcd/GC9B71.cpp index 61d5bab5..a4f4af0b 100644 --- a/src/lcd/GC9B71.cpp +++ b/src/lcd/GC9B71.cpp @@ -43,6 +43,9 @@ bool ESP_PanelLcd_GC9B71::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_gc9b71(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/ILI9341.cpp b/src/lcd/ILI9341.cpp index 6a0294ef..ac4c5722 100644 --- a/src/lcd/ILI9341.cpp +++ b/src/lcd/ILI9341.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_ILI9341::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_ili9341(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/NV3022B.cpp b/src/lcd/NV3022B.cpp index 54a95202..5d1571a1 100644 --- a/src/lcd/NV3022B.cpp +++ b/src/lcd/NV3022B.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_NV3022B::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_nv3022b(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/SH8601.cpp b/src/lcd/SH8601.cpp index 2c2f31c3..44574660 100644 --- a/src/lcd/SH8601.cpp +++ b/src/lcd/SH8601.cpp @@ -43,6 +43,9 @@ bool ESP_PanelLcd_SH8601::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_sh8601(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/SPD2010.cpp b/src/lcd/SPD2010.cpp index 133d3ddb..88cbf5b9 100644 --- a/src/lcd/SPD2010.cpp +++ b/src/lcd/SPD2010.cpp @@ -41,6 +41,9 @@ bool ESP_PanelLcd_SPD2010::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_spd2010(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/ST7262.cpp b/src/lcd/ST7262.cpp index 766a32d0..964b12e3 100644 --- a/src/lcd/ST7262.cpp +++ b/src/lcd/ST7262.cpp @@ -64,7 +64,7 @@ bool ESP_PanelLcd_ST7262::init(void) ESP_PANEL_CHECK_ERR_RET(gpio_config(&gpio_conf), false, "`Config RST gpio failed"); } - /* Load RGB configurations from bus to vendor configurations */ + /* Load configurations from bus to vendor configurations */ ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); /* Create panel handle */ diff --git a/src/lcd/ST7701.cpp b/src/lcd/ST7701.cpp index a75d4adc..d9a32c87 100644 --- a/src/lcd/ST7701.cpp +++ b/src/lcd/ST7701.cpp @@ -42,7 +42,7 @@ bool ESP_PanelLcd_ST7701::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); - /* Load RGB configurations from bus to vendor configurations */ + /* Load configurations from bus to vendor configurations */ ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); /* Create panel handle */ diff --git a/src/lcd/ST7789.cpp b/src/lcd/ST7789.cpp index fd4980e1..341c28e7 100644 --- a/src/lcd/ST7789.cpp +++ b/src/lcd/ST7789.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_ST7789::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_st7789(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/ST77916.cpp b/src/lcd/ST77916.cpp index 7cfd2936..c80cb040 100644 --- a/src/lcd/ST77916.cpp +++ b/src/lcd/ST77916.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_ST77916::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_st77916(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/ST77922.cpp b/src/lcd/ST77922.cpp index a99a1140..fb8df47c 100644 --- a/src/lcd/ST77922.cpp +++ b/src/lcd/ST77922.cpp @@ -41,6 +41,9 @@ bool ESP_PanelLcd_ST77922::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_st77922(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/src/lcd/ST7796.cpp b/src/lcd/ST7796.cpp index 67805379..e4103eea 100644 --- a/src/lcd/ST7796.cpp +++ b/src/lcd/ST7796.cpp @@ -39,6 +39,9 @@ bool ESP_PanelLcd_ST7796::init(void) { ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + /* Load configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + ESP_PANEL_CHECK_ERR_RET(esp_lcd_new_panel_st7796(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed"); return true; diff --git a/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5_B b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5_b similarity index 100% rename from test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5_B rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5_b