From 3de4d2a312b3fa842c4e8229db251fa9a01a29b4 Mon Sep 17 00:00:00 2001 From: Y1hsiaochunnn Date: Mon, 11 Nov 2024 10:24:24 +0800 Subject: [PATCH 1/6] feat(lcd): add LCD controller JD9365 @Y1hsiaochunnn (#123) --- src/ESP_Panel_Library.h | 1 + src/lcd/JD9365.cpp | 60 ++++ src/lcd/JD9365.h | 59 ++++ src/lcd/base/esp_lcd_jd9365.c | 616 ++++++++++++++++++++++++++++++++++ src/lcd/base/esp_lcd_jd9365.h | 96 ++++++ 5 files changed, 832 insertions(+) create mode 100644 src/lcd/JD9365.cpp create mode 100644 src/lcd/JD9365.h create mode 100644 src/lcd/base/esp_lcd_jd9365.c create mode 100644 src/lcd/base/esp_lcd_jd9365.h diff --git a/src/ESP_Panel_Library.h b/src/ESP_Panel_Library.h index 870a0620..bb63e6fd 100644 --- a/src/ESP_Panel_Library.h +++ b/src/ESP_Panel_Library.h @@ -26,6 +26,7 @@ /* LCD */ #include "lcd/ESP_PanelLcd.h" #include "lcd/EK79007.h" +#include "lcd/JD9365.h" #include "lcd/EK9716B.h" #include "lcd/GC9503.h" #include "lcd/GC9A01.h" diff --git a/src/lcd/JD9365.cpp b/src/lcd/JD9365.cpp new file mode 100644 index 00000000..51ee8a21 --- /dev/null +++ b/src/lcd/JD9365.cpp @@ -0,0 +1,60 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "soc/soc_caps.h" + +#if SOC_MIPI_DSI_SUPPORTED +#include "ESP_PanelLog.h" +#include "JD9365.h" + +static const char *TAG = "JD9365_CPP"; + +ESP_PanelLcd_JD9365::ESP_PanelLcd_JD9365(ESP_PanelBus *bus, uint8_t color_bits, int rst_io): + ESP_PanelLcd(bus, color_bits, rst_io) +{ + disabled_functions.set_gap = 1; + disabled_functions.swap_xy = 1; +} + +ESP_PanelLcd_JD9365::ESP_PanelLcd_JD9365(ESP_PanelBus *bus, const esp_lcd_panel_dev_config_t &panel_config): + ESP_PanelLcd(bus, panel_config) +{ + disabled_functions.set_gap = 1; + disabled_functions.swap_xy = 1; +} + +ESP_PanelLcd_JD9365::~ESP_PanelLcd_JD9365() +{ + ESP_PANEL_ENABLE_TAG_DEBUG_LOG(); + + if (handle == NULL) { + goto end; + } + + if (!del()) { + ESP_LOGE(TAG, "Delete device failed"); + } + +end: + ESP_LOGD(TAG, "Destroyed"); +} + +bool ESP_PanelLcd_JD9365::init(void) +{ + ESP_PANEL_CHECK_NULL_RET(bus, false, "Invalid bus"); + + /* Load MIPI-DSI configurations from bus to vendor configurations */ + ESP_PANEL_CHECK_FALSE_RET(loadVendorConfigFromBus(), false, "Load vendor config from bus failed"); + + /* Create panel handle */ + ESP_PANEL_CHECK_ERR_RET( + esp_lcd_new_panel_jd9365(bus->getPanelIO_Handle(), &panel_config, &handle), false, "Create panel failed" + ); + + return true; +} + +#endif diff --git a/src/lcd/JD9365.h b/src/lcd/JD9365.h new file mode 100644 index 00000000..6294e511 --- /dev/null +++ b/src/lcd/JD9365.h @@ -0,0 +1,59 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include "soc/soc_caps.h" + +#if SOC_MIPI_DSI_SUPPORTED +#include "ESP_PanelLcd.h" +#include "base/esp_lcd_vendor_types.h" +#include "base/esp_lcd_jd9365.h" + +/** + * @brief JD9365 LCD device object class + * + * @note This class is a derived class of `ESP_PanelLcd`, user can use it directly + */ +class ESP_PanelLcd_JD9365: public ESP_PanelLcd { +public: + /** + * @brief Construct a new LCD device in a simple way, the `init()` function should be called after this function + * + * @note This function uses some default values to config the LCD device, please use `config*()` functions to + * change them + * @note Vendor specific initialization can be different between manufacturers, should consult the LCD supplier + * for initialization sequence code, and use `configVendorCommands()` to configure + * + * @param bus Pointer of panel bus + * @param color_bits Bits per pixel (16/18/24) + * @param rst_io Reset pin, set to -1 if no use + */ + ESP_PanelLcd_JD9365(ESP_PanelBus *bus, uint8_t color_bits, int rst_io = -1); + + /** + * @brief Construct a new LCD in a complex way, the `init()` function should be called after this function + * + * @param bus Pointer of panel bus + * @param panel_config LCD device configuration + */ + ESP_PanelLcd_JD9365(ESP_PanelBus *bus, const esp_lcd_panel_dev_config_t &panel_config); + + /** + * @brief Destroy the LCD device + * + */ + ~ESP_PanelLcd_JD9365() override; + + /** + * @brief Initialize the LCD device, the `begin()` function should be called after this function + * + * @note This function typically calls `esp_lcd_new_panel_*()` to create the LCD panel handle + * + * @return true if success, otherwise false + */ + bool init(void) override; +}; +#endif diff --git a/src/lcd/base/esp_lcd_jd9365.c b/src/lcd/base/esp_lcd_jd9365.c new file mode 100644 index 00000000..4efb96b4 --- /dev/null +++ b/src/lcd/base/esp_lcd_jd9365.c @@ -0,0 +1,616 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "soc/soc_caps.h" + +#if SOC_MIPI_DSI_SUPPORTED +#include "esp_check.h" +#include "esp_log.h" +#include "esp_lcd_panel_commands.h" +#include "esp_lcd_panel_interface.h" +#include "esp_lcd_panel_io.h" +#include "esp_lcd_mipi_dsi.h" +#include "esp_lcd_panel_vendor.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "driver/gpio.h" +#include "esp_lcd_jd9365.h" + +#define JD9365_CMD_PAGE (0xE0) +#define JD9365_PAGE_USER (0x00) + +#define JD9365_CMD_DSI_INT0 (0x80) +#define JD9365_DSI_1_LANE (0x00) +#define JD9365_DSI_2_LANE (0x01) +#define JD9365_DSI_3_LANE (0x10) +#define JD9365_DSI_4_LANE (0x11) + +#define JD9365_CMD_GS_BIT (1 << 0) +#define JD9365_CMD_SS_BIT (1 << 1) + +typedef struct +{ + esp_lcd_panel_io_handle_t io; + int reset_gpio_num; + uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register + uint8_t colmod_val; // save surrent value of LCD_CMD_COLMOD register + const esp_lcd_panel_vendor_init_cmd_t *init_cmds; + uint16_t init_cmds_size; + uint8_t lane_num; + struct + { + unsigned int reset_level : 1; + } flags; + // To save the original functions of MIPI DPI panel + esp_err_t (*del)(esp_lcd_panel_t *panel); + esp_err_t (*init)(esp_lcd_panel_t *panel); +} jd9365_panel_t; + +static const char *TAG = "jd9365"; + +static esp_err_t panel_jd9365_del(esp_lcd_panel_t *panel); +static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel); +static esp_err_t panel_jd9365_reset(esp_lcd_panel_t *panel); +static esp_err_t panel_jd9365_invert_color(esp_lcd_panel_t *panel, bool invert_color_data); +static esp_err_t panel_jd9365_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y); +static esp_err_t panel_jd9365_swap_xy(esp_lcd_panel_t *panel, bool swap_axes); +static esp_err_t panel_jd9365_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap); +static esp_err_t panel_jd9365_disp_on_off(esp_lcd_panel_t *panel, bool on_off); + +esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, + esp_lcd_panel_handle_t *ret_panel) +{ + ESP_LOGI(TAG, "version: %d.%d.%d", ESP_LCD_JD9365_VER_MAJOR, ESP_LCD_JD9365_VER_MINOR, + ESP_LCD_JD9365_VER_PATCH); + ESP_RETURN_ON_FALSE(io && panel_dev_config && ret_panel, ESP_ERR_INVALID_ARG, TAG, "invalid arguments"); + jd9365_vendor_config_t *vendor_config = (jd9365_vendor_config_t *)panel_dev_config->vendor_config; + ESP_RETURN_ON_FALSE(vendor_config && vendor_config->mipi_config.dpi_config && vendor_config->mipi_config.dsi_bus, ESP_ERR_INVALID_ARG, TAG, + "invalid vendor config"); + + esp_err_t ret = ESP_OK; + jd9365_panel_t *jd9365 = (jd9365_panel_t *)calloc(1, sizeof(jd9365_panel_t)); + ESP_RETURN_ON_FALSE(jd9365, ESP_ERR_NO_MEM, TAG, "no mem for jd9365 panel"); + + if (panel_dev_config->reset_gpio_num >= 0) + { + gpio_config_t io_conf = { + .mode = GPIO_MODE_OUTPUT, + .pin_bit_mask = 1ULL << panel_dev_config->reset_gpio_num, + }; + ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed"); + } + + switch (panel_dev_config->color_space) + { + case LCD_RGB_ELEMENT_ORDER_RGB: + jd9365->madctl_val = 0; + break; + case LCD_RGB_ELEMENT_ORDER_BGR: + jd9365->madctl_val |= LCD_CMD_BGR_BIT; + break; + default: + ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space"); + break; + } + + switch (panel_dev_config->bits_per_pixel) + { + case 16: // RGB565 + jd9365->colmod_val = 0x55; + break; + case 18: // RGB666 + jd9365->colmod_val = 0x66; + break; + case 24: // RGB888 + jd9365->colmod_val = 0x77; + break; + default: + ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported pixel width"); + break; + } + + uint8_t ID[3]; + ESP_GOTO_ON_ERROR(esp_lcd_panel_io_rx_param(io, 0x04, ID, 3), err, TAG, "read ID failed"); + ESP_LOGI(TAG, "LCD ID: %02X %02X %02X", ID[0], ID[1], ID[2]); + + jd9365->io = io; + jd9365->init_cmds = vendor_config->init_cmds; + jd9365->init_cmds_size = vendor_config->init_cmds_size; + jd9365->lane_num = vendor_config->mipi_config.lane_num; + jd9365->reset_gpio_num = panel_dev_config->reset_gpio_num; + jd9365->flags.reset_level = panel_dev_config->flags.reset_active_high; + + // Create MIPI DPI panel + esp_lcd_panel_handle_t panel_handle = NULL; + ESP_GOTO_ON_ERROR(esp_lcd_new_panel_dpi(vendor_config->mipi_config.dsi_bus, vendor_config->mipi_config.dpi_config, &panel_handle), err, TAG, + "create MIPI DPI panel failed"); + ESP_LOGD(TAG, "new MIPI DPI panel @%p", panel_handle); + + // Save the original functions of MIPI DPI panel + jd9365->del = panel_handle->del; + jd9365->init = panel_handle->init; + // Overwrite the functions of MIPI DPI panel + panel_handle->del = panel_jd9365_del; + panel_handle->init = panel_jd9365_init; + panel_handle->reset = panel_jd9365_reset; + panel_handle->mirror = panel_jd9365_mirror; + panel_handle->swap_xy = panel_jd9365_swap_xy; + panel_handle->set_gap = panel_jd9365_set_gap; + panel_handle->invert_color = panel_jd9365_invert_color; + panel_handle->disp_on_off = panel_jd9365_disp_on_off; + panel_handle->user_data = jd9365; + *ret_panel = panel_handle; + ESP_LOGD(TAG, "new jd9365 panel @%p", jd9365); + + return ESP_OK; + +err: + if (jd9365) + { + if (panel_dev_config->reset_gpio_num >= 0) + { + gpio_reset_pin(panel_dev_config->reset_gpio_num); + } + free(jd9365); + } + return ret; +} + +static const esp_lcd_panel_vendor_init_cmd_t vendor_specific_init_default[] = { + // {cmd, { data }, data_size, delay_ms} + // {0xE0, (uint8_t[]){0x00}, 1, 0}, + {0xE0, (uint8_t[]){0x00}, 1, 0}, + {0xE1, (uint8_t[]){0x93}, 1, 0}, + {0xE2, (uint8_t[]){0x65}, 1, 0}, + {0xE3, (uint8_t[]){0xF8}, 1, 0}, + {0x80, (uint8_t[]){0x01}, 1, 0}, + + {0xE0, (uint8_t[]){0x01}, 1, 0}, + {0x00, (uint8_t[]){0x00}, 1, 0}, + {0x01, (uint8_t[]){0x38}, 1, 0}, + {0x03, (uint8_t[]){0x10}, 1, 0}, + {0x04, (uint8_t[]){0x38}, 1, 0}, + + {0x0C, (uint8_t[]){0x74}, 1, 0}, + + {0x17, (uint8_t[]){0x00}, 1, 0}, + {0x18, (uint8_t[]){0xAF}, 1, 0}, + {0x19, (uint8_t[]){0x00}, 1, 0}, + {0x1A, (uint8_t[]){0x00}, 1, 0}, + {0x1B, (uint8_t[]){0xAF}, 1, 0}, + {0x1C, (uint8_t[]){0x00}, 1, 0}, + + {0x35, (uint8_t[]){0x26}, 1, 0}, + + {0x37, (uint8_t[]){0x09}, 1, 0}, + + {0x38, (uint8_t[]){0x04}, 1, 0}, + {0x39, (uint8_t[]){0x00}, 1, 0}, + {0x3A, (uint8_t[]){0x01}, 1, 0}, + {0x3C, (uint8_t[]){0x78}, 1, 0}, + {0x3D, (uint8_t[]){0xFF}, 1, 0}, + {0x3E, (uint8_t[]){0xFF}, 1, 0}, + {0x3F, (uint8_t[]){0x7F}, 1, 0}, + + {0x40, (uint8_t[]){0x06}, 1, 0}, + {0x41, (uint8_t[]){0xA0}, 1, 0}, + {0x42, (uint8_t[]){0x81}, 1, 0}, + {0x43, (uint8_t[]){0x1E}, 1, 0}, + {0x44, (uint8_t[]){0x0D}, 1, 0}, + {0x45, (uint8_t[]){0x28}, 1, 0}, + //{0x4A, (uint8_t[]){0x35}, 1, 0},//bist + + {0x55, (uint8_t[]){0x02}, 1, 0}, + {0x57, (uint8_t[]){0x69}, 1, 0}, + {0x59, (uint8_t[]){0x0A}, 1, 0}, + {0x5A, (uint8_t[]){0x2A}, 1, 0}, + {0x5B, (uint8_t[]){0x17}, 1, 0}, + + {0x5D, (uint8_t[]){0x7F}, 1, 0}, + {0x5E, (uint8_t[]){0x6A}, 1, 0}, + {0x5F, (uint8_t[]){0x5B}, 1, 0}, + {0x60, (uint8_t[]){0x4F}, 1, 0}, + {0x61, (uint8_t[]){0x4A}, 1, 0}, + {0x62, (uint8_t[]){0x3D}, 1, 0}, + {0x63, (uint8_t[]){0x41}, 1, 0}, + {0x64, (uint8_t[]){0x2A}, 1, 0}, + {0x65, (uint8_t[]){0x44}, 1, 0}, + {0x66, (uint8_t[]){0x43}, 1, 0}, + {0x67, (uint8_t[]){0x44}, 1, 0}, + {0x68, (uint8_t[]){0x62}, 1, 0}, + {0x69, (uint8_t[]){0x52}, 1, 0}, + {0x6A, (uint8_t[]){0x59}, 1, 0}, + {0x6B, (uint8_t[]){0x4C}, 1, 0}, + {0x6C, (uint8_t[]){0x48}, 1, 0}, + {0x6D, (uint8_t[]){0x3A}, 1, 0}, + {0x6E, (uint8_t[]){0x26}, 1, 0}, + {0x6F, (uint8_t[]){0x00}, 1, 0}, + {0x70, (uint8_t[]){0x7F}, 1, 0}, + {0x71, (uint8_t[]){0x6A}, 1, 0}, + {0x72, (uint8_t[]){0x5B}, 1, 0}, + {0x73, (uint8_t[]){0x4F}, 1, 0}, + {0x74, (uint8_t[]){0x4A}, 1, 0}, + {0x75, (uint8_t[]){0x3D}, 1, 0}, + {0x76, (uint8_t[]){0x41}, 1, 0}, + {0x77, (uint8_t[]){0x2A}, 1, 0}, + {0x78, (uint8_t[]){0x44}, 1, 0}, + {0x79, (uint8_t[]){0x43}, 1, 0}, + {0x7A, (uint8_t[]){0x44}, 1, 0}, + {0x7B, (uint8_t[]){0x62}, 1, 0}, + {0x7C, (uint8_t[]){0x52}, 1, 0}, + {0x7D, (uint8_t[]){0x59}, 1, 0}, + {0x7E, (uint8_t[]){0x4C}, 1, 0}, + {0x7F, (uint8_t[]){0x48}, 1, 0}, + {0x80, (uint8_t[]){0x3A}, 1, 0}, + {0x81, (uint8_t[]){0x26}, 1, 0}, + {0x82, (uint8_t[]){0x00}, 1, 0}, + + {0xE0, (uint8_t[]){0x02}, 1, 0}, + {0x00, (uint8_t[]){0x42}, 1, 0}, + {0x01, (uint8_t[]){0x42}, 1, 0}, + {0x02, (uint8_t[]){0x40}, 1, 0}, + {0x03, (uint8_t[]){0x40}, 1, 0}, + {0x04, (uint8_t[]){0x5E}, 1, 0}, + {0x05, (uint8_t[]){0x5E}, 1, 0}, + {0x06, (uint8_t[]){0x5F}, 1, 0}, + {0x07, (uint8_t[]){0x5F}, 1, 0}, + {0x08, (uint8_t[]){0x5F}, 1, 0}, + {0x09, (uint8_t[]){0x57}, 1, 0}, + {0x0A, (uint8_t[]){0x57}, 1, 0}, + {0x0B, (uint8_t[]){0x77}, 1, 0}, + {0x0C, (uint8_t[]){0x77}, 1, 0}, + {0x0D, (uint8_t[]){0x47}, 1, 0}, + {0x0E, (uint8_t[]){0x47}, 1, 0}, + {0x0F, (uint8_t[]){0x45}, 1, 0}, + {0x10, (uint8_t[]){0x45}, 1, 0}, + {0x11, (uint8_t[]){0x4B}, 1, 0}, + {0x12, (uint8_t[]){0x4B}, 1, 0}, + {0x13, (uint8_t[]){0x49}, 1, 0}, + {0x14, (uint8_t[]){0x49}, 1, 0}, + {0x15, (uint8_t[]){0x5F}, 1, 0}, + + {0x16, (uint8_t[]){0x41}, 1, 0}, + {0x17, (uint8_t[]){0x41}, 1, 0}, + {0x18, (uint8_t[]){0x40}, 1, 0}, + {0x19, (uint8_t[]){0x40}, 1, 0}, + {0x1A, (uint8_t[]){0x5E}, 1, 0}, + {0x1B, (uint8_t[]){0x5E}, 1, 0}, + {0x1C, (uint8_t[]){0x5F}, 1, 0}, + {0x1D, (uint8_t[]){0x5F}, 1, 0}, + {0x1E, (uint8_t[]){0x5F}, 1, 0}, + {0x1F, (uint8_t[]){0x57}, 1, 0}, + {0x20, (uint8_t[]){0x57}, 1, 0}, + {0x21, (uint8_t[]){0x77}, 1, 0}, + {0x22, (uint8_t[]){0x77}, 1, 0}, + {0x23, (uint8_t[]){0x46}, 1, 0}, + {0x24, (uint8_t[]){0x46}, 1, 0}, + {0x25, (uint8_t[]){0x44}, 1, 0}, + {0x26, (uint8_t[]){0x44}, 1, 0}, + {0x27, (uint8_t[]){0x4A}, 1, 0}, + {0x28, (uint8_t[]){0x4A}, 1, 0}, + {0x29, (uint8_t[]){0x48}, 1, 0}, + {0x2A, (uint8_t[]){0x48}, 1, 0}, + {0x2B, (uint8_t[]){0x5F}, 1, 0}, + + {0x2C, (uint8_t[]){0x01}, 1, 0}, + {0x2D, (uint8_t[]){0x01}, 1, 0}, + {0x2E, (uint8_t[]){0x00}, 1, 0}, + {0x2F, (uint8_t[]){0x00}, 1, 0}, + {0x30, (uint8_t[]){0x1F}, 1, 0}, + {0x31, (uint8_t[]){0x1F}, 1, 0}, + {0x32, (uint8_t[]){0x1E}, 1, 0}, + {0x33, (uint8_t[]){0x1E}, 1, 0}, + {0x34, (uint8_t[]){0x1F}, 1, 0}, + {0x35, (uint8_t[]){0x17}, 1, 0}, + {0x36, (uint8_t[]){0x17}, 1, 0}, + {0x37, (uint8_t[]){0x37}, 1, 0}, + {0x38, (uint8_t[]){0x37}, 1, 0}, + {0x39, (uint8_t[]){0x08}, 1, 0}, + {0x3A, (uint8_t[]){0x08}, 1, 0}, + {0x3B, (uint8_t[]){0x0A}, 1, 0}, + {0x3C, (uint8_t[]){0x0A}, 1, 0}, + {0x3D, (uint8_t[]){0x04}, 1, 0}, + {0x3E, (uint8_t[]){0x04}, 1, 0}, + {0x3F, (uint8_t[]){0x06}, 1, 0}, + {0x40, (uint8_t[]){0x06}, 1, 0}, + {0x41, (uint8_t[]){0x1F}, 1, 0}, + + {0x42, (uint8_t[]){0x02}, 1, 0}, + {0x43, (uint8_t[]){0x02}, 1, 0}, + {0x44, (uint8_t[]){0x00}, 1, 0}, + {0x45, (uint8_t[]){0x00}, 1, 0}, + {0x46, (uint8_t[]){0x1F}, 1, 0}, + {0x47, (uint8_t[]){0x1F}, 1, 0}, + {0x48, (uint8_t[]){0x1E}, 1, 0}, + {0x49, (uint8_t[]){0x1E}, 1, 0}, + {0x4A, (uint8_t[]){0x1F}, 1, 0}, + {0x4B, (uint8_t[]){0x17}, 1, 0}, + {0x4C, (uint8_t[]){0x17}, 1, 0}, + {0x4D, (uint8_t[]){0x37}, 1, 0}, + {0x4E, (uint8_t[]){0x37}, 1, 0}, + {0x4F, (uint8_t[]){0x09}, 1, 0}, + {0x50, (uint8_t[]){0x09}, 1, 0}, + {0x51, (uint8_t[]){0x0B}, 1, 0}, + {0x52, (uint8_t[]){0x0B}, 1, 0}, + {0x53, (uint8_t[]){0x05}, 1, 0}, + {0x54, (uint8_t[]){0x05}, 1, 0}, + {0x55, (uint8_t[]){0x07}, 1, 0}, + {0x56, (uint8_t[]){0x07}, 1, 0}, + {0x57, (uint8_t[]){0x1F}, 1, 0}, + + {0x58, (uint8_t[]){0x40}, 1, 0}, + {0x5B, (uint8_t[]){0x30}, 1, 0}, + {0x5C, (uint8_t[]){0x00}, 1, 0}, + {0x5D, (uint8_t[]){0x34}, 1, 0}, + {0x5E, (uint8_t[]){0x05}, 1, 0}, + {0x5F, (uint8_t[]){0x02}, 1, 0}, + {0x63, (uint8_t[]){0x00}, 1, 0}, + {0x64, (uint8_t[]){0x6A}, 1, 0}, + {0x67, (uint8_t[]){0x73}, 1, 0}, + {0x68, (uint8_t[]){0x07}, 1, 0}, + {0x69, (uint8_t[]){0x08}, 1, 0}, + {0x6A, (uint8_t[]){0x6A}, 1, 0}, + {0x6B, (uint8_t[]){0x08}, 1, 0}, + + {0x6C, (uint8_t[]){0x00}, 1, 0}, + {0x6D, (uint8_t[]){0x00}, 1, 0}, + {0x6E, (uint8_t[]){0x00}, 1, 0}, + {0x6F, (uint8_t[]){0x88}, 1, 0}, + + {0x75, (uint8_t[]){0xFF}, 1, 0}, + {0x77, (uint8_t[]){0xDD}, 1, 0}, + {0x78, (uint8_t[]){0x2C}, 1, 0}, + {0x79, (uint8_t[]){0x15}, 1, 0}, + {0x7A, (uint8_t[]){0x17}, 1, 0}, + {0x7D, (uint8_t[]){0x14}, 1, 0}, + {0x7E, (uint8_t[]){0x82}, 1, 0}, + + {0xE0, (uint8_t[]){0x04}, 1, 0}, + {0x00, (uint8_t[]){0x0E}, 1, 0}, + {0x02, (uint8_t[]){0xB3}, 1, 0}, + {0x09, (uint8_t[]){0x61}, 1, 0}, + {0x0E, (uint8_t[]){0x48}, 1, 0}, + + {0x37, (uint8_t[]){0x58}, 1, 0}, // 全志 + {0x2B, (uint8_t[]){0x0F}, 1, 0}, // 全志 + + {0xE0, (uint8_t[]){0x00}, 1, 0}, + + {0xE6, (uint8_t[]){0x02}, 1, 0}, + {0xE7, (uint8_t[]){0x0C}, 1, 0}, + + {0x11, (uint8_t[]){0x00}, 1, 120}, + + {0x29, (uint8_t[]){0x00}, 1, 20}, +}; + +static esp_err_t panel_jd9365_del(esp_lcd_panel_t *panel) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + + if (jd9365->reset_gpio_num >= 0) + { + gpio_reset_pin(jd9365->reset_gpio_num); + } + // Delete MIPI DPI panel + jd9365->del(panel); + free(jd9365); + ESP_LOGD(TAG, "del jd9365 panel @%p", jd9365); + + return ESP_OK; +} + +static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + esp_lcd_panel_io_handle_t io = jd9365->io; + const esp_lcd_panel_vendor_init_cmd_t *init_cmds = NULL; + uint16_t init_cmds_size = 0; + uint8_t lane_command = JD9365_DSI_2_LANE; + bool is_user_set = true; + bool is_cmd_overwritten = false; + + switch (jd9365->lane_num) + { + case 1: + lane_command = JD9365_DSI_1_LANE; + break; + case 2: + lane_command = JD9365_DSI_2_LANE; + break; + case 3: + lane_command = JD9365_DSI_3_LANE; + break; + case 4: + lane_command = JD9365_DSI_4_LANE; + break; + default: + ESP_LOGE(TAG, "Invalid lane number %d", jd9365->lane_num); + return ESP_ERR_INVALID_ARG; + } + + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_PAGE, (uint8_t[]){JD9365_PAGE_USER}, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]){ + jd9365->madctl_val, + }, + 1), + TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]){ + jd9365->colmod_val, + }, + 1), + TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_DSI_INT0, (uint8_t[]){ + lane_command, + }, + 1), + TAG, "send command failed"); + + // vendor specific initialization, it can be different between manufacturers + // should consult the LCD supplier for initialization sequence code + if (jd9365->init_cmds) + { + init_cmds = jd9365->init_cmds; + init_cmds_size = jd9365->init_cmds_size; + } + else + { + init_cmds = vendor_specific_init_default; + init_cmds_size = sizeof(vendor_specific_init_default) / sizeof(esp_lcd_panel_vendor_init_cmd_t); + } + + for (int i = 0; i < init_cmds_size; i++) + { + // Check if the command has been used or conflicts with the internal + if (is_user_set && (init_cmds[i].data_bytes > 0)) + { + switch (init_cmds[i].cmd) + { + case LCD_CMD_MADCTL: + is_cmd_overwritten = true; + jd9365->madctl_val = ((uint8_t *)init_cmds[i].data)[0]; + break; + case LCD_CMD_COLMOD: + is_cmd_overwritten = true; + jd9365->colmod_val = ((uint8_t *)init_cmds[i].data)[0]; + break; + default: + is_cmd_overwritten = false; + break; + } + + if (is_cmd_overwritten) + { + is_cmd_overwritten = false; + ESP_LOGW(TAG, "The %02Xh command has been used and will be overwritten by external initialization sequence", + init_cmds[i].cmd); + } + } + + // Send command + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, init_cmds[i].cmd, init_cmds[i].data, init_cmds[i].data_bytes), TAG, "send command failed"); + vTaskDelay(pdMS_TO_TICKS(init_cmds[i].delay_ms)); + + // Check if the current cmd is the "page set" cmd + if ((init_cmds[i].cmd == JD9365_CMD_PAGE) && (init_cmds[i].data_bytes > 0)) + { + is_user_set = (((uint8_t *)init_cmds[i].data)[0] == JD9365_PAGE_USER); + } + } + ESP_LOGD(TAG, "send init commands success"); + + ESP_RETURN_ON_ERROR(jd9365->init(panel), TAG, "init MIPI DPI panel failed"); + + return ESP_OK; +} + +static esp_err_t panel_jd9365_reset(esp_lcd_panel_t *panel) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + esp_lcd_panel_io_handle_t io = jd9365->io; + + // Perform hardware reset + if (jd9365->reset_gpio_num >= 0) + { + gpio_set_level(jd9365->reset_gpio_num, !jd9365->flags.reset_level); + vTaskDelay(pdMS_TO_TICKS(5)); + gpio_set_level(jd9365->reset_gpio_num, jd9365->flags.reset_level); + vTaskDelay(pdMS_TO_TICKS(10)); + gpio_set_level(jd9365->reset_gpio_num, !jd9365->flags.reset_level); + vTaskDelay(pdMS_TO_TICKS(120)); + } + else if (io) + { // Perform software reset + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_SWRESET, NULL, 0), TAG, "send command failed"); + vTaskDelay(pdMS_TO_TICKS(120)); + } + + return ESP_OK; +} + +static esp_err_t panel_jd9365_invert_color(esp_lcd_panel_t *panel, bool invert_color_data) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + esp_lcd_panel_io_handle_t io = jd9365->io; + uint8_t command = 0; + + ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_STATE, TAG, "invalid panel IO"); + + if (invert_color_data) + { + command = LCD_CMD_INVON; + } + else + { + command = LCD_CMD_INVOFF; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); + + return ESP_OK; +} + +static esp_err_t panel_jd9365_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + esp_lcd_panel_io_handle_t io = jd9365->io; + uint8_t madctl_val = jd9365->madctl_val; + + ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_STATE, TAG, "invalid panel IO"); + + // Control mirror through LCD command + if (mirror_x) + { + madctl_val |= JD9365_CMD_GS_BIT; + } + else + { + madctl_val &= ~JD9365_CMD_GS_BIT; + } + if (mirror_y) + { + madctl_val |= JD9365_CMD_SS_BIT; + } + else + { + madctl_val &= ~JD9365_CMD_SS_BIT; + } + + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]){madctl_val}, 1), TAG, "send command failed"); + jd9365->madctl_val = madctl_val; + + return ESP_OK; +} + +static esp_err_t panel_jd9365_swap_xy(esp_lcd_panel_t *panel, bool swap_axes) +{ + ESP_LOGW(TAG, "swap_xy is not supported by this panel"); + return ESP_ERR_NOT_SUPPORTED; +} + +static esp_err_t panel_jd9365_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap) +{ + ESP_LOGE(TAG, "set_gap is not supported by this panel"); + return ESP_ERR_NOT_SUPPORTED; +} + +static esp_err_t panel_jd9365_disp_on_off(esp_lcd_panel_t *panel, bool on_off) +{ + jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; + esp_lcd_panel_io_handle_t io = jd9365->io; + int command = 0; + + if (on_off) + { + command = LCD_CMD_DISPON; + } + else + { + command = LCD_CMD_DISPOFF; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); + return ESP_OK; +} +#endif diff --git a/src/lcd/base/esp_lcd_jd9365.h b/src/lcd/base/esp_lcd_jd9365.h new file mode 100644 index 00000000..de10dfaf --- /dev/null +++ b/src/lcd/base/esp_lcd_jd9365.h @@ -0,0 +1,96 @@ + +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "soc/soc_caps.h" + +#if SOC_MIPI_DSI_SUPPORTED +#include +#include "esp_lcd_panel_vendor.h" +#include "esp_lcd_mipi_dsi.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ESP_LCD_EK79007_VER_MAJOR (1) +#define ESP_LCD_EK79007_VER_MINOR (0) +#define ESP_LCD_EK79007_VER_PATCH (0) + +/** + * @brief Create LCD panel for model JD9365 + * + * @note Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for initialization sequence code. + * + * @param[in] io LCD panel IO handle + * @param[in] panel_dev_config General panel device configuration + * @param[out] ret_panel Returned LCD panel handle + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success + * - Otherwise on fail + */ +esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, + esp_lcd_panel_handle_t *ret_panel); + +/** + * @brief MIPI-DSI bus configuration structure + * + */ +#define JD9365_PANEL_BUS_DSI_2CH_CONFIG() \ + { \ + .bus_id = 0, \ + .num_data_lanes = 2, \ + .phy_clk_src = MIPI_DSI_PHY_CLK_SRC_DEFAULT, \ + .lane_bit_rate_mbps = 1500, \ + } + +/** + * @brief MIPI-DBI panel IO configuration structure + * + */ +#define JD9365_PANEL_IO_DBI_CONFIG() \ + { \ + .virtual_channel = 0, \ + .lcd_cmd_bits = 8, \ + .lcd_param_bits = 8, \ + } + +/** + * @brief MIPI DPI configuration structure + * + * @note refresh_rate = (dpi_clock_freq_mhz * 1000000) / (h_res + hsync_pulse_width + hsync_back_porch + hsync_front_porch) + * / (v_res + vsync_pulse_width + vsync_back_porch + vsync_front_porch) + * + * @param[in] px_format Pixel format of the panel + * + */ +#define JD9365_800_1280_PANEL_60HZ_DPI_CONFIG(px_format) \ + { \ + .dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \ + .dpi_clock_freq_mhz = 80, \ + .virtual_channel = 0, \ + .pixel_format = px_format, \ + .num_fbs = 1, \ + .video_timing = { \ + .h_size = 800, \ + .v_size = 1280, \ + .hsync_back_porch = 20, \ + .hsync_pulse_width = 20, \ + .hsync_front_porch = 40, \ + .vsync_back_porch = 10, \ + .vsync_pulse_width = 4, \ + .vsync_front_porch = 30, \ + }, \ + .flags.use_dma2d = true, \ + } +#endif /* SOC_MIPI_DSI_SUPPORTED */ + +#ifdef __cplusplus +} +#endif From a7131d339036f043564b49ea687419ca93bdf953 Mon Sep 17 00:00:00 2001 From: Y1hsiaochunnn Date: Mon, 11 Nov 2024 10:58:28 +0800 Subject: [PATCH 2/6] feat(board): add board Waveshare ESP32-P4-NANO @Y1hsiaochunnn (#123) --- CHANGELOG.md | 7 + ESP_Panel_Board_Custom.h | 3 +- ESP_Panel_Board_Supported.h | 5 +- README.md | 13 +- README_CN.md | 7 +- docs/Board_Instructions.md | 44 ++-- docs/How_To_Use.md | 1 + docs/How_To_Use_CN.md | 1 + docs/LCD_Controllers.md | 3 +- examples/LCD/MIPI_DSI/MIPI_DSI.ino | 9 +- examples/LCD/MIPI_DSI/README.md | 4 +- .../LVGL/v8/Porting/ESP_Panel_Board_Custom.h | 3 +- .../v8/Porting/ESP_Panel_Board_Supported.h | 5 +- .../LVGL/v8/Rotation/ESP_Panel_Board_Custom.h | 3 +- .../v8/Rotation/ESP_Panel_Board_Supported.h | 5 +- .../Panel/PanelTest/ESP_Panel_Board_Custom.h | 3 +- .../PanelTest/ESP_Panel_Board_Supported.h | 5 +- .../PlatformIO/src/ESP_Panel_Board_Custom.h | 3 +- .../src/ESP_Panel_Board_Supported.h | 5 +- .../v8/Porting/ESP_Panel_Board_Custom.h | 3 +- .../v8/Porting/ESP_Panel_Board_Supported.h | 5 +- .../v8/WiFiClock/ESP_Panel_Board_Custom.h | 3 +- .../v8/WiFiClock/ESP_Panel_Board_Supported.h | 5 +- idf_component.yml | 2 +- library.properties | 4 +- src/ESP_PanelVersions.h | 6 +- src/ESP_Panel_Board_Kconfig.h | 5 + src/board/ESP_PanelBoard.h | 3 + src/board/waveshare/ESP32_P4_NANO.h | 226 ++++++++++++++++++ src/board/waveshare/Kconfig.waveshare | 5 + src/lcd/base/esp_lcd_ek79007.c | 2 +- src/lcd/base/esp_lcd_ek79007.h | 2 +- src/lcd/base/esp_lcd_jd9365.c | 176 ++++++-------- src/lcd/base/esp_lcd_jd9365.h | 6 +- .../sdkconfig.ci.waveshare_esp32_p4_nano | 2 + .../sdkconfig.ci.waveshare_esp32_p4_nano | 2 + 36 files changed, 416 insertions(+), 170 deletions(-) create mode 100644 src/board/waveshare/ESP32_P4_NANO.h create mode 100644 test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano create mode 100644 test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano diff --git a/CHANGELOG.md b/CHANGELOG.md index e404f1ce..51a31c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # ChangeLog +## v0.2.1 - 2024-11-14 + +### Enhancements: + +* feat(lcd): add LCD controller JD9365 @Y1hsiaochunnn (#123) +* feat(board): add board Waveshare ESP32-P4-NANO @Y1hsiaochunnn (#123) + ## v0.2.0 - 2024-11-08 ### Enhancements: diff --git a/ESP_Panel_Board_Custom.h b/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/ESP_Panel_Board_Custom.h +++ b/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/ESP_Panel_Board_Supported.h b/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/ESP_Panel_Board_Supported.h +++ b/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/README.md b/README.md index 1f63c5e7..88bd1b46 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Please refer to the documentation - [How to Use](./docs/How_To_Use.md). ### Development Boards -Below is the list of [supported development boards](docs/Board_Instructions.md): +Below is the list of [Supported Development Boards](docs/Board_Instructions.md): | **Manufacturer** | **Board Model** | | ---------------- | --------------- | @@ -40,33 +40,34 @@ Below is the list of [supported development boards](docs/Board_Instructions.md): | [Elecrow](docs/Board_Instructions.md#elecrow) | CrowPanel 7.0" | | [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 | | [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 | -| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1 | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-P4-NANO | Developers and manufacturers are welcome to contribute PRs to add more boards. For details, please refer to the [Board Contribution Guide](./docs/Board_Contribution_Guide.md). ### LCD Controllers -Below is the list of [supported LCD controllers](docs/LCD_Controllers.md): +Below is the list of [Supported LCD Controllers](docs/LCD_Controllers.md): | **Manufacturer** | **Model** | | ---------------- | --------- | | Fitipower | EK9716B, EK79007 | | GalaxyCore | GC9A01, GC9B71, GC9503 | | Ilitek | ILI9341, ILI9881C | +| JADARD | JD9365 | | NewVision | NV3022B | | Sitronix | ST7262, ST7701, ST7789, ST7796, ST77916, ST77922 | ### Touch Controllers -Below is the list of [supported touch controllers](docs/Touch_Controllers.md): +Below is the list of [Supported Touch Controllers](docs/Touch_Controllers.md): | **Manufacturer** | **Model** | | ---------------- | --------- | -| Hynitron | CST816S | | FocalTech | FT5x06 | | GOODiX | GT911, GT1151 | -| Sitronix | ST7123 | +| Hynitron | CST816S | | Parade | TT21100 | +| Sitronix | ST7123 | | Xptek | XPT2046 | ## FAQ diff --git a/README_CN.md b/README_CN.md index 682e99ce..f647e037 100644 --- a/README_CN.md +++ b/README_CN.md @@ -40,7 +40,7 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性: | [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 | | [Elecrow](docs/Board_Instructions.md#elecrow) | CrowPanel 7.0" | | [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 | -| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1 | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-P4-NANO | 欢迎开发者和厂商贡献 PR 来添加更多的开发板,详细说明请参考 [`开发板贡献指南`](./docs/Board_Contribution_Guide_CN.md)。 @@ -53,6 +53,7 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性: | Fitipower | EK9716B, EK79007 | | GalaxyCore | GC9A01, GC9B71, GC9503 | | Ilitek | ILI9341, ILI9881C | +| JADARD | JD9365 | | NewVision | NV3022B | | Sitronix | ST7262, ST7701, ST7789, ST7796, ST77916, ST77922 | @@ -62,11 +63,11 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性: | **厂商** | **型号** | | -------- | -------- | -| Hynitron | CST816S | | FocalTech | FT5x06 | | GOODiX | GT911, GT1151 | -| Sitronix | ST7123 | +| Hynitron | CST816S | | Parade | TT21100 | +| Sitronix | ST7123 | | Xptek | XPT2046 | ## 常见问题解答 diff --git a/docs/Board_Instructions.md b/docs/Board_Instructions.md index 7650cb87..3262673d 100644 --- a/docs/Board_Instructions.md +++ b/docs/Board_Instructions.md @@ -46,32 +46,34 @@ | | [ESP32-S3-Touch-LCD-4.3](https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm) | RGB | ST7262 | 800x480 | I2C | GT911 | | | [ESP32-S3-Touch-LCD-1.85](https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm) | QSPI | ST77916 | 360x360 | I2C | CST816 | | | [ESP32-S3-Touch-LCD-1.85](https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm) | RGB | ST7701 | 480x480 | I2C | CST820 (CST816-like) | +| | [ESP32-P4-NANO](https://www.waveshare.com/esp32-p4-nano.htm) | MIPI-DSI | JD9365 | 800x1280 | I2C | GT9271 (GT911-like) | ## Recommended Configurations in the Arduino IDE Below are recommended configurations for developing GUI applications on different development boards. These settings can be adjusted according to specific requirements, and users can navigate to the `Tools` menu in the Arduino IDE to configure the following settings. -| Supported Boards | Selected Board | PSRAM | Flash Mode | Flash Size | USB CDC On Boot | Partition Scheme | -| :------------------------------: | :----------------: | :------: | :--------: | :--------: | :-------------: | :---------------------: | -| ESP32-C3-LCDkit | ESP32C3 Dev Module | Disabled | QIO | 4MB (32Mb) | Enabled | Default 4MB with spiffs | -| ESP32-S3-BOX | ESP32-S3-BOX | - | - | - | - | 16M Flash (3MB) | -| ESP32-S3-BOX-3 & ESP32-S3-BOX-3B | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | -| ESP32-S3-BOX-3(beta) | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | -| ESP32-S3-BOX-Lite | ESP32-S3-BOX | - | - | - | - | 16M Flash (3MB) | -| ESP32-S3-EYE | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Enabled | 8M with spiffs | -| ESP32-S3-Korvo-2 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Disabled | 16M Flash (3MB) | -| ESP32-S3-LCD-EV-Board | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | **See Note 1** | 16M Flash (3MB) | -| ESP32-S3-LCD-EV-Board-2 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | **See Note 1** | 16M Flash (3MB) | -| ESP32-S3-USB-OTG | ESP32-S3-USB-OTG | - | - | - | - | 8M with spiffs | -| ESP32-P4-Function-EV-Board | ESP32P4 Dev Module | Enabled | QIO | 16MB | Disabled | 16M Flash (3MB) | -| M5STACK-M5CORE2 | M5Stack-Core2 | Enabled | - | - | - | Default | -| M5STACK-M5DIAL | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | Default | -| M5STACK-M5CORES3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | Default 4MB with spiffs | -| ESP32-4848S040C_I_Y_3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Disabled | 16M Flash (3MB) | -| ElecrowCrowPanel 7.0" | ESP32S3 Dev Module | OPI | QIO 80MHz | 4MB | Disabled | Huge App (3MB) | -| Waveshare-ESP32-S3-Touch-LCD-4.3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | 8M with spiffs | -| Waveshare-ESP32-S3-Touch-LCD-1.85 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | -| Waveshare-ESP32-S3-Touch-LCD-2.1 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Supported Boards | Selected Board | PSRAM | Flash Mode | Flash Size | USB CDC On Boot | Partition Scheme | +|:---------------------------------:|:------------------:|:--------:|:----------:|:----------:|:---------------:|:-----------------------:| +| ESP32-C3-LCDkit | ESP32C3 Dev Module | Disabled | QIO | 4MB (32Mb) | Enabled | Default 4MB with spiffs | +| ESP32-S3-BOX | ESP32-S3-BOX | - | - | - | - | 16M Flash (3MB) | +| ESP32-S3-BOX-3 & ESP32-S3-BOX-3B | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| ESP32-S3-BOX-3(beta) | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| ESP32-S3-BOX-Lite | ESP32-S3-BOX | - | - | - | - | 16M Flash (3MB) | +| ESP32-S3-EYE | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Enabled | 8M with spiffs | +| ESP32-S3-Korvo-2 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Disabled | 16M Flash (3MB) | +| ESP32-S3-LCD-EV-Board | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | **See Note 1** | 16M Flash (3MB) | +| ESP32-S3-LCD-EV-Board-2 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | **See Note 1** | 16M Flash (3MB) | +| ESP32-S3-USB-OTG | ESP32-S3-USB-OTG | - | - | - | - | 8M with spiffs | +| ESP32-P4-Function-EV-Board | ESP32P4 Dev Module | Enabled | QIO | 16MB | Disabled | 16M Flash (3MB) | +| M5STACK-M5CORE2 | M5Stack-Core2 | Enabled | - | - | - | Default | +| M5STACK-M5DIAL | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | Default | +| M5STACK-M5CORES3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | Default 4MB with spiffs | +| ESP32-4848S040C_I_Y_3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Disabled | 16M Flash (3MB) | +| ElecrowCrowPanel 7.0" | ESP32S3 Dev Module | OPI | QIO 80MHz | 4MB | Disabled | Huge App (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-1.85 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-2.1 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-4.3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | 8M with spiffs | +| Waveshare-ESP32-P4-NANO | ESP32P4 Dev Module | Enabled | QIO | 16MB | Disabled | 16M Flash (3MB) | **Notes:** diff --git a/docs/How_To_Use.md b/docs/How_To_Use.md index ab37cbb7..7493798a 100644 --- a/docs/How_To_Use.md +++ b/docs/How_To_Use.md @@ -234,6 +234,7 @@ The following examples demonstrate how to develop different interface and model * [QSPI](../examples/LCD/QSPI/) * [Single RGB](../examples/LCD/RGB/) * [3-wire SPI + RGB](../examples/LCD/3wireSPI_RGB/) +* [MIPI-DSI](../examples/LCD/MIPI_DSI/) #### Touch diff --git a/docs/How_To_Use_CN.md b/docs/How_To_Use_CN.md index e96a3413..0c3f92a4 100644 --- a/docs/How_To_Use_CN.md +++ b/docs/How_To_Use_CN.md @@ -234,6 +234,7 @@ ESP32_Display_Panel 会根据 [ESP_Panel_Board_Custom.h](../ESP_Panel_Board_Cust * [QSPI](../examples/LCD/QSPI/) * [Single RGB](../examples/LCD/RGB/) * [3-wire SPI + RGB](../examples/LCD/3wireSPI_RGB/) +* [MIPI-DSI](../examples/LCD/MIPI_DSI/) ##### Touch diff --git a/docs/LCD_Controllers.md b/docs/LCD_Controllers.md index 12fc333b..e5ffe085 100644 --- a/docs/LCD_Controllers.md +++ b/docs/LCD_Controllers.md @@ -3,12 +3,13 @@ | **Name** | **Version** | | ---------------------------------------------------------------------------------- | ----------- | | EK9716B | - | -| [EK79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) | 1.0.0 | +| [EK79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) | 1.0.1 | | [GC9A01](https://components.espressif.com/components/espressif/esp_lcd_gc9a01) | 2.0.0 | | [GC9B71](https://components.espressif.com/components/espressif/esp_lcd_gc9b71) | 1.0.1 | | [GC9503](https://components.espressif.com/components/espressif/esp_lcd_gc9503) | 3.0.1 | | [ILI9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | 2.0.0 | | [ILI9881C](https://components.espressif.com/components/espressif/esp_lcd_ili9881c) | 1.0.0 | +| [JD9365](https://components.espressif.com/components/espressif/esp_lcd_jd9365) | 1.0.1 | | [NV3022B](https://components.espressif.com/components/espressif/esp_lcd_nv3022b) | 0.0.1 | | [SH8601](https://components.espressif.com/components/espressif/esp_lcd_sh8601) | 1.0.0 | | [SPD2010](https://components.espressif.com/components/espressif/esp_lcd_spd2010) | 1.0.1 | diff --git a/examples/LCD/MIPI_DSI/MIPI_DSI.ino b/examples/LCD/MIPI_DSI/MIPI_DSI.ino index 724b6444..b14245da 100644 --- a/examples/LCD/MIPI_DSI/MIPI_DSI.ino +++ b/examples/LCD/MIPI_DSI/MIPI_DSI.ino @@ -2,8 +2,8 @@ * | Supported ESP SoCs | ESP32-P4 | * | ------------------ | -------- | * - * | Supported LCD Controllers | EK79007 | ILI9881C | - * | ------------------------- | ------- | -------- | + * | Supported LCD Controllers | EK79007 | ILI9881C | JD9365 | + * | ------------------------- | ------- | -------- | ------ | * * # MIPI-DSI LCD Example * @@ -73,12 +73,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Currently, the library supports the following MIPI-DSI LCDs: - * - EK79007, ILI9881C + * - EK79007 + * - ILI9881C + * - JD9365 */ #define EXAMPLE_LCD_NAME EK79007 #define EXAMPLE_LCD_WIDTH (1024) #define EXAMPLE_LCD_HEIGHT (600) #define EXAMPLE_LCD_COLOR_BITS (ESP_PANEL_LCD_RGB888_COLOR_BITS_24) + // or `ESP_PANEL_LCD_RGB565_COLOR_BITS_16` #define EXAMPLE_LCD_DSI_PHY_LDO_ID (3) // -1 if not used #define EXAMPLE_LCD_DSI_LANE_NUM (2) // ESP32-P4 supports 1 or 2 lanes #define EXAMPLE_LCD_DSI_LANE_RATE_MBPS (1000) /* Single lane bit rate, should consult the LCD supplier or check the diff --git a/examples/LCD/MIPI_DSI/README.md b/examples/LCD/MIPI_DSI/README.md index a8d2eb45..209d4328 100644 --- a/examples/LCD/MIPI_DSI/README.md +++ b/examples/LCD/MIPI_DSI/README.md @@ -1,8 +1,8 @@ | Supported ESP SoCs | ESP32-P4 | | ------------------ | -------- | -| Supported LCD Controllers | EK79007 | ILI9881C | -| ------------------------- | ------- | -------- | +| Supported LCD Controllers | EK79007 | ILI9881C | JD9365 | +| ------------------------- | ------- | -------- | ------ | # MIPI-DSI LCD Example diff --git a/examples/LVGL/v8/Porting/ESP_Panel_Board_Custom.h b/examples/LVGL/v8/Porting/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/LVGL/v8/Porting/ESP_Panel_Board_Custom.h +++ b/examples/LVGL/v8/Porting/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Custom.h b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Custom.h +++ b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/Panel/PanelTest/ESP_Panel_Board_Custom.h b/examples/Panel/PanelTest/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/Panel/PanelTest/ESP_Panel_Board_Custom.h +++ b/examples/Panel/PanelTest/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h +++ b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/PlatformIO/src/ESP_Panel_Board_Custom.h b/examples/PlatformIO/src/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/PlatformIO/src/ESP_Panel_Board_Custom.h +++ b/examples/PlatformIO/src/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h +++ b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Custom.h b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Custom.h +++ b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Custom.h b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Custom.h index dfd5e727..003b092e 100644 --- a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Custom.h +++ b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Custom.h @@ -25,6 +25,7 @@ * - EK9716B * - GC9A01, GC9B71, GC9503 * - ILI9341 + * - JD9365 * - NV3022B * - SH8601 * - SPD2010 @@ -394,7 +395,7 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 #endif /* ESP_PANEL_USE_CUSTOM_BOARD */ diff --git a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h index 75d5c84a..2f930b76 100644 --- a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h @@ -82,11 +82,14 @@ * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_P4_NANO + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -103,7 +106,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/idf_component.yml b/idf_component.yml index 27fb31e5..52f1ea34 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.2.0" +version: "0.2.1" description: ESP32_Display_Panel is a library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. url: https://github.com/esp-arduino-libs/ESP32_Display_Panel repository: https://github.com/esp-arduino-libs/ESP32_Display_Panel.git diff --git a/library.properties b/library.properties index c3cf1a04..d9ba9db9 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=ESP32_Display_Panel -version=0.2.0 +version=0.2.1 author=espressif maintainer=espressif sentence=ESP32_Display_Panel is a library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. -paragraph=Currently supported boards:ESP32-C3-LCDkit,ESP32-S3-BOX,ESP32-S3-BOX-3,ESP32-S3-BOX-3B,ESP32-S3-BOX-3(beta),ESP32-S3-BOX-Lite,ESP32-S3-EYE,ESP32-S3-Korvo-2,ESP32-S3-LCD-EV-Board,ESP32-S3-LCD-EV-Board-2,ESP32-S3-USB-OTG,ESP32-P4-Function-EV-Board,M5STACK-M5CORE2,M5STACK-M5DIAL,M5STACK-M5CORES3,ESP32-4848S040C_I_Y_3,ESP32-S3-Touch-LCD-4.3,ESP32-S3-Touch-LCD-1.85,ESP32-S3-Touch-LCD-2.1. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB,MIPI-DSI. Currently supported LCD controllers: EK9716B,EK79007,GC9A01,GC9B71,GC9503,ILI9341,ILI9881C,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046. +paragraph=Currently supported boards:ESP32-C3-LCDkit,ESP32-S3-BOX,ESP32-S3-BOX-3,ESP32-S3-BOX-3B,ESP32-S3-BOX-3(beta),ESP32-S3-BOX-Lite,ESP32-S3-EYE,ESP32-S3-Korvo-2,ESP32-S3-LCD-EV-Board,ESP32-S3-LCD-EV-Board-2,ESP32-S3-USB-OTG,ESP32-P4-Function-EV-Board,M5STACK-M5CORE2,M5STACK-M5DIAL,M5STACK-M5CORES3,ESP32-4848S040C_I_Y_3,ESP32-S3-Touch-LCD-4.3,ESP32-S3-Touch-LCD-1.85,ESP32-S3-Touch-LCD-2.1,ESP32-P4-NANO. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB,MIPI-DSI. Currently supported LCD controllers: EK9716B,EK79007,GC9A01,GC9B71,GC9503,ILI9341,ILI9881C,JD9365,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046. category=Other architectures=esp32 url=https://github.com/esp-arduino-libs/ESP32_Display_Panel diff --git a/src/ESP_PanelVersions.h b/src/ESP_PanelVersions.h index db246b84..34d575b4 100644 --- a/src/ESP_PanelVersions.h +++ b/src/ESP_PanelVersions.h @@ -11,7 +11,7 @@ /* Library Version */ #define ESP_PANEL_VERSION_MAJOR 0 #define ESP_PANEL_VERSION_MINOR 2 -#define ESP_PANEL_VERSION_PATCH 0 +#define ESP_PANEL_VERSION_PATCH 1 /* File `ESP_Panel_Conf.h` */ #define ESP_PANEL_CONF_VERSION_MAJOR 0 @@ -21,11 +21,11 @@ /* File `ESP_Panel_Board_Custom.h` */ #define ESP_PANEL_BOARD_CUSTOM_VERSION_MAJOR 0 #define ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR 3 -#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 0 +#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 1 /* File `ESP_Panel_Board_Supported.h` */ #define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 6 +#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 7 #define ESP_PANEL_BOARD_SUPPORTED_VERSION_PATCH 0 // *INDENT-OFF* diff --git a/src/ESP_Panel_Board_Kconfig.h b/src/ESP_Panel_Board_Kconfig.h index ebe9fb6e..40a1376c 100644 --- a/src/ESP_Panel_Board_Kconfig.h +++ b/src/ESP_Panel_Board_Kconfig.h @@ -145,6 +145,11 @@ #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 #endif #endif + #ifndef BOARD_WAVESHARE_ESP32_P4_NANO + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO + #define BOARD_WAVESHARE_ESP32_P4_NANO CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO + #endif + #endif #endif /* ESP_PANEL_USE_SUPPORTED_BOARD */ /** diff --git a/src/board/ESP_PanelBoard.h b/src/board/ESP_PanelBoard.h index 50816c8e..950bbf8e 100644 --- a/src/board/ESP_PanelBoard.h +++ b/src/board/ESP_PanelBoard.h @@ -36,6 +36,7 @@ + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) \ + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85) \ + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1) \ + + defined(BOARD_WAVESHARE_ESP32_P4_NANO) \ > 1 #error "Multiple boards enabled! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." #endif @@ -88,6 +89,8 @@ #include "board/waveshare/ESP32_S3_Touch_LCD_1_85.h" #elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1) #include "board/waveshare/ESP32_S3_Touch_LCD_2_1.h" +#elif defined(BOARD_WAVESHARE_ESP32_P4_NANO) + #include "board/waveshare/ESP32_P4_NANO.h" #else #error "Unknown board selected! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." #endif diff --git a/src/board/waveshare/ESP32_P4_NANO.h b/src/board/waveshare/ESP32_P4_NANO.h new file mode 100644 index 00000000..fc2bf4db --- /dev/null +++ b/src/board/waveshare/ESP32_P4_NANO.h @@ -0,0 +1,226 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// *INDENT-OFF* + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the LCD panel ///////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an LCD panel */ +#define ESP_PANEL_USE_LCD (1) // 0/1 + +#if ESP_PANEL_USE_LCD +/** + * LCD Controller Name. + */ +#define ESP_PANEL_LCD_NAME JD9365 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (800) +#define ESP_PANEL_LCD_HEIGHT (1280) + +/* LCD Bus Settings */ +/** + * If set to 1, the bus 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. + * + * Note: This macro is not useful for the MIPI-DSI bus. + * + */ +#define ESP_PANEL_LCD_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_MIPI_DSI) +/** + * LCD Bus Parameters. + * + * Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and + * https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details. + * + */ +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_MIPI_DSI + + #define ESP_PANEL_LCD_MIPI_DSI_LANE_NUM (2) // ESP32-P4 supports 1 or 2 lanes + #define ESP_PANEL_LCD_MIPI_DSI_LANE_RATE_MBPS (1000) // Single lane bit rate, should consult the LCD supplier or check the + // LCD drive IC datasheet for the supported lane rate. + // ESP32-P4 supports max 1500Mbps + #define ESP_PANEL_LCD_MIPI_DSI_PHY_LDO_ID (3) // -1 if not used + #define ESP_PANEL_LCD_MIPI_DPI_CLK_MHZ (60) + #define ESP_PANEL_LCD_MIPI_DPI_PIXEL_BITS (ESP_PANEL_LCD_RGB565_COLOR_BITS_16) + #define ESP_PANEL_LCD_MIPI_DSI_HPW (20) + #define ESP_PANEL_LCD_MIPI_DSI_HBP (20) + #define ESP_PANEL_LCD_MIPI_DSI_HFP (40) + #define ESP_PANEL_LCD_MIPI_DSI_VPW (4) + #define ESP_PANEL_LCD_MIPI_DSI_VBP (10) + #define ESP_PANEL_LCD_MIPI_DSI_VFP (30) + +#endif /* ESP_PANEL_LCD_BUS_TYPE */ + +/** + * LCD Vendor Initialization Commands. + * + * Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for + * initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver + * will use the default initialization sequence code. + * + * There are two formats for the sequence code: + * 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms} + * 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and + * ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command) + */ +/* +#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \ + { \ + {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \ + {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \ + {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \ + {0x29, (uint8_t []){0x00}, 0, 120}, \ + or \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \ + ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \ + } +*/ + +/* LCD Color Settings */ +/* LCD color depth in bits */ +#define ESP_PANEL_LCD_COLOR_BITS (ESP_PANEL_LCD_MIPI_DPI_PIXEL_BITS) // 8/16/18/24, typically same as the pixel bits +/* + * LCD RGB Element Order. Choose one of the following: + * - 0: RGB + * - 1: BGR + */ +#define ESP_PANEL_LCD_BGR_ORDER (0) // 0/1 +#define ESP_PANEL_LCD_INEVRT_COLOR (0) // 0/1 + +/* LCD Transformation Flags */ +// #define ESP_PANEL_LCD_SWAP_XY (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_X (1) // 0/1 +#define ESP_PANEL_LCD_MIRROR_Y (1) // 0/1 + +/* LCD Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#define ESP_PANEL_LCD_IO_RST (-1) +#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_LCD */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the touch panel /////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an touch panel */ +#define ESP_PANEL_USE_TOUCH (1) // 0/1 +#if ESP_PANEL_USE_TOUCH +/** + * Touch controller name. + * Since the driver for the GT9271 is compatible with the GT911, the GT911 is used here. + */ +#define ESP_PANEL_TOUCH_NAME GT911 + +/* Touch resolution in pixels */ +#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD +#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD + +/* Touch Panel Bus Settings */ +/** + * If set to 1, the bus 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_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * Touch panel bus type. + */ +#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C) +/* Touch panel bus parameters */ +#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C + + #define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // Typically set to 0 to use default address +#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + #define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (0) // 0/1 + #define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (0) // 0/1 + #define ESP_PANEL_TOUCH_I2C_IO_SCL (8) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (7) +#endif + +#endif + +/* Touch Transformation Flags */ +#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_X (1) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_Y (1) // 0/1 + +/* Touch Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#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_INT_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_TOUCH */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the backlight //////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define ESP_PANEL_USE_BACKLIGHT (1) // 0/1 +#if ESP_PANEL_USE_BACKLIGHT +/* Backlight pin */ +#define ESP_PANEL_BACKLIGHT_IO (26) // IO num of backlight pin +#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level + +/* Set to 1 if you want to turn off the backlight after initializing the panel; otherwise, set it to turn on */ +#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off + +/* Set to 1 if use PWM for brightness control */ +#define ESP_PANEL_LCD_BL_USE_PWM (1) // 0/1 +#endif /* ESP_PANEL_USE_BACKLIGHT */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the IO expander ////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 0 if not using IO Expander */ +#define ESP_PANEL_USE_EXPANDER (0) // 0/1 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// 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_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 ) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * Do not change the following versions, they are used to check if the configurations in this file are compatible with + * the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows: + * + * 1. If the major version is not consistent, then the configurations in this file are incompatible with the library + * and must be replaced with the file from the library. + * 2. If the minor version is not consistent, this file might be missing some new configurations, which will be set to + * default values. It is recommended to replace it with the file from the library. + * 3. Even if the patch version is not consistent, it will not affect normal functionality. + * + */ +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 + +// *INDENT-OFF* diff --git a/src/board/waveshare/Kconfig.waveshare b/src/board/waveshare/Kconfig.waveshare index bc6f3a84..285577f7 100644 --- a/src/board/waveshare/Kconfig.waveshare +++ b/src/board/waveshare/Kconfig.waveshare @@ -12,3 +12,8 @@ config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 bool "ESP32_S3_Touch_LCD_2_1" help https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + +config BOARD_WAVESHARE_ESP32_P4_NANO + bool "ESP32_P4_NANO" + help + https://www.waveshare.com/esp32-p4-nano.htm diff --git a/src/lcd/base/esp_lcd_ek79007.c b/src/lcd/base/esp_lcd_ek79007.c index be96d391..2915e9e0 100644 --- a/src/lcd/base/esp_lcd_ek79007.c +++ b/src/lcd/base/esp_lcd_ek79007.c @@ -281,4 +281,4 @@ static esp_err_t panel_ek79007_invert_color(esp_lcd_panel_t *panel, bool invert_ return ESP_OK; } -#endif /* SOC_MIPI_DSI_SUPPORTED */ +#endif diff --git a/src/lcd/base/esp_lcd_ek79007.h b/src/lcd/base/esp_lcd_ek79007.h index b367b991..f50d637b 100644 --- a/src/lcd/base/esp_lcd_ek79007.h +++ b/src/lcd/base/esp_lcd_ek79007.h @@ -19,7 +19,7 @@ extern "C" { #define ESP_LCD_EK79007_VER_MAJOR (1) #define ESP_LCD_EK79007_VER_MINOR (0) -#define ESP_LCD_EK79007_VER_PATCH (0) +#define ESP_LCD_EK79007_VER_PATCH (1) /** * @brief Create LCD panel for model EK79007 diff --git a/src/lcd/base/esp_lcd_jd9365.c b/src/lcd/base/esp_lcd_jd9365.c index 4efb96b4..ba35235f 100644 --- a/src/lcd/base/esp_lcd_jd9365.c +++ b/src/lcd/base/esp_lcd_jd9365.c @@ -7,6 +7,7 @@ #include "soc/soc_caps.h" #if SOC_MIPI_DSI_SUPPORTED +#include "ESP_PanelLog.h" #include "esp_check.h" #include "esp_log.h" #include "esp_lcd_panel_commands.h" @@ -19,20 +20,21 @@ #include "driver/gpio.h" #include "esp_lcd_jd9365.h" -#define JD9365_CMD_PAGE (0xE0) -#define JD9365_PAGE_USER (0x00) +#include "esp_lcd_vendor_types.h" -#define JD9365_CMD_DSI_INT0 (0x80) -#define JD9365_DSI_1_LANE (0x00) -#define JD9365_DSI_2_LANE (0x01) -#define JD9365_DSI_3_LANE (0x10) -#define JD9365_DSI_4_LANE (0x11) +#define JD9365_CMD_PAGE (0xE0) +#define JD9365_PAGE_USER (0x00) -#define JD9365_CMD_GS_BIT (1 << 0) -#define JD9365_CMD_SS_BIT (1 << 1) +#define JD9365_CMD_DSI_INT0 (0x80) +#define JD9365_DSI_1_LANE (0x00) +#define JD9365_DSI_2_LANE (0x01) +#define JD9365_DSI_3_LANE (0x10) +#define JD9365_DSI_4_LANE (0x11) -typedef struct -{ +#define JD9365_CMD_GS_BIT (1 << 0) +#define JD9365_CMD_SS_BIT (1 << 1) + +typedef struct { esp_lcd_panel_io_handle_t io; int reset_gpio_num; uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register @@ -40,9 +42,8 @@ typedef struct const esp_lcd_panel_vendor_init_cmd_t *init_cmds; uint16_t init_cmds_size; uint8_t lane_num; - struct - { - unsigned int reset_level : 1; + struct { + unsigned int reset_level: 1; } flags; // To save the original functions of MIPI DPI panel esp_err_t (*del)(esp_lcd_panel_t *panel); @@ -56,17 +57,17 @@ static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel); static esp_err_t panel_jd9365_reset(esp_lcd_panel_t *panel); static esp_err_t panel_jd9365_invert_color(esp_lcd_panel_t *panel, bool invert_color_data); static esp_err_t panel_jd9365_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y); -static esp_err_t panel_jd9365_swap_xy(esp_lcd_panel_t *panel, bool swap_axes); -static esp_err_t panel_jd9365_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap); static esp_err_t panel_jd9365_disp_on_off(esp_lcd_panel_t *panel, bool on_off); esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel) { + ESP_PANEL_ENABLE_TAG_DEBUG_LOG(); + ESP_LOGI(TAG, "version: %d.%d.%d", ESP_LCD_JD9365_VER_MAJOR, ESP_LCD_JD9365_VER_MINOR, ESP_LCD_JD9365_VER_PATCH); ESP_RETURN_ON_FALSE(io && panel_dev_config && ret_panel, ESP_ERR_INVALID_ARG, TAG, "invalid arguments"); - jd9365_vendor_config_t *vendor_config = (jd9365_vendor_config_t *)panel_dev_config->vendor_config; + esp_lcd_panel_vendor_config_t *vendor_config = (esp_lcd_panel_vendor_config_t *)panel_dev_config->vendor_config; ESP_RETURN_ON_FALSE(vendor_config && vendor_config->mipi_config.dpi_config && vendor_config->mipi_config.dsi_bus, ESP_ERR_INVALID_ARG, TAG, "invalid vendor config"); @@ -74,8 +75,7 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp jd9365_panel_t *jd9365 = (jd9365_panel_t *)calloc(1, sizeof(jd9365_panel_t)); ESP_RETURN_ON_FALSE(jd9365, ESP_ERR_NO_MEM, TAG, "no mem for jd9365 panel"); - if (panel_dev_config->reset_gpio_num >= 0) - { + if (panel_dev_config->reset_gpio_num >= 0) { gpio_config_t io_conf = { .mode = GPIO_MODE_OUTPUT, .pin_bit_mask = 1ULL << panel_dev_config->reset_gpio_num, @@ -83,8 +83,7 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed"); } - switch (panel_dev_config->color_space) - { + switch (panel_dev_config->color_space) { case LCD_RGB_ELEMENT_ORDER_RGB: jd9365->madctl_val = 0; break; @@ -96,8 +95,7 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp break; } - switch (panel_dev_config->bits_per_pixel) - { + switch (panel_dev_config->bits_per_pixel) { case 16: // RGB565 jd9365->colmod_val = 0x55; break; @@ -112,10 +110,6 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp break; } - uint8_t ID[3]; - ESP_GOTO_ON_ERROR(esp_lcd_panel_io_rx_param(io, 0x04, ID, 3), err, TAG, "read ID failed"); - ESP_LOGI(TAG, "LCD ID: %02X %02X %02X", ID[0], ID[1], ID[2]); - jd9365->io = io; jd9365->init_cmds = vendor_config->init_cmds; jd9365->init_cmds_size = vendor_config->init_cmds_size; @@ -137,8 +131,6 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp panel_handle->init = panel_jd9365_init; panel_handle->reset = panel_jd9365_reset; panel_handle->mirror = panel_jd9365_mirror; - panel_handle->swap_xy = panel_jd9365_swap_xy; - panel_handle->set_gap = panel_jd9365_set_gap; panel_handle->invert_color = panel_jd9365_invert_color; panel_handle->disp_on_off = panel_jd9365_disp_on_off; panel_handle->user_data = jd9365; @@ -148,10 +140,8 @@ esp_err_t esp_lcd_new_panel_jd9365(const esp_lcd_panel_io_handle_t io, const esp return ESP_OK; err: - if (jd9365) - { - if (panel_dev_config->reset_gpio_num >= 0) - { + if (jd9365) { + if (panel_dev_config->reset_gpio_num >= 0) { gpio_reset_pin(panel_dev_config->reset_gpio_num); } free(jd9365); @@ -374,8 +364,8 @@ static const esp_lcd_panel_vendor_init_cmd_t vendor_specific_init_default[] = { {0x09, (uint8_t[]){0x61}, 1, 0}, {0x0E, (uint8_t[]){0x48}, 1, 0}, - {0x37, (uint8_t[]){0x58}, 1, 0}, // 全志 - {0x2B, (uint8_t[]){0x0F}, 1, 0}, // 全志 + {0x37, (uint8_t[]){0x58}, 1, 0}, + {0x2B, (uint8_t[]){0x0F}, 1, 0}, {0xE0, (uint8_t[]){0x00}, 1, 0}, @@ -391,14 +381,13 @@ static esp_err_t panel_jd9365_del(esp_lcd_panel_t *panel) { jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; - if (jd9365->reset_gpio_num >= 0) - { + if (jd9365->reset_gpio_num >= 0) { gpio_reset_pin(jd9365->reset_gpio_num); } // Delete MIPI DPI panel jd9365->del(panel); - free(jd9365); ESP_LOGD(TAG, "del jd9365 panel @%p", jd9365); + free(jd9365); return ESP_OK; } @@ -413,8 +402,10 @@ static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel) bool is_user_set = true; bool is_cmd_overwritten = false; - switch (jd9365->lane_num) - { + switch (jd9365->lane_num) { + case 0: + lane_command = JD9365_DSI_2_LANE; + break; case 1: lane_command = JD9365_DSI_1_LANE; break; @@ -432,43 +423,37 @@ static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel) return ESP_ERR_INVALID_ARG; } - ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_PAGE, (uint8_t[]){JD9365_PAGE_USER}, 1), TAG, "send command failed"); - ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]){ - jd9365->madctl_val, - }, - 1), - TAG, "send command failed"); - ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]){ - jd9365->colmod_val, - }, - 1), - TAG, "send command failed"); - ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_DSI_INT0, (uint8_t[]){ - lane_command, - }, - 1), - TAG, "send command failed"); + uint8_t ID[3]; + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_rx_param(io, 0x04, ID, 3), TAG, "read ID failed"); + ESP_LOGI(TAG, "LCD ID: %02X %02X %02X", ID[0], ID[1], ID[2]); + + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_PAGE, (uint8_t[]) { + JD9365_PAGE_USER + }, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]) { + jd9365->madctl_val, + }, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]) { + jd9365->colmod_val, + }, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, JD9365_CMD_DSI_INT0, (uint8_t[]) { + lane_command, + }, 1), TAG, "send command failed"); // vendor specific initialization, it can be different between manufacturers // should consult the LCD supplier for initialization sequence code - if (jd9365->init_cmds) - { + if (jd9365->init_cmds) { init_cmds = jd9365->init_cmds; init_cmds_size = jd9365->init_cmds_size; - } - else - { + } else { init_cmds = vendor_specific_init_default; init_cmds_size = sizeof(vendor_specific_init_default) / sizeof(esp_lcd_panel_vendor_init_cmd_t); } - for (int i = 0; i < init_cmds_size; i++) - { + for (int i = 0; i < init_cmds_size; i++) { // Check if the command has been used or conflicts with the internal - if (is_user_set && (init_cmds[i].data_bytes > 0)) - { - switch (init_cmds[i].cmd) - { + if (is_user_set && (init_cmds[i].data_bytes > 0)) { + switch (init_cmds[i].cmd) { case LCD_CMD_MADCTL: is_cmd_overwritten = true; jd9365->madctl_val = ((uint8_t *)init_cmds[i].data)[0]; @@ -482,8 +467,7 @@ static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel) break; } - if (is_cmd_overwritten) - { + if (is_cmd_overwritten) { is_cmd_overwritten = false; ESP_LOGW(TAG, "The %02Xh command has been used and will be overwritten by external initialization sequence", init_cmds[i].cmd); @@ -495,8 +479,7 @@ static esp_err_t panel_jd9365_init(esp_lcd_panel_t *panel) vTaskDelay(pdMS_TO_TICKS(init_cmds[i].delay_ms)); // Check if the current cmd is the "page set" cmd - if ((init_cmds[i].cmd == JD9365_CMD_PAGE) && (init_cmds[i].data_bytes > 0)) - { + if ((init_cmds[i].cmd == JD9365_CMD_PAGE) && (init_cmds[i].data_bytes > 0)) { is_user_set = (((uint8_t *)init_cmds[i].data)[0] == JD9365_PAGE_USER); } } @@ -513,17 +496,14 @@ static esp_err_t panel_jd9365_reset(esp_lcd_panel_t *panel) esp_lcd_panel_io_handle_t io = jd9365->io; // Perform hardware reset - if (jd9365->reset_gpio_num >= 0) - { + if (jd9365->reset_gpio_num >= 0) { gpio_set_level(jd9365->reset_gpio_num, !jd9365->flags.reset_level); vTaskDelay(pdMS_TO_TICKS(5)); gpio_set_level(jd9365->reset_gpio_num, jd9365->flags.reset_level); vTaskDelay(pdMS_TO_TICKS(10)); gpio_set_level(jd9365->reset_gpio_num, !jd9365->flags.reset_level); vTaskDelay(pdMS_TO_TICKS(120)); - } - else if (io) - { // Perform software reset + } else if (io) { // Perform software reset ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_SWRESET, NULL, 0), TAG, "send command failed"); vTaskDelay(pdMS_TO_TICKS(120)); } @@ -539,12 +519,9 @@ static esp_err_t panel_jd9365_invert_color(esp_lcd_panel_t *panel, bool invert_c ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_STATE, TAG, "invalid panel IO"); - if (invert_color_data) - { + if (invert_color_data) { command = LCD_CMD_INVON; - } - else - { + } else { command = LCD_CMD_INVOFF; } ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); @@ -561,53 +538,34 @@ static esp_err_t panel_jd9365_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_STATE, TAG, "invalid panel IO"); // Control mirror through LCD command - if (mirror_x) - { + if (mirror_x) { madctl_val |= JD9365_CMD_GS_BIT; - } - else - { + } else { madctl_val &= ~JD9365_CMD_GS_BIT; } - if (mirror_y) - { + if (mirror_y) { madctl_val |= JD9365_CMD_SS_BIT; - } - else - { + } else { madctl_val &= ~JD9365_CMD_SS_BIT; } - ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]){madctl_val}, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t []) { + madctl_val + }, 1), TAG, "send command failed"); jd9365->madctl_val = madctl_val; return ESP_OK; } -static esp_err_t panel_jd9365_swap_xy(esp_lcd_panel_t *panel, bool swap_axes) -{ - ESP_LOGW(TAG, "swap_xy is not supported by this panel"); - return ESP_ERR_NOT_SUPPORTED; -} - -static esp_err_t panel_jd9365_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap) -{ - ESP_LOGE(TAG, "set_gap is not supported by this panel"); - return ESP_ERR_NOT_SUPPORTED; -} - static esp_err_t panel_jd9365_disp_on_off(esp_lcd_panel_t *panel, bool on_off) { jd9365_panel_t *jd9365 = (jd9365_panel_t *)panel->user_data; esp_lcd_panel_io_handle_t io = jd9365->io; int command = 0; - if (on_off) - { + if (on_off) { command = LCD_CMD_DISPON; - } - else - { + } else { command = LCD_CMD_DISPOFF; } ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); diff --git a/src/lcd/base/esp_lcd_jd9365.h b/src/lcd/base/esp_lcd_jd9365.h index de10dfaf..33a5525c 100644 --- a/src/lcd/base/esp_lcd_jd9365.h +++ b/src/lcd/base/esp_lcd_jd9365.h @@ -18,9 +18,9 @@ extern "C" { #endif -#define ESP_LCD_EK79007_VER_MAJOR (1) -#define ESP_LCD_EK79007_VER_MINOR (0) -#define ESP_LCD_EK79007_VER_PATCH (0) +#define ESP_LCD_JD9365_VER_MAJOR (1) +#define ESP_LCD_JD9365_VER_MINOR (0) +#define ESP_LCD_JD9365_VER_PATCH (1) /** * @brief Create LCD panel for model JD9365 diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano new file mode 100644 index 00000000..46071791 --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32p4" +CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano b/test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano new file mode 100644 index 00000000..46071791 --- /dev/null +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32p4" +CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO=y From a72896025be82d90b13c78a311402db32cdc4053 Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Thu, 14 Nov 2024 13:55:13 +0800 Subject: [PATCH 3/6] feat(board): add configuration for ignoring board in Kconfig --- CHANGELOG.md | 1 + src/board/Kconfig.board | 7 +- src/board/Kconfig.board_custom | 1296 ++++++++--------- src/board/Kconfig.board_supported | 118 +- .../lcd/mipi_dsi/sdkconfig.defaults.esp32p4 | 3 + test_apps/lvgl_port/main/test_app_main.cpp | 38 +- .../sdkconfig.ci.elecrow_crowpanel_7_0 | 15 - .../sdkconfig.ci.espressif_esp32_c3_lcdkit | 5 - ...ig.ci.espressif_esp32_p4_function_ev_board | 13 - .../sdkconfig.ci.espressif_esp32_s3_box | 16 - .../sdkconfig.ci.espressif_esp32_s3_box_3 | 16 - ...sdkconfig.ci.espressif_esp32_s3_box_3_beta | 16 - .../sdkconfig.ci.espressif_esp32_s3_box_lite | 16 - .../sdkconfig.ci.espressif_esp32_s3_eye | 16 - .../sdkconfig.ci.espressif_esp32_s3_korvo_2 | 16 - ...kconfig.ci.espressif_esp32_s3_lcd_ev_board | 15 - ...onfig.ci.espressif_esp32_s3_lcd_ev_board_2 | 15 - ....ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 | 15 - ...ig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 | 15 - .../sdkconfig.ci.espressif_esp32_s3_usb_otg | 5 - ...sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 | 15 - .../lvgl_port/sdkconfig.ci.m5stack_m5core2 | 5 - .../lvgl_port/sdkconfig.ci.m5stack_m5core3 | 16 - .../lvgl_port/sdkconfig.ci.m5stack_m5dial | 13 - ...onfig.ci.waveshare_esp32_s3_touch_lcd_1_85 | 16 - ...config.ci.waveshare_esp32_s3_touch_lcd_2_1 | 15 - ...config.ci.waveshare_esp32_s3_touch_lcd_4_3 | 15 - test_apps/lvgl_port/sdkconfig.defaults | 9 +- .../lvgl_port/sdkconfig.defaults.esp32p4 | 8 + .../lvgl_port/sdkconfig.defaults.esp32s3 | 13 + .../panel/sdkconfig.ci.elecrow_crowpanel_7_0 | 13 - .../sdkconfig.ci.espressif_esp32_c3_lcdkit | 1 - ...ig.ci.espressif_esp32_p4_function_ev_board | 8 - .../panel/sdkconfig.ci.espressif_esp32_s3_box | 13 - .../sdkconfig.ci.espressif_esp32_s3_box_3 | 13 - ...sdkconfig.ci.espressif_esp32_s3_box_3_beta | 13 - .../sdkconfig.ci.espressif_esp32_s3_box_lite | 13 - .../panel/sdkconfig.ci.espressif_esp32_s3_eye | 13 - .../sdkconfig.ci.espressif_esp32_s3_korvo_2 | 13 - ...kconfig.ci.espressif_esp32_s3_lcd_ev_board | 13 - ...onfig.ci.espressif_esp32_s3_lcd_ev_board_2 | 13 - ....ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 | 13 - ...ig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 | 13 - .../sdkconfig.ci.espressif_esp32_s3_usb_otg | 2 - ...sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 | 13 - test_apps/panel/sdkconfig.ci.m5stack_m5core2 | 2 - test_apps/panel/sdkconfig.ci.m5stack_m5core3 | 13 - test_apps/panel/sdkconfig.ci.m5stack_m5dial | 13 - ...onfig.ci.waveshare_esp32_s3_touch_lcd_1_85 | 13 - ...config.ci.waveshare_esp32_s3_touch_lcd_2_1 | 13 - ...config.ci.waveshare_esp32_s3_touch_lcd_4_3 | 13 - test_apps/panel/sdkconfig.defaults | 3 + test_apps/panel/sdkconfig.defaults.esp32p4 | 8 + test_apps/panel/sdkconfig.defaults.esp32s3 | 13 + 54 files changed, 787 insertions(+), 1253 deletions(-) create mode 100644 test_apps/lvgl_port/sdkconfig.defaults.esp32p4 create mode 100644 test_apps/lvgl_port/sdkconfig.defaults.esp32s3 create mode 100644 test_apps/panel/sdkconfig.defaults.esp32p4 create mode 100644 test_apps/panel/sdkconfig.defaults.esp32s3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a31c8c..abbc53f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * feat(lcd): add LCD controller JD9365 @Y1hsiaochunnn (#123) * feat(board): add board Waveshare ESP32-P4-NANO @Y1hsiaochunnn (#123) +* feat(board): add configuration for ignoring board in Kconfig ## v0.2.0 - 2024-11-08 diff --git a/src/board/Kconfig.board b/src/board/Kconfig.board index 18a2a9d1..612a8ae0 100644 --- a/src/board/Kconfig.board +++ b/src/board/Kconfig.board @@ -1,7 +1,12 @@ menu "Board" choice prompt "Select the board type" - default ESP_PANEL_USE_SUPPORTED_BOARD + default ESP_PANEL_IGNORE_BOARD + + config ESP_PANEL_IGNORE_BOARD + bool "None" + help + Enable this option if you are not using a board. config ESP_PANEL_USE_SUPPORTED_BOARD bool "Supported board" diff --git a/src/board/Kconfig.board_custom b/src/board/Kconfig.board_custom index cb0298aa..ca360695 100644 --- a/src/board/Kconfig.board_custom +++ b/src/board/Kconfig.board_custom @@ -1,803 +1,801 @@ -menu "Custom board configurations" - config ESP_PANEL_USE_LCD - bool "Use LCD" - default n - help - Enable this option if you are using a LCD. +config ESP_PANEL_USE_LCD + bool "Use LCD" + default n + help + Enable this option if you are using a LCD. - menu "LCD settings" - depends on ESP_PANEL_USE_LCD - choice - prompt "Controller" - default ESP_PANEL_LCD_CONTROLLER_ILI9341 +menu "LCD settings" + depends on ESP_PANEL_USE_LCD + choice + prompt "Controller" + default ESP_PANEL_LCD_CONTROLLER_ILI9341 - config ESP_PANEL_LCD_CONTROLLER_EK9716B - bool "EK9716B" + config ESP_PANEL_LCD_CONTROLLER_EK9716B + bool "EK9716B" - config ESP_PANEL_LCD_CONTROLLER_GC9A01 - bool "GC9A01" + config ESP_PANEL_LCD_CONTROLLER_GC9A01 + bool "GC9A01" - config ESP_PANEL_LCD_CONTROLLER_GC9B71 - bool "GC9B71" + config ESP_PANEL_LCD_CONTROLLER_GC9B71 + bool "GC9B71" - config ESP_PANEL_LCD_CONTROLLER_GC9503 - bool "GC9503" + config ESP_PANEL_LCD_CONTROLLER_GC9503 + bool "GC9503" - config ESP_PANEL_LCD_CONTROLLER_ILI9341 - bool "ILI9341" + config ESP_PANEL_LCD_CONTROLLER_ILI9341 + bool "ILI9341" - config ESP_PANEL_LCD_CONTROLLER_NV3022B - bool "NV3022B" + config ESP_PANEL_LCD_CONTROLLER_NV3022B + bool "NV3022B" - config ESP_PANEL_LCD_CONTROLLER_SH8601 - bool "SH8601" + config ESP_PANEL_LCD_CONTROLLER_SH8601 + bool "SH8601" - config ESP_PANEL_LCD_CONTROLLER_SPD2010 - bool "SPD2010" + config ESP_PANEL_LCD_CONTROLLER_SPD2010 + bool "SPD2010" - config ESP_PANEL_LCD_CONTROLLER_ST7262 - bool "ST7262" + config ESP_PANEL_LCD_CONTROLLER_ST7262 + bool "ST7262" - config ESP_PANEL_LCD_CONTROLLER_ST7701 - bool "ST7701" + config ESP_PANEL_LCD_CONTROLLER_ST7701 + bool "ST7701" - config ESP_PANEL_LCD_CONTROLLER_ST7789 - bool "ST7789" + config ESP_PANEL_LCD_CONTROLLER_ST7789 + bool "ST7789" - config ESP_PANEL_LCD_CONTROLLER_ST7796 - bool "ST7796" + config ESP_PANEL_LCD_CONTROLLER_ST7796 + bool "ST7796" - config ESP_PANEL_LCD_CONTROLLER_ST77916 - bool "ST77916" + config ESP_PANEL_LCD_CONTROLLER_ST77916 + bool "ST77916" - config ESP_PANEL_LCD_CONTROLLER_ST77922 - bool "ST77922" - endchoice + config ESP_PANEL_LCD_CONTROLLER_ST77922 + bool "ST77922" + endchoice - config ESP_PANEL_LCD_WIDTH - int "Pixels in width (horizontal resolution)" - default 320 - range 1 10000 + config ESP_PANEL_LCD_WIDTH + int "Pixels in width (horizontal resolution)" + default 320 + range 1 10000 - config ESP_PANEL_LCD_HEIGHT - int "Pixels in height (vertical resolution)" - default 240 - range 1 10000 + config ESP_PANEL_LCD_HEIGHT + int "Pixels in height (vertical resolution)" + default 240 + range 1 10000 - menu "Bus settings" - config ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - bool "Skip to initialize bus host" - default n - help - If set to 1, the bus 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. Set to 1 if only the RGB interface is used without the 3-wire SPI interface, + menu "Bus settings" + config ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + bool "Skip to initialize bus host" + default n + help + If set to 1, the bus 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. Set to 1 if only the RGB interface is used without the 3-wire SPI interface, - choice - prompt "Bus type" - default ESP_PANEL_LCD_BUS_TYPE_SPI + choice + prompt "Bus type" + default ESP_PANEL_LCD_BUS_TYPE_SPI - config ESP_PANEL_LCD_BUS_TYPE_SPI - bool "SPI" + config ESP_PANEL_LCD_BUS_TYPE_SPI + bool "SPI" - config ESP_PANEL_LCD_BUS_TYPE_QSPI - bool "QSPI" + config ESP_PANEL_LCD_BUS_TYPE_QSPI + bool "QSPI" - config ESP_PANEL_LCD_BUS_TYPE_RGB - bool "RGB" - endchoice + config ESP_PANEL_LCD_BUS_TYPE_RGB + bool "RGB" + endchoice - config ESP_PANEL_LCD_BUS_TYPE - int - default 1 if ESP_PANEL_LCD_BUS_TYPE_SPI - default 2 if ESP_PANEL_LCD_BUS_TYPE_QSPI - default 3 if ESP_PANEL_LCD_BUS_TYPE_RGB + config ESP_PANEL_LCD_BUS_TYPE + int + default 1 if ESP_PANEL_LCD_BUS_TYPE_SPI + default 2 if ESP_PANEL_LCD_BUS_TYPE_QSPI + default 3 if ESP_PANEL_LCD_BUS_TYPE_RGB - menu "SPI bus settings" - depends on ESP_PANEL_LCD_BUS_TYPE_SPI + menu "SPI bus settings" + depends on ESP_PANEL_LCD_BUS_TYPE_SPI - config ESP_PANEL_LCD_BUS_HOST_ID - int "SPI host ID" - default 1 - range 1 3 + config ESP_PANEL_LCD_BUS_HOST_ID + int "SPI host ID" + default 1 + range 1 3 - config ESP_PANEL_LCD_SPI_MODE - int "SPI mode" - default 0 - range 0 3 + config ESP_PANEL_LCD_SPI_MODE + int "SPI mode" + default 0 + range 0 3 - config ESP_PANEL_LCD_SPI_CLK_HZ - int "SPI clock frequency (Hz)" - default 40000000 - range 1 80000000 + config ESP_PANEL_LCD_SPI_CLK_HZ + int "SPI clock frequency (Hz)" + default 40000000 + range 1 80000000 - config ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ - int "SPI transaction queue size" - default 10 - range 1 100 + config ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ + int "SPI transaction queue size" + default 10 + range 1 100 - config ESP_PANEL_LCD_SPI_CMD_BITS - int "SPI command bit length" - default 8 - range 0 32 + config ESP_PANEL_LCD_SPI_CMD_BITS + int "SPI command bit length" + default 8 + range 0 32 - config ESP_PANEL_LCD_SPI_PARAM_BITS - int "SPI parameter bit length" - default 8 - range 0 32 + config ESP_PANEL_LCD_SPI_PARAM_BITS + int "SPI parameter bit length" + default 8 + range 0 32 - menu "Pins" - config ESP_PANEL_LCD_SPI_IO_CS - int "CS" - default 5 - range -1 100 + menu "Pins" + config ESP_PANEL_LCD_SPI_IO_CS + int "CS" + default 5 + range -1 100 - config ESP_PANEL_LCD_SPI_IO_DC - int "DC (RS)" - default 4 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_DC + int "DC (RS)" + default 4 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_SCK - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "SCLK (SCL)" - default 7 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_SCK + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "SCLK (SCL)" + default 7 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_MOSI - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "MOSI (SDA)" - default 6 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_MOSI + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "MOSI (SDA)" + default 6 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_MISO - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "MISO (SDO)" - default -1 - range -1 100 - endmenu + config ESP_PANEL_LCD_SPI_IO_MISO + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "MISO (SDO)" + default -1 + range -1 100 endmenu + endmenu - menu "QSPI bus settings" - depends on ESP_PANEL_LCD_BUS_TYPE_QSPI + menu "QSPI bus settings" + depends on ESP_PANEL_LCD_BUS_TYPE_QSPI - config ESP_PANEL_LCD_BUS_HOST_ID - int "SPI host ID" - default 1 - range 1 3 + config ESP_PANEL_LCD_BUS_HOST_ID + int "SPI host ID" + default 1 + range 1 3 - config ESP_PANEL_LCD_SPI_MODE - int "SPI mode" - default 0 - range 0 3 + config ESP_PANEL_LCD_SPI_MODE + int "SPI mode" + default 0 + range 0 3 - config ESP_PANEL_LCD_SPI_CLK_HZ - int "SPI clock frequency (Hz)" - default 40000000 - range 1 80000000 + config ESP_PANEL_LCD_SPI_CLK_HZ + int "SPI clock frequency (Hz)" + default 40000000 + range 1 80000000 - config ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ - int "SPI transaction queue size" - default 10 - range 1 100 + config ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ + int "SPI transaction queue size" + default 10 + range 1 100 - config ESP_PANEL_LCD_SPI_CMD_BITS - int "SPI command bit length" - default 32 - range 0 32 + config ESP_PANEL_LCD_SPI_CMD_BITS + int "SPI command bit length" + default 32 + range 0 32 - config ESP_PANEL_LCD_SPI_PARAM_BITS - int "SPI parameter bit length" - default 8 - range 0 32 + config ESP_PANEL_LCD_SPI_PARAM_BITS + int "SPI parameter bit length" + default 8 + range 0 32 - menu "Pins" - config ESP_PANEL_LCD_SPI_IO_CS - int "CS" - default 5 - range -1 100 + menu "Pins" + config ESP_PANEL_LCD_SPI_IO_CS + int "CS" + default 5 + range -1 100 - config ESP_PANEL_LCD_SPI_IO_SCK - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "SCLK (SCL)" - default 9 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_SCK + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "SCLK (SCL)" + default 9 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_DATA0 - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "DATA0 (SDA)" - default 10 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_DATA0 + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "DATA0 (SDA)" + default 10 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_DATA1 - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "DATA1" - default 11 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_DATA1 + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "DATA1" + default 11 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_DATA2 - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "DATA2" - default 12 - range 0 100 + config ESP_PANEL_LCD_SPI_IO_DATA2 + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "DATA2" + default 12 + range 0 100 - config ESP_PANEL_LCD_SPI_IO_DATA3 - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - int "DATA3" - default 13 - range 0 100 - endmenu + config ESP_PANEL_LCD_SPI_IO_DATA3 + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + int "DATA3" + default 13 + range 0 100 endmenu + endmenu - menu "RGB bus settings" - depends on ESP_PANEL_LCD_BUS_TYPE_RGB + menu "RGB bus settings" + depends on ESP_PANEL_LCD_BUS_TYPE_RGB - menu "3-wire SPI interface" - depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST - config ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER - bool "Use IO expander to control CS" - default n - - config ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER - bool "Use IO expander to control SCL" - default n - - config ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER - bool "Use IO expander to control SDA" - default n - - config ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO - bool "Auto delete panel IO instance" - default n - help - If set to 1, the panel IO instance will be deleted automatically when the panel is initialized. If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, please set it to 1 to release the panel IO and its pins (except CS signal). - - config ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD - bool "Mirror by LCD command instead of software" - default n if ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO - default y if !ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO - help - if set to 1, the `mirror()` function will be implemented by LCD command (e.g. 36h) - - menu "Pins" - config ESP_PANEL_LCD_3WIRE_SPI_IO_CS - int "CS" - default 0 - range 0 100 - - config ESP_PANEL_LCD_3WIRE_SPI_IO_SCK - int "SCL" - default 1 - range 0 100 - - config ESP_PANEL_LCD_3WIRE_SPI_IO_SDA - int "SDA" - default 2 - range 0 100 - endmenu - endmenu + menu "3-wire SPI interface" + depends on !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + config ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER + bool "Use IO expander to control CS" + default n - menu "RGB interface" - config ESP_PANEL_LCD_RGB_CLK_HZ - int "RGB clock frequency (Hz)" - default 16000000 - range 1 40000000 + config ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER + bool "Use IO expander to control SCL" + default n - config ESP_PANEL_LCD_RGB_HPW - int "HPW (Horizontal Pulse Width)" - default 10 - range 0 1000 + config ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER + bool "Use IO expander to control SDA" + default n - config ESP_PANEL_LCD_RGB_HBP - int "HBP (Horizontal Back Porch)" - default 10 - range 1 1000 + config ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO + bool "Auto delete panel IO instance" + default n + help + If set to 1, the panel IO instance will be deleted automatically when the panel is initialized. If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, please set it to 1 to release the panel IO and its pins (except CS signal). - config ESP_PANEL_LCD_RGB_HFP - int "HFP (Horizontal Front Porch)" - default 20 - range 0 1000 + config ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD + bool "Mirror by LCD command instead of software" + default n if ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO + default y if !ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO + help + if set to 1, the `mirror()` function will be implemented by LCD command (e.g. 36h) - config ESP_PANEL_LCD_RGB_VPW - int "VPW (Vertical Pulse Width)" - default 10 - range 0 1000 + menu "Pins" + config ESP_PANEL_LCD_3WIRE_SPI_IO_CS + int "CS" + default 0 + range 0 100 - config ESP_PANEL_LCD_RGB_VBP - int "VBP (Vertical Back Porch)" - default 10 - range 0 1000 + config ESP_PANEL_LCD_3WIRE_SPI_IO_SCK + int "SCL" + default 1 + range 0 100 - config ESP_PANEL_LCD_RGB_VFP - int "VFP (Vertical Front Porch)" - default 10 - range 0 1000 - - config ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG - bool "PCLK active on the falling edge" - default n - - choice - prompt "Data width & pixel format" - default ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - - config ESP_PANEL_LCD_RGB_DATA_WIDTH_8 - bool "8-bit & RGB888" - - config ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - bool "16-bit & RGB565" - endchoice - - config ESP_PANEL_LCD_RGB_DATA_WIDTH - int - default 8 if ESP_PANEL_LCD_RGB_DATA_WIDTH_8 - default 16 if ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - - config ESP_PANEL_LCD_RGB_PIXEL_BITS - int - default 24 if ESP_PANEL_LCD_RGB_DATA_WIDTH_8 - default 16 if ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - - menu "Pins" - config ESP_PANEL_LCD_RGB_IO_HSYNC - int "HSYNC" - default 46 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_VSYNC - int "VSYNC" - default 3 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DE - int "DE" - default 17 - range -1 100 - - config ESP_PANEL_LCD_RGB_IO_PCLK - int "PCLK" - default 9 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DISP - int "DISP" - default -1 - range -1 100 - - config ESP_PANEL_LCD_RGB_IO_DATA0 - int "DATA0" - default 10 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA1 - int "DATA1" - default 11 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA2 - int "DATA2" - default 12 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA3 - int "DATA3" - default 13 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA4 - int "DATA4" - default 14 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA5 - int "DATA5" - default 21 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA6 - int "DATA6" - default 47 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA7 - int "DATA7" - default 48 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA8 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA8" - default 45 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA9 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA9" - default 38 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA10 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA10" - default 39 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA11 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA11" - default 40 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA12 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA12" - default 41 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA13 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA13" - default 42 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA14 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA14" - default 2 - range 0 100 - - config ESP_PANEL_LCD_RGB_IO_DATA15 - depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - int "DATA15" - default 1 - range 0 100 - endmenu + config ESP_PANEL_LCD_3WIRE_SPI_IO_SDA + int "SDA" + default 2 + range 0 100 endmenu endmenu - endmenu - menu "Color settings" - choice - prompt "Color bits" - default ESP_PANEL_LCD_COLOR_BITS_16 + menu "RGB interface" + config ESP_PANEL_LCD_RGB_CLK_HZ + int "RGB clock frequency (Hz)" + default 16000000 + range 1 40000000 - config ESP_PANEL_LCD_COLOR_BITS_8 - bool "8 bits" + config ESP_PANEL_LCD_RGB_HPW + int "HPW (Horizontal Pulse Width)" + default 10 + range 0 1000 - config ESP_PANEL_LCD_COLOR_BITS_16 - bool "16 bits" - endchoice + config ESP_PANEL_LCD_RGB_HBP + int "HBP (Horizontal Back Porch)" + default 10 + range 1 1000 - config ESP_PANEL_LCD_COLOR_BITS - int - default 8 if ESP_PANEL_LCD_COLOR_BITS_8 - default 16 if ESP_PANEL_LCD_COLOR_BITS_16 + config ESP_PANEL_LCD_RGB_HFP + int "HFP (Horizontal Front Porch)" + default 20 + range 0 1000 - choice - prompt "Color RGB element order" - default ESP_PANEL_LCD_COLOR_ORDER_RGB + config ESP_PANEL_LCD_RGB_VPW + int "VPW (Vertical Pulse Width)" + default 10 + range 0 1000 - config ESP_PANEL_LCD_COLOR_ORDER_RGB - bool "RGB" + config ESP_PANEL_LCD_RGB_VBP + int "VBP (Vertical Back Porch)" + default 10 + range 0 1000 - config ESP_PANEL_LCD_COLOR_ORDER_BGR - bool "BGR" - endchoice + config ESP_PANEL_LCD_RGB_VFP + int "VFP (Vertical Front Porch)" + default 10 + range 0 1000 - config ESP_PANEL_LCD_BGR_ORDER - bool - default n if ESP_PANEL_LCD_COLOR_ORDER_RGB - default y if ESP_PANEL_LCD_COLOR_ORDER_BGR + config ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG + bool "PCLK active on the falling edge" + default n - config ESP_PANEL_LCD_INEVRT_COLOR - bool "Invert color bit (0->1, 1->0)" - default n - endmenu + choice + prompt "Data width & pixel format" + default ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - menu "Transformation settings" - config ESP_PANEL_LCD_SWAP_XY - bool "Swap X and Y Axes" - default n + config ESP_PANEL_LCD_RGB_DATA_WIDTH_8 + bool "8-bit & RGB888" - config ESP_PANEL_LCD_MIRROR_X - bool "Mirror X Axes" - default n + config ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + bool "16-bit & RGB565" + endchoice - config ESP_PANEL_LCD_MIRROR_Y - bool "Mirror Y Axes" - default n - endmenu + config ESP_PANEL_LCD_RGB_DATA_WIDTH + int + default 8 if ESP_PANEL_LCD_RGB_DATA_WIDTH_8 + default 16 if ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - config ESP_PANEL_LCD_IO_RST - int "Reset pin" - default -1 - range -1 100 + config ESP_PANEL_LCD_RGB_PIXEL_BITS + int + default 24 if ESP_PANEL_LCD_RGB_DATA_WIDTH_8 + default 16 if ESP_PANEL_LCD_RGB_DATA_WIDTH_16 - config ESP_PANEL_LCD_RST_LEVEL - depends on ESP_PANEL_LCD_IO_RST >= 0 - int "Reset level" - default 0 - range 0 1 - endmenu + menu "Pins" + config ESP_PANEL_LCD_RGB_IO_HSYNC + int "HSYNC" + default 46 + range 0 100 - config ESP_PANEL_USE_TOUCH - bool "Use LCD touch" - default n - help - Enable this option if you are using a LCD touch. + config ESP_PANEL_LCD_RGB_IO_VSYNC + int "VSYNC" + default 3 + range 0 100 - menu "LCD touch settings" - depends on ESP_PANEL_USE_TOUCH - choice - prompt "Controller" - default ESP_PANEL_TOUCH_CONTROLLER_TT21100 + config ESP_PANEL_LCD_RGB_IO_DE + int "DE" + default 17 + range -1 100 - config ESP_PANEL_TOUCH_CONTROLLER_CST816S - bool "CST816S" + config ESP_PANEL_LCD_RGB_IO_PCLK + int "PCLK" + default 9 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_FT5X06 - bool "FT5x06" + config ESP_PANEL_LCD_RGB_IO_DISP + int "DISP" + default -1 + range -1 100 - config ESP_PANEL_TOUCH_CONTROLLER_GT911 - bool "GT911" + config ESP_PANEL_LCD_RGB_IO_DATA0 + int "DATA0" + default 10 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_GT1151 - bool "GT1151" + config ESP_PANEL_LCD_RGB_IO_DATA1 + int "DATA1" + default 11 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_ST1633 - bool "ST1633" + config ESP_PANEL_LCD_RGB_IO_DATA2 + int "DATA2" + default 12 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_ST7123 - bool "ST7123" + config ESP_PANEL_LCD_RGB_IO_DATA3 + int "DATA3" + default 13 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_TT21100 - bool "TT21100" + config ESP_PANEL_LCD_RGB_IO_DATA4 + int "DATA4" + default 14 + range 0 100 - config ESP_PANEL_TOUCH_CONTROLLER_STMPE610 - bool "STMPE610" - endchoice + config ESP_PANEL_LCD_RGB_IO_DATA5 + int "DATA5" + default 21 + range 0 100 - config ESP_PANEL_TOUCH_H_RES - int "Pixels in width (horizontal resolution)" - default ESP_PANEL_LCD_WIDTH if ESP_PANEL_USE_LCD - default 240 if !ESP_PANEL_USE_LCD - range 1 10000 - - config ESP_PANEL_TOUCH_V_RES - int "Pixels in height (vertical resolution)" - default ESP_PANEL_LCD_HEIGHT if ESP_PANEL_USE_LCD - default 240 if !ESP_PANEL_USE_LCD - range 1 10000 - - menu "Bus settings" - config ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - bool "Skip to initialize bus host" - default n - help - If set to 1, the bus 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. Set to 1 if only the RGB interface is used without the 3-wire SPI interface, + config ESP_PANEL_LCD_RGB_IO_DATA6 + int "DATA6" + default 47 + range 0 100 - choice - prompt "Bus type" - default ESP_PANEL_TOUCH_BUS_TYPE_I2C + config ESP_PANEL_LCD_RGB_IO_DATA7 + int "DATA7" + default 48 + range 0 100 - config ESP_PANEL_TOUCH_BUS_TYPE_I2C - bool "I2C" + config ESP_PANEL_LCD_RGB_IO_DATA8 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA8" + default 45 + range 0 100 - config ESP_PANEL_TOUCH_BUS_TYPE_SPI - bool "SPI" - endchoice + config ESP_PANEL_LCD_RGB_IO_DATA9 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA9" + default 38 + range 0 100 - config ESP_PANEL_TOUCH_BUS_TYPE - int - default 1 if ESP_PANEL_TOUCH_BUS_TYPE_SPI - default 4 if ESP_PANEL_TOUCH_BUS_TYPE_I2C + config ESP_PANEL_LCD_RGB_IO_DATA10 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA10" + default 39 + range 0 100 - menu "I2C bus settings" - depends on ESP_PANEL_TOUCH_BUS_TYPE_I2C + config ESP_PANEL_LCD_RGB_IO_DATA11 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA11" + default 40 + range 0 100 - config ESP_PANEL_TOUCH_BUS_HOST_ID - int "I2C host ID" - default 0 - range 0 1 + config ESP_PANEL_LCD_RGB_IO_DATA12 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA12" + default 41 + range 0 100 - config ESP_PANEL_TOUCH_I2C_ADDRESS - int "I2C address (7-bit)" - default 0 - range 0 255 - help - Typically set to 0 to use the default address. For touchs with only one address, set to 0. For touchs with multiple addresses, set to 0 or the address. Like GT911, there are two addresses: 0x5D(default) and 0x14 - - config ESP_PANEL_TOUCH_I2C_CLK_HZ - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "I2C clock frequency (Hz)" - default 400000 - range 1 400000 - - config ESP_PANEL_TOUCH_I2C_SCL_PULLUP - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - bool "Enable SCL Pull-up" - default y - - config ESP_PANEL_TOUCH_I2C_SDA_PULLUP - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - bool "Enable SDA Pull-up" - default y - - config ESP_PANEL_TOUCH_I2C_IO_SCL - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "SCL pin" - default 18 - range 0 100 + config ESP_PANEL_LCD_RGB_IO_DATA13 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA13" + default 42 + range 0 100 - config ESP_PANEL_TOUCH_I2C_IO_SDA - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "SDA pin" - default 8 - range 0 100 + config ESP_PANEL_LCD_RGB_IO_DATA14 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA14" + default 2 + range 0 100 + + config ESP_PANEL_LCD_RGB_IO_DATA15 + depends on ESP_PANEL_LCD_RGB_DATA_WIDTH_16 + int "DATA15" + default 1 + range 0 100 + endmenu endmenu + endmenu + endmenu - menu "SPI bus settings" - depends on ESP_PANEL_TOUCH_BUS_TYPE_SPI - config ESP_PANEL_TOUCH_BUS_HOST_ID - int "SPI host ID" - default 1 - range 1 3 + menu "Color settings" + choice + prompt "Color bits" + default ESP_PANEL_LCD_COLOR_BITS_16 - config ESP_PANEL_TOUCH_SPI_IO_CS - int "CS pin" - default 5 - range -1 100 + config ESP_PANEL_LCD_COLOR_BITS_8 + bool "8 bits" - config ESP_PANEL_TOUCH_SPI_IO_SCK - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "SCK (SCL) pin" - default 7 - range 0 100 + config ESP_PANEL_LCD_COLOR_BITS_16 + bool "16 bits" + endchoice - config ESP_PANEL_TOUCH_SPI_IO_MOSI - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "MOSI (SDA) pin" - default 6 - range 0 100 + config ESP_PANEL_LCD_COLOR_BITS + int + default 8 if ESP_PANEL_LCD_COLOR_BITS_8 + default 16 if ESP_PANEL_LCD_COLOR_BITS_16 - config ESP_PANEL_TOUCH_SPI_IO_MISO - depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST - int "MISO (SDO) pin" - default 9 - range 0 100 - endmenu - endmenu + choice + prompt "Color RGB element order" + default ESP_PANEL_LCD_COLOR_ORDER_RGB - menu "Transformation settings" - config ESP_PANEL_TOUCH_SWAP_XY - bool "Swap X and Y Axes" - default n + config ESP_PANEL_LCD_COLOR_ORDER_RGB + bool "RGB" - config ESP_PANEL_TOUCH_MIRROR_X - bool "Mirror X Axes" - default n + config ESP_PANEL_LCD_COLOR_ORDER_BGR + bool "BGR" + endchoice - config ESP_PANEL_TOUCH_MIRROR_Y - bool "Mirror Y Axes" - default n - endmenu + config ESP_PANEL_LCD_BGR_ORDER + bool + default n if ESP_PANEL_LCD_COLOR_ORDER_RGB + default y if ESP_PANEL_LCD_COLOR_ORDER_BGR - config ESP_PANEL_TOUCH_IO_RST - int "Reset pin" - default -1 - range -1 100 + config ESP_PANEL_LCD_INEVRT_COLOR + bool "Invert color bit (0->1, 1->0)" + default n + endmenu - config ESP_PANEL_TOUCH_RST_LEVEL - depends on ESP_PANEL_TOUCH_IO_RST >= 0 - int "Reset level" - default 0 - range 0 1 + menu "Transformation settings" + config ESP_PANEL_LCD_SWAP_XY + bool "Swap X and Y Axes" + default n - config ESP_PANEL_TOUCH_IO_INT - int "Interrupt pin" - default -1 - range -1 100 + config ESP_PANEL_LCD_MIRROR_X + bool "Mirror X Axes" + default n - config ESP_PANEL_TOUCH_INT_LEVEL - depends on ESP_PANEL_TOUCH_IO_INT >= 0 - int "Interrupt level" - default 0 - range 0 1 + config ESP_PANEL_LCD_MIRROR_Y + bool "Mirror Y Axes" + default n endmenu - config ESP_PANEL_USE_BACKLIGHT - bool "Use Backlight" - default n - help - Enable this option if you are using the backlight. + config ESP_PANEL_LCD_IO_RST + int "Reset pin" + default -1 + range -1 100 - menu "Backlight settings" - depends on ESP_PANEL_USE_BACKLIGHT - config ESP_PANEL_BACKLIGHT_IO - int "Pin" - default 45 - range 0 100 + config ESP_PANEL_LCD_RST_LEVEL + depends on ESP_PANEL_LCD_IO_RST >= 0 + int "Reset level" + default 0 + range 0 1 +endmenu - config ESP_PANEL_BACKLIGHT_ON_LEVEL - int "On level" - default 1 - range 0 1 +config ESP_PANEL_USE_TOUCH + bool "Use LCD touch" + default n + help + Enable this option if you are using a LCD touch. - config ESP_PANEL_BACKLIGHT_IDLE_OFF - bool "Idle off" - default n - help - Set to 1 if you want to turn off the backlight after initializing the panel; otherwise, set it to turn on. - endmenu +menu "LCD touch settings" + depends on ESP_PANEL_USE_TOUCH + choice + prompt "Controller" + default ESP_PANEL_TOUCH_CONTROLLER_TT21100 - config ESP_PANEL_USE_EXPANDER - bool "Use IO expander" - default n - help - Enable this option if you are using an IO expander. + config ESP_PANEL_TOUCH_CONTROLLER_CST816S + bool "CST816S" - menu "IO expander settings" - depends on ESP_PANEL_USE_EXPANDER - choice - prompt "Chip" - default ESP_PANEL_EXPANDER_CHIP_TCA95xx_8bit + config ESP_PANEL_TOUCH_CONTROLLER_FT5X06 + bool "FT5x06" - config ESP_PANEL_EXPANDER_CHIP_CH422G - bool "CH422G" + config ESP_PANEL_TOUCH_CONTROLLER_GT911 + bool "GT911" - config ESP_PANEL_EXPANDER_CHIP_HT8574 - bool "HT8574" + config ESP_PANEL_TOUCH_CONTROLLER_GT1151 + bool "GT1151" - config ESP_PANEL_EXPANDER_CHIP_TCA95xx_8bit - bool "TCA95xx_8bit" + config ESP_PANEL_TOUCH_CONTROLLER_ST1633 + bool "ST1633" - config ESP_PANEL_EXPANDER_TYPE_TCA95xx_16bit - bool "TCA95xx_16bit" - endchoice + config ESP_PANEL_TOUCH_CONTROLLER_ST7123 + bool "ST7123" + + config ESP_PANEL_TOUCH_CONTROLLER_TT21100 + bool "TT21100" + + config ESP_PANEL_TOUCH_CONTROLLER_STMPE610 + bool "STMPE610" + endchoice + + config ESP_PANEL_TOUCH_H_RES + int "Pixels in width (horizontal resolution)" + default ESP_PANEL_LCD_WIDTH if ESP_PANEL_USE_LCD + default 240 if !ESP_PANEL_USE_LCD + range 1 10000 - config ESP_PANEL_EXPANDER_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_V_RES + int "Pixels in height (vertical resolution)" + default ESP_PANEL_LCD_HEIGHT if ESP_PANEL_USE_LCD + default 240 if !ESP_PANEL_USE_LCD + range 1 10000 + + menu "Bus settings" + config ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST bool "Skip to initialize bus host" default n help If set to 1, the bus 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. Set to 1 if only the RGB interface is used without the 3-wire SPI interface, + choice + prompt "Bus type" + default ESP_PANEL_TOUCH_BUS_TYPE_I2C + + config ESP_PANEL_TOUCH_BUS_TYPE_I2C + bool "I2C" + + config ESP_PANEL_TOUCH_BUS_TYPE_SPI + bool "SPI" + endchoice + + config ESP_PANEL_TOUCH_BUS_TYPE + int + default 1 if ESP_PANEL_TOUCH_BUS_TYPE_SPI + default 4 if ESP_PANEL_TOUCH_BUS_TYPE_I2C + menu "I2C bus settings" - config ESP_PANEL_EXPANDER_HOST_ID + depends on ESP_PANEL_TOUCH_BUS_TYPE_I2C + + config ESP_PANEL_TOUCH_BUS_HOST_ID int "I2C host ID" default 0 range 0 1 - config ESP_PANEL_EXPANDER_I2C_ADDRESS + config ESP_PANEL_TOUCH_I2C_ADDRESS int "I2C address (7-bit)" default 0 range 0 255 help - The actual I2C address. Even for the same model of IC, the I2C address may be different, and confirmation based on the actual hardware connection is required. + Typically set to 0 to use the default address. For touchs with only one address, set to 0. For touchs with multiple addresses, set to 0 or the address. Like GT911, there are two addresses: 0x5D(default) and 0x14 - config ESP_PANEL_EXPANDER_I2C_CLK_HZ - depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_I2C_CLK_HZ + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST int "I2C clock frequency (Hz)" default 400000 range 1 400000 - config ESP_PANEL_EXPANDER_I2C_SCL_PULLUP - depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_I2C_SCL_PULLUP + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST bool "Enable SCL Pull-up" default y - config ESP_PANEL_EXPANDER_I2C_SDA_PULLUP - depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_I2C_SDA_PULLUP + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST bool "Enable SDA Pull-up" default y - config ESP_PANEL_EXPANDER_I2C_IO_SCL - depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_I2C_IO_SCL + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST int "SCL pin" default 18 range 0 100 - config ESP_PANEL_EXPANDER_I2C_IO_SDA - depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + config ESP_PANEL_TOUCH_I2C_IO_SDA + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST int "SDA pin" default 8 range 0 100 endmenu + + menu "SPI bus settings" + depends on ESP_PANEL_TOUCH_BUS_TYPE_SPI + config ESP_PANEL_TOUCH_BUS_HOST_ID + int "SPI host ID" + default 1 + range 1 3 + + config ESP_PANEL_TOUCH_SPI_IO_CS + int "CS pin" + default 5 + range -1 100 + + config ESP_PANEL_TOUCH_SPI_IO_SCK + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + int "SCK (SCL) pin" + default 7 + range 0 100 + + config ESP_PANEL_TOUCH_SPI_IO_MOSI + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + int "MOSI (SDA) pin" + default 6 + range 0 100 + + config ESP_PANEL_TOUCH_SPI_IO_MISO + depends on !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + int "MISO (SDO) pin" + default 9 + range 0 100 + endmenu + endmenu + + menu "Transformation settings" + config ESP_PANEL_TOUCH_SWAP_XY + bool "Swap X and Y Axes" + default n + + config ESP_PANEL_TOUCH_MIRROR_X + bool "Mirror X Axes" + default n + + config ESP_PANEL_TOUCH_MIRROR_Y + bool "Mirror Y Axes" + default n + endmenu + + config ESP_PANEL_TOUCH_IO_RST + int "Reset pin" + default -1 + range -1 100 + + config ESP_PANEL_TOUCH_RST_LEVEL + depends on ESP_PANEL_TOUCH_IO_RST >= 0 + int "Reset level" + default 0 + range 0 1 + + config ESP_PANEL_TOUCH_IO_INT + int "Interrupt pin" + default -1 + range -1 100 + + config ESP_PANEL_TOUCH_INT_LEVEL + depends on ESP_PANEL_TOUCH_IO_INT >= 0 + int "Interrupt level" + default 0 + range 0 1 +endmenu + +config ESP_PANEL_USE_BACKLIGHT + bool "Use Backlight" + default n + help + Enable this option if you are using the backlight. + +menu "Backlight settings" + depends on ESP_PANEL_USE_BACKLIGHT + config ESP_PANEL_BACKLIGHT_IO + int "Pin" + default 45 + range 0 100 + + config ESP_PANEL_BACKLIGHT_ON_LEVEL + int "On level" + default 1 + range 0 1 + + config ESP_PANEL_BACKLIGHT_IDLE_OFF + bool "Idle off" + default n + help + Set to 1 if you want to turn off the backlight after initializing the panel; otherwise, set it to turn on. +endmenu + +config ESP_PANEL_USE_EXPANDER + bool "Use IO expander" + default n + help + Enable this option if you are using an IO expander. + +menu "IO expander settings" + depends on ESP_PANEL_USE_EXPANDER + choice + prompt "Chip" + default ESP_PANEL_EXPANDER_CHIP_TCA95xx_8bit + + config ESP_PANEL_EXPANDER_CHIP_CH422G + bool "CH422G" + + config ESP_PANEL_EXPANDER_CHIP_HT8574 + bool "HT8574" + + config ESP_PANEL_EXPANDER_CHIP_TCA95xx_8bit + bool "TCA95xx_8bit" + + config ESP_PANEL_EXPANDER_TYPE_TCA95xx_16bit + bool "TCA95xx_16bit" + endchoice + + config ESP_PANEL_EXPANDER_SKIP_INIT_HOST + bool "Skip to initialize bus host" + default n + help + If set to 1, the bus 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. Set to 1 if only the RGB interface is used without the 3-wire SPI interface, + + menu "I2C bus settings" + config ESP_PANEL_EXPANDER_HOST_ID + int "I2C host ID" + default 0 + range 0 1 + + config ESP_PANEL_EXPANDER_I2C_ADDRESS + int "I2C address (7-bit)" + default 0 + range 0 255 + help + The actual I2C address. Even for the same model of IC, the I2C address may be different, and confirmation based on the actual hardware connection is required. + + config ESP_PANEL_EXPANDER_I2C_CLK_HZ + depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + int "I2C clock frequency (Hz)" + default 400000 + range 1 400000 + + config ESP_PANEL_EXPANDER_I2C_SCL_PULLUP + depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + bool "Enable SCL Pull-up" + default y + + config ESP_PANEL_EXPANDER_I2C_SDA_PULLUP + depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + bool "Enable SDA Pull-up" + default y + + config ESP_PANEL_EXPANDER_I2C_IO_SCL + depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + int "SCL pin" + default 18 + range 0 100 + + config ESP_PANEL_EXPANDER_I2C_IO_SDA + depends on !ESP_PANEL_EXPANDER_BUS_SKIP_INIT_HOST + int "SDA pin" + default 8 + range 0 100 endmenu endmenu diff --git a/src/board/Kconfig.board_supported b/src/board/Kconfig.board_supported index 9ec20df7..6c73bf18 100644 --- a/src/board/Kconfig.board_supported +++ b/src/board/Kconfig.board_supported @@ -1,60 +1,58 @@ -menu "Supported board configurations" - choice - prompt "Select the manufacturer" - default BOARD_MANUFACTURER_ALL - - config BOARD_MANUFACTURER_ALL - bool "All" - help - Espressif, Elecrow, M5Stack, Shenzhen Jingcai Intelligent, Waveshare - - config BOARD_MANUFACTURER_ESPRESSIF - bool "Espressif" - help - https://www.espressif.com/en/products/devkits - - config BOARD_MANUFACTURER_ELECROW - bool "Elecrow" - help - https://www.elecrow.com - - config BOARD_MANUFACTURER_M5STACK - bool "M5Stack" - help - https://m5stack.com/ - - config BOARD_MANUFACTURER_JINGCAI - bool "Shenzhen Jingcai Intelligent" - help - https://www.displaysmodule.com/ - - config BOARD_MANUFACTURER_WAVESHARE - bool "Waveshare" - help - https://www.waveshare.com/ - endchoice - - choice - prompt "Select a target board" - - if BOARD_MANUFACTURER_ESPRESSIF || BOARD_MANUFACTURER_ALL - orsource "./espressif/Kconfig.espressif" - endif - - if BOARD_MANUFACTURER_ELECROW || BOARD_MANUFACTURER_ALL - orsource "./elecrow/Kconfig.elecrow" - endif - - if BOARD_MANUFACTURER_M5STACK || BOARD_MANUFACTURER_ALL - orsource "./m5stack/Kconfig.m5stack" - endif - - if BOARD_MANUFACTURER_JINGCAI || BOARD_MANUFACTURER_ALL - orsource "./jingcai/Kconfig.jingcai" - endif - - if BOARD_MANUFACTURER_WAVESHARE || BOARD_MANUFACTURER_ALL - orsource "./waveshare/Kconfig.waveshare" - endif - endchoice -endmenu +choice + prompt "Select the manufacturer" + default BOARD_MANUFACTURER_ALL + + config BOARD_MANUFACTURER_ALL + bool "All" + help + Espressif, Elecrow, M5Stack, Shenzhen Jingcai Intelligent, Waveshare + + config BOARD_MANUFACTURER_ESPRESSIF + bool "Espressif" + help + https://www.espressif.com/en/products/devkits + + config BOARD_MANUFACTURER_ELECROW + bool "Elecrow" + help + https://www.elecrow.com + + config BOARD_MANUFACTURER_M5STACK + bool "M5Stack" + help + https://m5stack.com/ + + config BOARD_MANUFACTURER_JINGCAI + bool "Shenzhen Jingcai Intelligent" + help + https://www.displaysmodule.com/ + + config BOARD_MANUFACTURER_WAVESHARE + bool "Waveshare" + help + https://www.waveshare.com/ +endchoice + +choice + prompt "Select a target board" + + if BOARD_MANUFACTURER_ESPRESSIF || BOARD_MANUFACTURER_ALL + orsource "./espressif/Kconfig.espressif" + endif + + if BOARD_MANUFACTURER_ELECROW || BOARD_MANUFACTURER_ALL + orsource "./elecrow/Kconfig.elecrow" + endif + + if BOARD_MANUFACTURER_M5STACK || BOARD_MANUFACTURER_ALL + orsource "./m5stack/Kconfig.m5stack" + endif + + if BOARD_MANUFACTURER_JINGCAI || BOARD_MANUFACTURER_ALL + orsource "./jingcai/Kconfig.jingcai" + endif + + if BOARD_MANUFACTURER_WAVESHARE || BOARD_MANUFACTURER_ALL + orsource "./waveshare/Kconfig.waveshare" + endif +endchoice diff --git a/test_apps/lcd/mipi_dsi/sdkconfig.defaults.esp32p4 b/test_apps/lcd/mipi_dsi/sdkconfig.defaults.esp32p4 index 85fd77f5..449e9636 100644 --- a/test_apps/lcd/mipi_dsi/sdkconfig.defaults.esp32p4 +++ b/test_apps/lcd/mipi_dsi/sdkconfig.defaults.esp32p4 @@ -1,5 +1,8 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_HEX=y CONFIG_SPIRAM_SPEED_200M=y CONFIG_SPIRAM_XIP_FROM_PSRAM=y + CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/test_apps/lvgl_port/main/test_app_main.cpp b/test_apps/lvgl_port/main/test_app_main.cpp index 50372fd5..5619888b 100644 --- a/test_apps/lvgl_port/main/test_app_main.cpp +++ b/test_apps/lvgl_port/main/test_app_main.cpp @@ -46,24 +46,26 @@ void tearDown(void) extern "C" void app_main(void) { /** - * _______ ______ __ __ ________ __ - * | \ / \ | \ | \| \| \ - * | $$$$$$$\| $$$$$$\| $$\ | $$| $$$$$$$$| $$ - * | $$__/ $$| $$__| $$| $$$\| $$| $$__ | $$ - * | $$ $$| $$ $$| $$$$\ $$| $$ \ | $$ - * | $$$$$$$ | $$$$$$$$| $$\$$ $$| $$$$$ | $$ - * | $$ | $$ | $$| $$ \$$$$| $$_____ | $$_____ - * | $$ | $$ | $$| $$ \$$$| $$ \| $$ \ - * \$$ \$$ \$$ \$$ \$$ \$$$$$$$$ \$$$$$$$$ + * __ __ __ ______ __ _______ ______ _______ ________ + * | \ | \ | \ / \ | \ | \ / \ | \| \ + * | $$ | $$ | $$| $$$$$$\| $$ | $$$$$$$\| $$$$$$\| $$$$$$$\\$$$$$$$$ + * | $$ | $$ | $$| $$ __\$$| $$ | $$__/ $$| $$ | $$| $$__| $$ | $$ + * | $$ \$$\ / $$| $$| \| $$ | $$ $$| $$ | $$| $$ $$ | $$ + * | $$ \$$\ $$ | $$ \$$$$| $$ | $$$$$$$ | $$ | $$| $$$$$$$\ | $$ + * | $$_____\$$ $$ | $$__| $$| $$_____ | $$ | $$__/ $$| $$ | $$ | $$ + * | $$ \\$$$ \$$ $$| $$ \ ______| $$ \$$ $$| $$ | $$ | $$ + * \$$$$$$$$ \$ \$$$$$$ \$$$$$$$$| \\$$ \$$$$$$ \$$ \$$ \$$ + * \$$$$$$ */ - printf(" _______ ______ __ __ ________ __\r\n"); - printf("| \\ / \\ | \\ | \\| \\| \\\r\n"); - printf("| $$$$$$$\\| $$$$$$\\| $$\\ | $$| $$$$$$$$| $$\r\n"); - printf("| $$__/ $$| $$__| $$| $$$\\| $$| $$__ | $$\r\n"); - printf("| $$ $$| $$ $$| $$$$\\ $$| $$ \\ | $$\r\n"); - printf("| $$$$$$$ | $$$$$$$$| $$\\$$ $$| $$$$$ | $$\r\n"); - printf("| $$ | $$ | $$| $$ \\$$$$| $$_____ | $$_____\r\n"); - printf("| $$ | $$ | $$| $$ \\$$$| $$ \\| $$ \\\r\n"); - printf(" \\$$ \\$$ \\$$ \\$$ \\$$ \\$$$$$$$$ \\$$$$$$$$\r\n"); + printf(" __ __ __ ______ __ _______ ______ _______ ________\r\n"); + printf("| \\ | \\ | \\ / \\ | \\ | \\ / \\ | \\| \\\r\n"); + printf("| $$ | $$ | $$| $$$$$$\\| $$ | $$$$$$$\\| $$$$$$\\| $$$$$$$\\\\$$$$$$$$\r\n"); + printf("| $$ | $$ | $$| $$ __\\$$| $$ | $$__/ $$| $$ | $$| $$__| $$ | $$\r\n"); + printf("| $$ \\$$\\ / $$| $$| \\| $$ | $$ $$| $$ | $$| $$ $$ | $$\r\n"); + printf("| $$ \\$$\\ $$ | $$ \\$$$$| $$ | $$$$$$$ | $$ | $$| $$$$$$$\\ | $$\r\n"); + printf("| $$_____\\$$ $$ | $$__| $$| $$_____ | $$ | $$__/ $$| $$ | $$ | $$\r\n"); + printf("| $$ \\\\$$$ \\$$ $$| $$ \\ ______| $$ \\$$ $$| $$ | $$ | $$\r\n"); + printf(" \\$$$$$$$$ \\$ \\$$$$$$ \\$$$$$$$$| \\\\$$ \\$$$$$$ \\$$ \\$$ \\$$\r\n"); + printf(" \\$$$$$$\r\n"); unity_run_menu(); } diff --git a/test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 b/test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 index 677bab1a..03ef541c 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 +++ b/test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ELECROW_CROWPANEL_7_0=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit index 59c9fe7a..fc1ce926 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit @@ -1,8 +1,3 @@ CONFIG_IDF_TARGET="esp32c3" -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_C3_LCDKIT=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board index a5815a9f..328e7230 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board @@ -1,15 +1,2 @@ CONFIG_IDF_TARGET="esp32p4" -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_P4_FUNCTION_EV_BOARD=y - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_HEX=y -CONFIG_SPIRAM_SPEED_200M=y -CONFIG_SPIRAM_XIP_FROM_PSRAM=y -CONFIG_IDF_EXPERIMENTAL_FEATURES=y - -# Improve FPS -CONFIG_CACHE_L2_CACHE_256KB=y -CONFIG_CACHE_L2_CACHE_LINE_128B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box index 4d6a2b7b..86907da1 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 index 05319b36..cdf4b6de 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_3=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta index e32d3c5f..0c593bf9 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_3_BETA=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite index df03890d..c921aeed 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_LITE=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye index 598da3d3..ccbfb8e8 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_EYE=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 index 05824538..2f606263 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 @@ -1,20 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_KORVO_2=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board index 85cb761b..0c378a4c 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 index 9496f02e..367c6347 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_2=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 index 62011779..0364ee45 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 index 5371fbc5..f02b235e 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_V1_5=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg index ec33415a..761cfdaf 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg +++ b/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg @@ -1,7 +1,2 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_USB_OTG=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 b/test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 index 4ea4f368..4834fbf4 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 +++ b/test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_4848S040C_I_Y_3=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 index 8f056a5d..d478ae7a 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 +++ b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 @@ -1,7 +1,2 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5CORE2=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 index e34a32a9..ed1628ef 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 +++ b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5CORES3=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial index 280f68c7..6ca00810 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial +++ b/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5DIAL=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 index bc98d906..d897a337 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 @@ -1,21 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -# lvgl -CONFIG_LV_COLOR_16_SWAP=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 index 41eb76ba..93c24a32 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 @@ -1,20 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 index d2a84d8c..1b12f330 100644 --- a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 @@ -1,19 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y - -CONFIG_LVGL_PORT_AVOID_TEARING_MODE_3=y diff --git a/test_apps/lvgl_port/sdkconfig.defaults b/test_apps/lvgl_port/sdkconfig.defaults index 13c81f79..fc968057 100644 --- a/test_apps/lvgl_port/sdkconfig.defaults +++ b/test_apps/lvgl_port/sdkconfig.defaults @@ -1,7 +1,12 @@ -CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y -CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_ESP_TASK_WDT_EN=n CONFIG_FREERTOS_HZ=1000 + +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y + +CONFIG_ESP_PANEL_USE_SUPPORTED_BOARD=y +CONFIG_BOARD_MANUFACTURER_ALL=y + CONFIG_LV_MEM_SIZE_KILOBYTES=60 CONFIG_LV_MEMCPY_MEMSET_STD=y CONFIG_LV_FONT_MONTSERRAT_12=y diff --git a/test_apps/lvgl_port/sdkconfig.defaults.esp32p4 b/test_apps/lvgl_port/sdkconfig.defaults.esp32p4 new file mode 100644 index 00000000..449e9636 --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.defaults.esp32p4 @@ -0,0 +1,8 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_HEX=y +CONFIG_SPIRAM_SPEED_200M=y +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/test_apps/lvgl_port/sdkconfig.defaults.esp32s3 b/test_apps/lvgl_port/sdkconfig.defaults.esp32s3 new file mode 100644 index 00000000..8770213f --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.defaults.esp32s3 @@ -0,0 +1,13 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_SPEED_80M=y +# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash +# For v5.2 and below +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y +# For v5.3 and above +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +# Used in conjunction with "RGB Bounce Buffer" +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 b/test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 index 0437db6f..03ef541c 100644 --- a/test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 +++ b/test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ELECROW_CROWPANEL_7_0=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit b/test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit index e887afa1..fc1ce926 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit @@ -1,4 +1,3 @@ CONFIG_IDF_TARGET="esp32c3" -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_C3_LCDKIT=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board b/test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board index c2a39505..328e7230 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board @@ -1,10 +1,2 @@ CONFIG_IDF_TARGET="esp32p4" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_P4_FUNCTION_EV_BOARD=y - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_HEX=y -CONFIG_SPIRAM_SPEED_200M=y -CONFIG_SPIRAM_XIP_FROM_PSRAM=y -CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box index 696c6d13..86907da1 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 index 7a0dd29e..cdf4b6de 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_3=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta index 66661b39..0c593bf9 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_3_BETA=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite index 882bada8..c921aeed 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_BOX_LITE=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye index 86f11b14..ccbfb8e8 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_EYE=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 index 1a5ad395..2f606263 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_KORVO_2=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board index 40c62318..0c378a4c 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 index 5ff41467..367c6347 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_2=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 index 4a519889..0364ee45 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 index 91766341..f02b235e 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_V1_5=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg index 9b984dca..761cfdaf 100644 --- a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg +++ b/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg @@ -1,4 +1,2 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_S3_USB_OTG=y diff --git a/test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 b/test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 index 58cab0c7..4834fbf4 100644 --- a/test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 +++ b/test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_ESP32_4848S040C_I_Y_3=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5core2 b/test_apps/panel/sdkconfig.ci.m5stack_m5core2 index 2ea44f44..d478ae7a 100644 --- a/test_apps/panel/sdkconfig.ci.m5stack_m5core2 +++ b/test_apps/panel/sdkconfig.ci.m5stack_m5core2 @@ -1,4 +1,2 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5CORE2=y diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5core3 b/test_apps/panel/sdkconfig.ci.m5stack_m5core3 index b19879d1..ed1628ef 100644 --- a/test_apps/panel/sdkconfig.ci.m5stack_m5core3 +++ b/test_apps/panel/sdkconfig.ci.m5stack_m5core3 @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5CORES3=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5dial b/test_apps/panel/sdkconfig.ci.m5stack_m5dial index f01a02e9..6ca00810 100644 --- a/test_apps/panel/sdkconfig.ci.m5stack_m5dial +++ b/test_apps/panel/sdkconfig.ci.m5stack_m5dial @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_M5STACK_M5DIAL=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 index 5c69a91c..d897a337 100644 --- a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 index 67dcc67b..93c24a32 100644 --- a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 @@ -1,18 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 index faac3260..1b12f330 100644 --- a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 @@ -1,17 +1,4 @@ CONFIG_IDF_TARGET="esp32s3" -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_BOARD_MANUFACTURER_ALL=y CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3=y -CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash -# For v5.2 and below -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y -# For v5.3 and above -CONFIG_SPIRAM_XIP_FROM_PSRAM=y - -# Used in conjunction with "RGB Bounce Buffer" -CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/panel/sdkconfig.defaults b/test_apps/panel/sdkconfig.defaults index 4f5a4441..9cba724d 100644 --- a/test_apps/panel/sdkconfig.defaults +++ b/test_apps/panel/sdkconfig.defaults @@ -1,2 +1,5 @@ CONFIG_ESP_TASK_WDT_EN=n CONFIG_FREERTOS_HZ=1000 + +CONFIG_ESP_PANEL_USE_SUPPORTED_BOARD=y +CONFIG_BOARD_MANUFACTURER_ALL=y diff --git a/test_apps/panel/sdkconfig.defaults.esp32p4 b/test_apps/panel/sdkconfig.defaults.esp32p4 new file mode 100644 index 00000000..449e9636 --- /dev/null +++ b/test_apps/panel/sdkconfig.defaults.esp32p4 @@ -0,0 +1,8 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_HEX=y +CONFIG_SPIRAM_SPEED_200M=y +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/test_apps/panel/sdkconfig.defaults.esp32s3 b/test_apps/panel/sdkconfig.defaults.esp32s3 new file mode 100644 index 00000000..8770213f --- /dev/null +++ b/test_apps/panel/sdkconfig.defaults.esp32s3 @@ -0,0 +1,13 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_SPEED_80M=y +# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash +# For v5.2 and below +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y +# For v5.3 and above +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +# Used in conjunction with "RGB Bounce Buffer" +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y From 8cd6bf94a71576f0bb243d915dab1d8e9dc4af47 Mon Sep 17 00:00:00 2001 From: H-sw123 <1150857014@qq.com> Date: Thu, 14 Nov 2024 15:01:36 +0800 Subject: [PATCH 4/6] feat(board): add board Waveshare ESP32-S3-Touch-LCD-4.3B/5/5B/7 @H-sw123 (#124) --- CHANGELOG.md | 1 + ESP_Panel_Board_Supported.h | 14 +- README.md | 2 +- README_CN.md | 2 +- docs/Board_Instructions.md | 12 +- .../v8/Porting/ESP_Panel_Board_Supported.h | 14 +- .../v8/Rotation/ESP_Panel_Board_Supported.h | 14 +- .../PanelTest/ESP_Panel_Board_Supported.h | 14 +- .../src/ESP_Panel_Board_Supported.h | 14 +- .../v8/Porting/ESP_Panel_Board_Supported.h | 14 +- .../v8/WiFiClock/ESP_Panel_Board_Supported.h | 14 +- library.properties | 2 +- src/ESP_Panel_Board_Kconfig.h | 30 +- src/board/ESP_PanelBoard.h | 18 +- src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h | 4 +- .../waveshare/ESP32_S3_Touch_LCD_4_3_B.h | 273 ++++++++++++++++++ src/board/waveshare/ESP32_S3_Touch_LCD_5.h | 273 ++++++++++++++++++ src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h | 273 ++++++++++++++++++ src/board/waveshare/ESP32_S3_Touch_LCD_7.h | 273 ++++++++++++++++++ src/board/waveshare/Kconfig.waveshare | 29 +- ...nfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b | 4 + ...dkconfig.ci.waveshare_esp32_s3_touch_lcd_5 | 4 + ...config.ci.waveshare_esp32_s3_touch_lcd_5_B | 4 + ...dkconfig.ci.waveshare_esp32_s3_touch_lcd_7 | 4 + ...nfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b | 4 + ...dkconfig.ci.waveshare_esp32_s3_touch_lcd_5 | 4 + ...config.ci.waveshare_esp32_s3_touch_lcd_5_B | 4 + ...dkconfig.ci.waveshare_esp32_s3_touch_lcd_7 | 4 + 28 files changed, 1274 insertions(+), 48 deletions(-) create mode 100644 src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h create mode 100644 src/board/waveshare/ESP32_S3_Touch_LCD_5.h create mode 100644 src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h create mode 100644 src/board/waveshare/ESP32_S3_Touch_LCD_7.h create mode 100644 test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b create mode 100644 test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 create mode 100644 test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B create mode 100644 test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 create mode 100644 test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b create mode 100644 test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 create mode 100644 test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B create mode 100644 test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 diff --git a/CHANGELOG.md b/CHANGELOG.md index abbc53f8..4881a86d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * feat(lcd): add LCD controller JD9365 @Y1hsiaochunnn (#123) * feat(board): add board Waveshare ESP32-P4-NANO @Y1hsiaochunnn (#123) +* feat(board): add board Waveshare ESP32-S3-Touch-LCD-4.3B/5/5B/7 @H-sw123 (#124) * feat(board): add configuration for ignoring board in Kconfig ## v0.2.0 - 2024-11-08 diff --git a/ESP_Panel_Board_Supported.h b/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/ESP_Panel_Board_Supported.h +++ b/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/README.md b/README.md index 88bd1b46..91b0650e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Below is the list of [Supported Development Boards](docs/Board_Instructions.md): | [Elecrow](docs/Board_Instructions.md#elecrow) | CrowPanel 7.0" | | [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 | | [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 | -| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-P4-NANO | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-4.3B, ESP32-S3-Touch-LCD-5, ESP32-S3-Touch-LCD-5B, ESP32-S3-Touch-LCD-7, ESP32-P4-NANO | Developers and manufacturers are welcome to contribute PRs to add more boards. For details, please refer to the [Board Contribution Guide](./docs/Board_Contribution_Guide.md). diff --git a/README_CN.md b/README_CN.md index f647e037..9a0bbef3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -40,7 +40,7 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性: | [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 | | [Elecrow](docs/Board_Instructions.md#elecrow) | CrowPanel 7.0" | | [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 | -| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-P4-NANO | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-4.3B, ESP32-S3-Touch-LCD-5, ESP32-S3-Touch-LCD-5B, ESP32-S3-Touch-LCD-7, ESP32-P4-NANO | 欢迎开发者和厂商贡献 PR 来添加更多的开发板,详细说明请参考 [`开发板贡献指南`](./docs/Board_Contribution_Guide_CN.md)。 diff --git a/docs/Board_Instructions.md b/docs/Board_Instructions.md index 3262673d..de2f6618 100644 --- a/docs/Board_Instructions.md +++ b/docs/Board_Instructions.md @@ -43,9 +43,13 @@ | **Picture** | **Name** | **LCD Bus** | **LCD Controller** | **LCD resolution** | **Touch Bus** | **Touch Controller** | | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :--------------: | :----------------: | ------------------ | :-----------: | :------------------: | -| | [ESP32-S3-Touch-LCD-4.3](https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm) | RGB | ST7262 | 800x480 | I2C | GT911 | | | [ESP32-S3-Touch-LCD-1.85](https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm) | QSPI | ST77916 | 360x360 | I2C | CST816 | -| | [ESP32-S3-Touch-LCD-1.85](https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm) | RGB | ST7701 | 480x480 | I2C | CST820 (CST816-like) | +| | [ESP32-S3-Touch-LCD-2.1](https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm) | RGB | ST7701 | 480x480 | I2C | CST820 (CST816-like) | +| | [ESP32-S3-Touch-LCD-4.3](https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm) | RGB | ST7262 | 800x480 | I2C | GT911 | +| | [ESP32-S3-Touch-LCD-4.3B](https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm) | RGB | ST7262 | 800x480 | I2C | GT911 | +| | [ESP32-S3-Touch-LCD-5](https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117) | RGB | ST7262 | 800x480 | I2C | GT911 | +| | [ESP32-S3-Touch-LCD-5B](https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151) | RGB | ST7262 | 1024x600 | I2C | GT911 | +| | [ESP32-S3-Touch-LCD-7](https://www.waveshare.com/esp32-s3-touch-lcd-7.htm) | RGB | ST7262 | 800x480 | I2C | GT911 | | | [ESP32-P4-NANO](https://www.waveshare.com/esp32-p4-nano.htm) | MIPI-DSI | JD9365 | 800x1280 | I2C | GT9271 (GT911-like) | ## Recommended Configurations in the Arduino IDE @@ -73,6 +77,10 @@ Below are recommended configurations for developing GUI applications on differen | Waveshare-ESP32-S3-Touch-LCD-1.85 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | | Waveshare-ESP32-S3-Touch-LCD-2.1 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | | Waveshare-ESP32-S3-Touch-LCD-4.3 | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | 8M with spiffs | +| Waveshare-ESP32-S3-Touch-LCD-4.3B | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-5 | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-5B | ESP32S3 Dev Module | OPI | QIO 80MHz | 16MB | Enabled | 16M Flash (3MB) | +| Waveshare-ESP32-S3-Touch-LCD-7 | ESP32S3 Dev Module | OPI | QIO 80MHz | 8MB | Disabled | 8M with spiffs | | Waveshare-ESP32-P4-NANO | ESP32P4 Dev Module | Enabled | QIO | 16MB | Disabled | 16M Flash (3MB) | **Notes:** diff --git a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h +++ b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h +++ b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h index 2f930b76..ba8fba0f 100644 --- a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h @@ -79,18 +79,24 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 + * - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm * - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm - * */ -// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 // #define BOARD_WAVESHARE_ESP32_P4_NANO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/library.properties b/library.properties index d9ba9db9..029f29f8 100644 --- a/library.properties +++ b/library.properties @@ -3,7 +3,7 @@ version=0.2.1 author=espressif maintainer=espressif sentence=ESP32_Display_Panel is a library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. -paragraph=Currently supported boards:ESP32-C3-LCDkit,ESP32-S3-BOX,ESP32-S3-BOX-3,ESP32-S3-BOX-3B,ESP32-S3-BOX-3(beta),ESP32-S3-BOX-Lite,ESP32-S3-EYE,ESP32-S3-Korvo-2,ESP32-S3-LCD-EV-Board,ESP32-S3-LCD-EV-Board-2,ESP32-S3-USB-OTG,ESP32-P4-Function-EV-Board,M5STACK-M5CORE2,M5STACK-M5DIAL,M5STACK-M5CORES3,ESP32-4848S040C_I_Y_3,ESP32-S3-Touch-LCD-4.3,ESP32-S3-Touch-LCD-1.85,ESP32-S3-Touch-LCD-2.1,ESP32-P4-NANO. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB,MIPI-DSI. Currently supported LCD controllers: EK9716B,EK79007,GC9A01,GC9B71,GC9503,ILI9341,ILI9881C,JD9365,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046. +paragraph=Currently supported board manufacturers: Espressif,M5Stack,Waveshare,Elecrow,Jingcai. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB,MIPI-DSI. Currently supported LCD controllers: EK9716B,EK79007,GC9A01,GC9B71,GC9503,ILI9341,ILI9881C,JD9365,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046. category=Other architectures=esp32 url=https://github.com/esp-arduino-libs/ESP32_Display_Panel diff --git a/src/ESP_Panel_Board_Kconfig.h b/src/ESP_Panel_Board_Kconfig.h index 40a1376c..43a37f20 100644 --- a/src/ESP_Panel_Board_Kconfig.h +++ b/src/ESP_Panel_Board_Kconfig.h @@ -130,11 +130,6 @@ #endif #endif // Waveshare - #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 - #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 - #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 - #endif - #endif #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 @@ -145,6 +140,31 @@ #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 #endif #endif + #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 + #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 + #endif + #endif + #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B + #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B + #endif + #endif + #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 + #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 + #endif + #endif + #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B + #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B + #endif + #endif + #ifndef BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 + #ifdef CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 + #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 + #endif + #endif #ifndef BOARD_WAVESHARE_ESP32_P4_NANO #ifdef CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO #define BOARD_WAVESHARE_ESP32_P4_NANO CONFIG_BOARD_WAVESHARE_ESP32_P4_NANO diff --git a/src/board/ESP_PanelBoard.h b/src/board/ESP_PanelBoard.h index 950bbf8e..234f83b0 100644 --- a/src/board/ESP_PanelBoard.h +++ b/src/board/ESP_PanelBoard.h @@ -33,9 +33,13 @@ /* JingCai */ \ + defined(BOARD_ESP32_4848S040C_I_Y_3) \ /* Waveshare */ \ - + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) \ + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85) \ + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1) \ + + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) \ + + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B) \ + + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5) \ + + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B) \ + + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7) \ + defined(BOARD_WAVESHARE_ESP32_P4_NANO) \ > 1 #error "Multiple boards enabled! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." @@ -83,12 +87,20 @@ #elif defined(BOARD_ESP32_4848S040C_I_Y_3) #include "board/jingcai/ESP32_4848S040C_I_Y_3.h" /* Waveshare */ -#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) - #include "board/waveshare/ESP32_S3_Touch_LCD_4_3.h" #elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85) #include "board/waveshare/ESP32_S3_Touch_LCD_1_85.h" #elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1) #include "board/waveshare/ESP32_S3_Touch_LCD_2_1.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) + #include "board/waveshare/ESP32_S3_Touch_LCD_4_3.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B) + #include "board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5) + #include "board/waveshare/ESP32_S3_Touch_LCD_5.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B) + #include "board/waveshare/ESP32_S3_Touch_LCD_5_B.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7) + #include "board/waveshare/ESP32_S3_Touch_LCD_7.h" #elif defined(BOARD_WAVESHARE_ESP32_P4_NANO) #include "board/waveshare/ESP32_P4_NANO.h" #else 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 ecea5576..c6708dcd 100644 --- a/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h @@ -133,7 +133,7 @@ /* LCD Color Settings */ /* LCD color depth in bits */ -#define ESP_PANEL_LCD_COLOR_BITS (18) // 8/16/18/24 +#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24 /* * LCD RGB Element Order. Choose one of the following: * - 0: RGB @@ -251,7 +251,7 @@ // Typically set to 400K #define ESP_PANEL_EXPANDER_I2C_SCL_PULLUP (1) // 0/1 #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (1) // 0/1 - #define ESP_PANEL_EXPANDER_I2C_IO_SCL (18) + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (9) #define ESP_PANEL_EXPANDER_I2C_IO_SDA (8) #endif #endif /* ESP_PANEL_USE_EXPANDER */ 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 new file mode 100644 index 00000000..c6708dcd --- /dev/null +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3_B.h @@ -0,0 +1,273 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// *INDENT-OFF* + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the LCD panel ///////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an LCD panel */ +#define ESP_PANEL_USE_LCD (1) // 0/1 + +#if ESP_PANEL_USE_LCD +/** + * LCD Controller Name + */ +#define ESP_PANEL_LCD_NAME ST7262 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (800) +#define ESP_PANEL_LCD_HEIGHT (480) + +/* LCD Bus Settings */ +/** + * If set to 1, the bus 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_LCD_BUS_SKIP_INIT_HOST (1) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_RGB) +/** + * LCD Bus Parameters. + * + * Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and + * https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details. + * + */ +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_RGB + + #define ESP_PANEL_LCD_RGB_CLK_HZ (16 * 1000 * 1000) + #define ESP_PANEL_LCD_RGB_HPW (4) + #define ESP_PANEL_LCD_RGB_HBP (8) + #define ESP_PANEL_LCD_RGB_HFP (8) + #define ESP_PANEL_LCD_RGB_VPW (4) + #define ESP_PANEL_LCD_RGB_VBP (8) + #define ESP_PANEL_LCD_RGB_VFP (8) + #define ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG (1) // 0: rising edge, 1: falling edge + + // | 8-bit RGB888 | 16-bit RGB565 | + // |--------------|---------------| + #define ESP_PANEL_LCD_RGB_DATA_WIDTH (16) // | 8 | 16 | + #define ESP_PANEL_LCD_RGB_PIXEL_BITS (16) // | 24 | 16 | + + #define ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE (ESP_PANEL_LCD_WIDTH * 10) // Bounce buffer size in bytes. This function is used to avoid screen drift. + // To enable the bounce buffer, set it to a non-zero value. Typically set to `ESP_PANEL_LCD_WIDTH * 10` + // The size of the Bounce Buffer must satisfy `width_of_lcd * height_of_lcd = size_of_buffer * N`, + // where N is an even number. + #define ESP_PANEL_LCD_RGB_IO_HSYNC (46) + #define ESP_PANEL_LCD_RGB_IO_VSYNC (3) + #define ESP_PANEL_LCD_RGB_IO_DE (5) // -1 if not used + #define ESP_PANEL_LCD_RGB_IO_PCLK (7) + #define ESP_PANEL_LCD_RGB_IO_DISP (-1) // -1 if not used + + // | RGB565 | RGB666 | RGB888 | + // |--------|--------|--------| + #define ESP_PANEL_LCD_RGB_IO_DATA0 (14) // | B0 | B0-1 | B0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA1 (38) // | B1 | B2 | B4 | + #define ESP_PANEL_LCD_RGB_IO_DATA2 (18) // | B2 | B3 | B5 | + #define ESP_PANEL_LCD_RGB_IO_DATA3 (17) // | B3 | B4 | B6 | + #define ESP_PANEL_LCD_RGB_IO_DATA4 (10) // | B4 | B5 | B7 | + #define ESP_PANEL_LCD_RGB_IO_DATA5 (39) // | G0 | G0 | G0-2 | + #define ESP_PANEL_LCD_RGB_IO_DATA6 (0) // | G1 | G1 | G3 | + #define ESP_PANEL_LCD_RGB_IO_DATA7 (45) // | G2 | G2 | G4 | +#if ESP_PANEL_LCD_RGB_DATA_WIDTH > 8 + #define ESP_PANEL_LCD_RGB_IO_DATA8 (48) // | G3 | G3 | G5 | + #define ESP_PANEL_LCD_RGB_IO_DATA9 (47) // | G4 | G4 | G6 | + #define ESP_PANEL_LCD_RGB_IO_DATA10 (21) // | G5 | G5 | G7 | + #define ESP_PANEL_LCD_RGB_IO_DATA11 (1) // | R0 | R0-1 | R0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA12 (2) // | R1 | R2 | R4 | + #define ESP_PANEL_LCD_RGB_IO_DATA13 (42) // | R2 | R3 | R5 | + #define ESP_PANEL_LCD_RGB_IO_DATA14 (41) // | R3 | R4 | R6 | + #define ESP_PANEL_LCD_RGB_IO_DATA15 (40) // | R4 | R5 | R7 | +#endif +#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + #define ESP_PANEL_LCD_3WIRE_SPI_IO_CS (0) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SCK (1) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SDA (2) + #define ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_ACTIVE_EDGE (0) // 0: rising edge, 1: falling edge + #define ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO (0) // Delete the panel IO instance automatically if set to 1. + // If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, + // Please set it to 1 to release the panel IO and its pins (except CS signal). + #define ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD (!ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO) + // The `mirror()` function will be implemented by LCD command if set to 1. +#endif + +#endif /* ESP_PANEL_LCD_BUS_TYPE */ + +/** + * LCD Vendor Initialization Commands. + * + * Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for + * initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver + * will use the default initialization sequence code. + * + * There are two formats for the sequence code: + * 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms} + * 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and + * ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command) + */ +/* +#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \ + { \ + {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \ + {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \ + {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \ + {0x29, (uint8_t []){0x00}, 0, 120}, \ + or \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \ + ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \ + } +*/ + +/* LCD Color Settings */ +/* LCD color depth in bits */ +#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24 +/* + * LCD RGB Element Order. Choose one of the following: + * - 0: RGB + * - 1: BGR + */ +#define ESP_PANEL_LCD_BGR_ORDER (0) // 0/1 +#define ESP_PANEL_LCD_INEVRT_COLOR (0) // 0/1 + +/* LCD Transformation Flags */ +#define ESP_PANEL_LCD_SWAP_XY (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_X (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1 + +/* LCD Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#define ESP_PANEL_LCD_IO_RST (-1) +#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_LCD */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the touch panel /////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an touch panel */ +#define ESP_PANEL_USE_TOUCH (1) // 0/1 +#if ESP_PANEL_USE_TOUCH +/** + * Touch controller name + */ +#define ESP_PANEL_TOUCH_NAME GT911 + +/* Touch resolution in pixels */ +#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD +#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD + +/* Touch Panel Bus Settings */ +/** + * If set to 1, the bus 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_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * Touch panel bus type + */ +#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C) +/* Touch panel bus parameters */ +#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C + + #define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // For GT911, there are two addresses: 0x5D(default) and 0x14 +#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + #define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_IO_SCL (9) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (8) +#endif + +#endif /* ESP_PANEL_TOUCH_BUS_TYPE */ + +/* Touch Transformation Flags */ +#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_X (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1 + +/* Touch Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#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_INT_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_TOUCH */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the backlight //////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define ESP_PANEL_USE_BACKLIGHT (0) // 0/1 +#if ESP_PANEL_USE_BACKLIGHT +/* IO num of backlight pin */ +#define ESP_PANEL_BACKLIGHT_IO (-1) +#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level + +/* Set to 1 if turn off the backlight after initializing the panel; otherwise, set it to turn on */ +#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off + +/* Set to 1 if use PWM for brightness control */ +#define ESP_PANEL_LCD_BL_USE_PWM (0) // 0/1 +#endif /* ESP_PANEL_USE_BACKLIGHT */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the IO expander ////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 0 if not using IO Expander */ +#define ESP_PANEL_USE_EXPANDER (1) // 0/1 +#if ESP_PANEL_USE_EXPANDER +/** + * IO expander name. + */ +#define ESP_PANEL_EXPANDER_NAME CH422G + +/* IO expander Settings */ +/** + * 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 +/* IO expander parameters */ +#define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 +#define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) +#if !ESP_PANEL_EXPANDER_SKIP_INIT_HOST + #define ESP_PANEL_EXPANDER_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_EXPANDER_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (9) + #define ESP_PANEL_EXPANDER_I2C_IO_SDA (8) +#endif +#endif /* ESP_PANEL_USE_EXPANDER */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// 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_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 ) + +// *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_5.h b/src/board/waveshare/ESP32_S3_Touch_LCD_5.h new file mode 100644 index 00000000..c6708dcd --- /dev/null +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_5.h @@ -0,0 +1,273 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// *INDENT-OFF* + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the LCD panel ///////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an LCD panel */ +#define ESP_PANEL_USE_LCD (1) // 0/1 + +#if ESP_PANEL_USE_LCD +/** + * LCD Controller Name + */ +#define ESP_PANEL_LCD_NAME ST7262 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (800) +#define ESP_PANEL_LCD_HEIGHT (480) + +/* LCD Bus Settings */ +/** + * If set to 1, the bus 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_LCD_BUS_SKIP_INIT_HOST (1) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_RGB) +/** + * LCD Bus Parameters. + * + * Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and + * https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details. + * + */ +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_RGB + + #define ESP_PANEL_LCD_RGB_CLK_HZ (16 * 1000 * 1000) + #define ESP_PANEL_LCD_RGB_HPW (4) + #define ESP_PANEL_LCD_RGB_HBP (8) + #define ESP_PANEL_LCD_RGB_HFP (8) + #define ESP_PANEL_LCD_RGB_VPW (4) + #define ESP_PANEL_LCD_RGB_VBP (8) + #define ESP_PANEL_LCD_RGB_VFP (8) + #define ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG (1) // 0: rising edge, 1: falling edge + + // | 8-bit RGB888 | 16-bit RGB565 | + // |--------------|---------------| + #define ESP_PANEL_LCD_RGB_DATA_WIDTH (16) // | 8 | 16 | + #define ESP_PANEL_LCD_RGB_PIXEL_BITS (16) // | 24 | 16 | + + #define ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE (ESP_PANEL_LCD_WIDTH * 10) // Bounce buffer size in bytes. This function is used to avoid screen drift. + // To enable the bounce buffer, set it to a non-zero value. Typically set to `ESP_PANEL_LCD_WIDTH * 10` + // The size of the Bounce Buffer must satisfy `width_of_lcd * height_of_lcd = size_of_buffer * N`, + // where N is an even number. + #define ESP_PANEL_LCD_RGB_IO_HSYNC (46) + #define ESP_PANEL_LCD_RGB_IO_VSYNC (3) + #define ESP_PANEL_LCD_RGB_IO_DE (5) // -1 if not used + #define ESP_PANEL_LCD_RGB_IO_PCLK (7) + #define ESP_PANEL_LCD_RGB_IO_DISP (-1) // -1 if not used + + // | RGB565 | RGB666 | RGB888 | + // |--------|--------|--------| + #define ESP_PANEL_LCD_RGB_IO_DATA0 (14) // | B0 | B0-1 | B0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA1 (38) // | B1 | B2 | B4 | + #define ESP_PANEL_LCD_RGB_IO_DATA2 (18) // | B2 | B3 | B5 | + #define ESP_PANEL_LCD_RGB_IO_DATA3 (17) // | B3 | B4 | B6 | + #define ESP_PANEL_LCD_RGB_IO_DATA4 (10) // | B4 | B5 | B7 | + #define ESP_PANEL_LCD_RGB_IO_DATA5 (39) // | G0 | G0 | G0-2 | + #define ESP_PANEL_LCD_RGB_IO_DATA6 (0) // | G1 | G1 | G3 | + #define ESP_PANEL_LCD_RGB_IO_DATA7 (45) // | G2 | G2 | G4 | +#if ESP_PANEL_LCD_RGB_DATA_WIDTH > 8 + #define ESP_PANEL_LCD_RGB_IO_DATA8 (48) // | G3 | G3 | G5 | + #define ESP_PANEL_LCD_RGB_IO_DATA9 (47) // | G4 | G4 | G6 | + #define ESP_PANEL_LCD_RGB_IO_DATA10 (21) // | G5 | G5 | G7 | + #define ESP_PANEL_LCD_RGB_IO_DATA11 (1) // | R0 | R0-1 | R0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA12 (2) // | R1 | R2 | R4 | + #define ESP_PANEL_LCD_RGB_IO_DATA13 (42) // | R2 | R3 | R5 | + #define ESP_PANEL_LCD_RGB_IO_DATA14 (41) // | R3 | R4 | R6 | + #define ESP_PANEL_LCD_RGB_IO_DATA15 (40) // | R4 | R5 | R7 | +#endif +#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + #define ESP_PANEL_LCD_3WIRE_SPI_IO_CS (0) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SCK (1) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SDA (2) + #define ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_ACTIVE_EDGE (0) // 0: rising edge, 1: falling edge + #define ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO (0) // Delete the panel IO instance automatically if set to 1. + // If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, + // Please set it to 1 to release the panel IO and its pins (except CS signal). + #define ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD (!ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO) + // The `mirror()` function will be implemented by LCD command if set to 1. +#endif + +#endif /* ESP_PANEL_LCD_BUS_TYPE */ + +/** + * LCD Vendor Initialization Commands. + * + * Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for + * initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver + * will use the default initialization sequence code. + * + * There are two formats for the sequence code: + * 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms} + * 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and + * ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command) + */ +/* +#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \ + { \ + {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \ + {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \ + {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \ + {0x29, (uint8_t []){0x00}, 0, 120}, \ + or \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \ + ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \ + } +*/ + +/* LCD Color Settings */ +/* LCD color depth in bits */ +#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24 +/* + * LCD RGB Element Order. Choose one of the following: + * - 0: RGB + * - 1: BGR + */ +#define ESP_PANEL_LCD_BGR_ORDER (0) // 0/1 +#define ESP_PANEL_LCD_INEVRT_COLOR (0) // 0/1 + +/* LCD Transformation Flags */ +#define ESP_PANEL_LCD_SWAP_XY (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_X (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1 + +/* LCD Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#define ESP_PANEL_LCD_IO_RST (-1) +#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_LCD */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the touch panel /////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an touch panel */ +#define ESP_PANEL_USE_TOUCH (1) // 0/1 +#if ESP_PANEL_USE_TOUCH +/** + * Touch controller name + */ +#define ESP_PANEL_TOUCH_NAME GT911 + +/* Touch resolution in pixels */ +#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD +#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD + +/* Touch Panel Bus Settings */ +/** + * If set to 1, the bus 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_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * Touch panel bus type + */ +#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C) +/* Touch panel bus parameters */ +#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C + + #define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // For GT911, there are two addresses: 0x5D(default) and 0x14 +#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + #define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_IO_SCL (9) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (8) +#endif + +#endif /* ESP_PANEL_TOUCH_BUS_TYPE */ + +/* Touch Transformation Flags */ +#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_X (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1 + +/* Touch Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#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_INT_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_TOUCH */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the backlight //////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define ESP_PANEL_USE_BACKLIGHT (0) // 0/1 +#if ESP_PANEL_USE_BACKLIGHT +/* IO num of backlight pin */ +#define ESP_PANEL_BACKLIGHT_IO (-1) +#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level + +/* Set to 1 if turn off the backlight after initializing the panel; otherwise, set it to turn on */ +#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off + +/* Set to 1 if use PWM for brightness control */ +#define ESP_PANEL_LCD_BL_USE_PWM (0) // 0/1 +#endif /* ESP_PANEL_USE_BACKLIGHT */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the IO expander ////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 0 if not using IO Expander */ +#define ESP_PANEL_USE_EXPANDER (1) // 0/1 +#if ESP_PANEL_USE_EXPANDER +/** + * IO expander name. + */ +#define ESP_PANEL_EXPANDER_NAME CH422G + +/* IO expander Settings */ +/** + * 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 +/* IO expander parameters */ +#define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 +#define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) +#if !ESP_PANEL_EXPANDER_SKIP_INIT_HOST + #define ESP_PANEL_EXPANDER_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_EXPANDER_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (9) + #define ESP_PANEL_EXPANDER_I2C_IO_SDA (8) +#endif +#endif /* ESP_PANEL_USE_EXPANDER */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// 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_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 ) + +// *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h b/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h new file mode 100644 index 00000000..63bd5cbe --- /dev/null +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_5_B.h @@ -0,0 +1,273 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// *INDENT-OFF* + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the LCD panel ///////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an LCD panel */ +#define ESP_PANEL_USE_LCD (1) // 0/1 + +#if ESP_PANEL_USE_LCD +/** + * LCD Controller Name + */ +#define ESP_PANEL_LCD_NAME ST7262 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (1024) +#define ESP_PANEL_LCD_HEIGHT (600) + +/* LCD Bus Settings */ +/** + * If set to 1, the bus 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_LCD_BUS_SKIP_INIT_HOST (1) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_RGB) +/** + * LCD Bus Parameters. + * + * Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and + * https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details. + * + */ +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_RGB + + #define ESP_PANEL_LCD_RGB_CLK_HZ (21 * 1000 * 1000) + #define ESP_PANEL_LCD_RGB_HPW (24) + #define ESP_PANEL_LCD_RGB_HBP (160) + #define ESP_PANEL_LCD_RGB_HFP (160) + #define ESP_PANEL_LCD_RGB_VPW (2) + #define ESP_PANEL_LCD_RGB_VBP (23) + #define ESP_PANEL_LCD_RGB_VFP (12) + #define ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG (1) // 0: rising edge, 1: falling edge + + // | 8-bit RGB888 | 16-bit RGB565 | + // |--------------|---------------| + #define ESP_PANEL_LCD_RGB_DATA_WIDTH (16) // | 8 | 16 | + #define ESP_PANEL_LCD_RGB_PIXEL_BITS (16) // | 24 | 16 | + + #define ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE (ESP_PANEL_LCD_WIDTH * 10) // Bounce buffer size in bytes. This function is used to avoid screen drift. + // To enable the bounce buffer, set it to a non-zero value. Typically set to `ESP_PANEL_LCD_WIDTH * 10` + // The size of the Bounce Buffer must satisfy `width_of_lcd * height_of_lcd = size_of_buffer * N`, + // where N is an even number. + #define ESP_PANEL_LCD_RGB_IO_HSYNC (46) + #define ESP_PANEL_LCD_RGB_IO_VSYNC (3) + #define ESP_PANEL_LCD_RGB_IO_DE (5) // -1 if not used + #define ESP_PANEL_LCD_RGB_IO_PCLK (7) + #define ESP_PANEL_LCD_RGB_IO_DISP (-1) // -1 if not used + + // | RGB565 | RGB666 | RGB888 | + // |--------|--------|--------| + #define ESP_PANEL_LCD_RGB_IO_DATA0 (14) // | B0 | B0-1 | B0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA1 (38) // | B1 | B2 | B4 | + #define ESP_PANEL_LCD_RGB_IO_DATA2 (18) // | B2 | B3 | B5 | + #define ESP_PANEL_LCD_RGB_IO_DATA3 (17) // | B3 | B4 | B6 | + #define ESP_PANEL_LCD_RGB_IO_DATA4 (10) // | B4 | B5 | B7 | + #define ESP_PANEL_LCD_RGB_IO_DATA5 (39) // | G0 | G0 | G0-2 | + #define ESP_PANEL_LCD_RGB_IO_DATA6 (0) // | G1 | G1 | G3 | + #define ESP_PANEL_LCD_RGB_IO_DATA7 (45) // | G2 | G2 | G4 | +#if ESP_PANEL_LCD_RGB_DATA_WIDTH > 8 + #define ESP_PANEL_LCD_RGB_IO_DATA8 (48) // | G3 | G3 | G5 | + #define ESP_PANEL_LCD_RGB_IO_DATA9 (47) // | G4 | G4 | G6 | + #define ESP_PANEL_LCD_RGB_IO_DATA10 (21) // | G5 | G5 | G7 | + #define ESP_PANEL_LCD_RGB_IO_DATA11 (1) // | R0 | R0-1 | R0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA12 (2) // | R1 | R2 | R4 | + #define ESP_PANEL_LCD_RGB_IO_DATA13 (42) // | R2 | R3 | R5 | + #define ESP_PANEL_LCD_RGB_IO_DATA14 (41) // | R3 | R4 | R6 | + #define ESP_PANEL_LCD_RGB_IO_DATA15 (40) // | R4 | R5 | R7 | +#endif +#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + #define ESP_PANEL_LCD_3WIRE_SPI_IO_CS (0) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SCK (1) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SDA (2) + #define ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_ACTIVE_EDGE (0) // 0: rising edge, 1: falling edge + #define ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO (0) // Delete the panel IO instance automatically if set to 1. + // If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, + // Please set it to 1 to release the panel IO and its pins (except CS signal). + #define ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD (!ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO) + // The `mirror()` function will be implemented by LCD command if set to 1. +#endif + +#endif /* ESP_PANEL_LCD_BUS_TYPE */ + +/** + * LCD Vendor Initialization Commands. + * + * Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for + * initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver + * will use the default initialization sequence code. + * + * There are two formats for the sequence code: + * 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms} + * 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and + * ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command) + */ +/* +#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \ + { \ + {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \ + {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \ + {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \ + {0x29, (uint8_t []){0x00}, 0, 120}, \ + or \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \ + ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \ + } +*/ + +/* LCD Color Settings */ +/* LCD color depth in bits */ +#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24 +/* + * LCD RGB Element Order. Choose one of the following: + * - 0: RGB + * - 1: BGR + */ +#define ESP_PANEL_LCD_BGR_ORDER (0) // 0/1 +#define ESP_PANEL_LCD_INEVRT_COLOR (0) // 0/1 + +/* LCD Transformation Flags */ +#define ESP_PANEL_LCD_SWAP_XY (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_X (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1 + +/* LCD Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#define ESP_PANEL_LCD_IO_RST (-1) +#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_LCD */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the touch panel /////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an touch panel */ +#define ESP_PANEL_USE_TOUCH (1) // 0/1 +#if ESP_PANEL_USE_TOUCH +/** + * Touch controller name + */ +#define ESP_PANEL_TOUCH_NAME GT911 + +/* Touch resolution in pixels */ +#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD +#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD + +/* Touch Panel Bus Settings */ +/** + * If set to 1, the bus 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_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * Touch panel bus type + */ +#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C) +/* Touch panel bus parameters */ +#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C + + #define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // For GT911, there are two addresses: 0x5D(default) and 0x14 +#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + #define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_IO_SCL (9) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (8) +#endif + +#endif /* ESP_PANEL_TOUCH_BUS_TYPE */ + +/* Touch Transformation Flags */ +#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_X (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1 + +/* Touch Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#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_INT_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_TOUCH */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the backlight //////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define ESP_PANEL_USE_BACKLIGHT (0) // 0/1 +#if ESP_PANEL_USE_BACKLIGHT +/* IO num of backlight pin */ +#define ESP_PANEL_BACKLIGHT_IO (-1) +#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level + +/* Set to 1 if turn off the backlight after initializing the panel; otherwise, set it to turn on */ +#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off + +/* Set to 1 if use PWM for brightness control */ +#define ESP_PANEL_LCD_BL_USE_PWM (0) // 0/1 +#endif /* ESP_PANEL_USE_BACKLIGHT */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the IO expander ////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 0 if not using IO Expander */ +#define ESP_PANEL_USE_EXPANDER (1) // 0/1 +#if ESP_PANEL_USE_EXPANDER +/** + * IO expander name. + */ +#define ESP_PANEL_EXPANDER_NAME CH422G + +/* IO expander Settings */ +/** + * 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 +/* IO expander parameters */ +#define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 +#define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) +#if !ESP_PANEL_EXPANDER_SKIP_INIT_HOST + #define ESP_PANEL_EXPANDER_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_EXPANDER_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (9) + #define ESP_PANEL_EXPANDER_I2C_IO_SDA (8) +#endif +#endif /* ESP_PANEL_USE_EXPANDER */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// 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_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 ) + +// *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_7.h b/src/board/waveshare/ESP32_S3_Touch_LCD_7.h new file mode 100644 index 00000000..c6708dcd --- /dev/null +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_7.h @@ -0,0 +1,273 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// *INDENT-OFF* + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the LCD panel ///////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an LCD panel */ +#define ESP_PANEL_USE_LCD (1) // 0/1 + +#if ESP_PANEL_USE_LCD +/** + * LCD Controller Name + */ +#define ESP_PANEL_LCD_NAME ST7262 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (800) +#define ESP_PANEL_LCD_HEIGHT (480) + +/* LCD Bus Settings */ +/** + * If set to 1, the bus 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_LCD_BUS_SKIP_INIT_HOST (1) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_RGB) +/** + * LCD Bus Parameters. + * + * Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and + * https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details. + * + */ +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_RGB + + #define ESP_PANEL_LCD_RGB_CLK_HZ (16 * 1000 * 1000) + #define ESP_PANEL_LCD_RGB_HPW (4) + #define ESP_PANEL_LCD_RGB_HBP (8) + #define ESP_PANEL_LCD_RGB_HFP (8) + #define ESP_PANEL_LCD_RGB_VPW (4) + #define ESP_PANEL_LCD_RGB_VBP (8) + #define ESP_PANEL_LCD_RGB_VFP (8) + #define ESP_PANEL_LCD_RGB_PCLK_ACTIVE_NEG (1) // 0: rising edge, 1: falling edge + + // | 8-bit RGB888 | 16-bit RGB565 | + // |--------------|---------------| + #define ESP_PANEL_LCD_RGB_DATA_WIDTH (16) // | 8 | 16 | + #define ESP_PANEL_LCD_RGB_PIXEL_BITS (16) // | 24 | 16 | + + #define ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE (ESP_PANEL_LCD_WIDTH * 10) // Bounce buffer size in bytes. This function is used to avoid screen drift. + // To enable the bounce buffer, set it to a non-zero value. Typically set to `ESP_PANEL_LCD_WIDTH * 10` + // The size of the Bounce Buffer must satisfy `width_of_lcd * height_of_lcd = size_of_buffer * N`, + // where N is an even number. + #define ESP_PANEL_LCD_RGB_IO_HSYNC (46) + #define ESP_PANEL_LCD_RGB_IO_VSYNC (3) + #define ESP_PANEL_LCD_RGB_IO_DE (5) // -1 if not used + #define ESP_PANEL_LCD_RGB_IO_PCLK (7) + #define ESP_PANEL_LCD_RGB_IO_DISP (-1) // -1 if not used + + // | RGB565 | RGB666 | RGB888 | + // |--------|--------|--------| + #define ESP_PANEL_LCD_RGB_IO_DATA0 (14) // | B0 | B0-1 | B0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA1 (38) // | B1 | B2 | B4 | + #define ESP_PANEL_LCD_RGB_IO_DATA2 (18) // | B2 | B3 | B5 | + #define ESP_PANEL_LCD_RGB_IO_DATA3 (17) // | B3 | B4 | B6 | + #define ESP_PANEL_LCD_RGB_IO_DATA4 (10) // | B4 | B5 | B7 | + #define ESP_PANEL_LCD_RGB_IO_DATA5 (39) // | G0 | G0 | G0-2 | + #define ESP_PANEL_LCD_RGB_IO_DATA6 (0) // | G1 | G1 | G3 | + #define ESP_PANEL_LCD_RGB_IO_DATA7 (45) // | G2 | G2 | G4 | +#if ESP_PANEL_LCD_RGB_DATA_WIDTH > 8 + #define ESP_PANEL_LCD_RGB_IO_DATA8 (48) // | G3 | G3 | G5 | + #define ESP_PANEL_LCD_RGB_IO_DATA9 (47) // | G4 | G4 | G6 | + #define ESP_PANEL_LCD_RGB_IO_DATA10 (21) // | G5 | G5 | G7 | + #define ESP_PANEL_LCD_RGB_IO_DATA11 (1) // | R0 | R0-1 | R0-3 | + #define ESP_PANEL_LCD_RGB_IO_DATA12 (2) // | R1 | R2 | R4 | + #define ESP_PANEL_LCD_RGB_IO_DATA13 (42) // | R2 | R3 | R5 | + #define ESP_PANEL_LCD_RGB_IO_DATA14 (41) // | R3 | R4 | R6 | + #define ESP_PANEL_LCD_RGB_IO_DATA15 (40) // | R4 | R5 | R7 | +#endif +#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + #define ESP_PANEL_LCD_3WIRE_SPI_IO_CS (0) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SCK (1) + #define ESP_PANEL_LCD_3WIRE_SPI_IO_SDA (2) + #define ESP_PANEL_LCD_3WIRE_SPI_CS_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SDA_USE_EXPNADER (0) // 0/1 + #define ESP_PANEL_LCD_3WIRE_SPI_SCL_ACTIVE_EDGE (0) // 0: rising edge, 1: falling edge + #define ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO (0) // Delete the panel IO instance automatically if set to 1. + // If the 3-wire SPI pins are sharing other pins of the RGB interface to save GPIOs, + // Please set it to 1 to release the panel IO and its pins (except CS signal). + #define ESP_PANEL_LCD_FLAGS_MIRROR_BY_CMD (!ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO) + // The `mirror()` function will be implemented by LCD command if set to 1. +#endif + +#endif /* ESP_PANEL_LCD_BUS_TYPE */ + +/** + * LCD Vendor Initialization Commands. + * + * Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for + * initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver + * will use the default initialization sequence code. + * + * There are two formats for the sequence code: + * 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms} + * 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and + * ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command) + */ +/* +#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \ + { \ + {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \ + {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \ + {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \ + {0x29, (uint8_t []){0x00}, 0, 120}, \ + or \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \ + ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \ + ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \ + } +*/ + +/* LCD Color Settings */ +/* LCD color depth in bits */ +#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24 +/* + * LCD RGB Element Order. Choose one of the following: + * - 0: RGB + * - 1: BGR + */ +#define ESP_PANEL_LCD_BGR_ORDER (0) // 0/1 +#define ESP_PANEL_LCD_INEVRT_COLOR (0) // 0/1 + +/* LCD Transformation Flags */ +#define ESP_PANEL_LCD_SWAP_XY (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_X (0) // 0/1 +#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1 + +/* LCD Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#define ESP_PANEL_LCD_IO_RST (-1) +#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_LCD */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Please update the following macros to configure the touch panel /////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 1 when using an touch panel */ +#define ESP_PANEL_USE_TOUCH (1) // 0/1 +#if ESP_PANEL_USE_TOUCH +/** + * Touch controller name + */ +#define ESP_PANEL_TOUCH_NAME GT911 + +/* Touch resolution in pixels */ +#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD +#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD + +/* Touch Panel Bus Settings */ +/** + * If set to 1, the bus 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_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1 +/** + * Touch panel bus type + */ +#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C) +/* Touch panel bus parameters */ +#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C + + #define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // For GT911, there are two addresses: 0x5D(default) and 0x14 +#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST + #define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_TOUCH_I2C_IO_SCL (9) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (8) +#endif + +#endif /* ESP_PANEL_TOUCH_BUS_TYPE */ + +/* Touch Transformation Flags */ +#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_X (0) // 0/1 +#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1 + +/* Touch Other Settings */ +/* IO num of RESET pin, set to -1 if not use */ +#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_INT_LEVEL (0) // 0: low level, 1: high level + +#endif /* ESP_PANEL_USE_TOUCH */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the backlight //////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define ESP_PANEL_USE_BACKLIGHT (0) // 0/1 +#if ESP_PANEL_USE_BACKLIGHT +/* IO num of backlight pin */ +#define ESP_PANEL_BACKLIGHT_IO (-1) +#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level + +/* Set to 1 if turn off the backlight after initializing the panel; otherwise, set it to turn on */ +#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off + +/* Set to 1 if use PWM for brightness control */ +#define ESP_PANEL_LCD_BL_USE_PWM (0) // 0/1 +#endif /* ESP_PANEL_USE_BACKLIGHT */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Please update the following macros to configure the IO expander ////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Set to 0 if not using IO Expander */ +#define ESP_PANEL_USE_EXPANDER (1) // 0/1 +#if ESP_PANEL_USE_EXPANDER +/** + * IO expander name. + */ +#define ESP_PANEL_EXPANDER_NAME CH422G + +/* IO expander Settings */ +/** + * 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 +/* IO expander parameters */ +#define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 +#define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) +#if !ESP_PANEL_EXPANDER_SKIP_INIT_HOST + #define ESP_PANEL_EXPANDER_I2C_CLK_HZ (400 * 1000) + // Typically set to 400K + #define ESP_PANEL_EXPANDER_I2C_SCL_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (1) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (9) + #define ESP_PANEL_EXPANDER_I2C_IO_SDA (8) +#endif +#endif /* ESP_PANEL_USE_EXPANDER */ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// 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_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 ) + +// *INDENT-OFF* diff --git a/src/board/waveshare/Kconfig.waveshare b/src/board/waveshare/Kconfig.waveshare index 285577f7..c252f479 100644 --- a/src/board/waveshare/Kconfig.waveshare +++ b/src/board/waveshare/Kconfig.waveshare @@ -1,8 +1,3 @@ -config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 - bool "ESP32_S3_Touch_LCD_4_3" - help - https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm - config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 bool "ESP32_S3_Touch_LCD_1_85" help @@ -13,6 +8,30 @@ config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 help https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm +config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 + bool "ESP32_S3_Touch_LCD_4_3" + help + https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm + +config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B + bool "ESP32_S3_Touch_LCD_4_3_B" + help + https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm + +config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 + bool "ESP32_S3_Touch_LCD_5" + help + https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117 + +config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B + bool "ESP32_S3_Touch_LCD_5_B" + help + https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151 +config BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 + bool "ESP32_S3_Touch_LCD_7" + help + https://www.waveshare.com/esp32-s3-touch-lcd-7.htm + config BOARD_WAVESHARE_ESP32_P4_NANO bool "ESP32_P4_NANO" help diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b new file mode 100644 index 00000000..87fa5303 --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 new file mode 100644 index 00000000..4f143695 --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B new file mode 100644 index 00000000..57581ffd --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 new file mode 100644 index 00000000..f7b50071 --- /dev/null +++ b/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b new file mode 100644 index 00000000..87fa5303 --- /dev/null +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 new file mode 100644 index 00000000..4f143695 --- /dev/null +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B new file mode 100644 index 00000000..57581ffd --- /dev/null +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 new file mode 100644 index 00000000..f7b50071 --- /dev/null +++ b/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7=y + +CONFIG_SPIRAM_MODE_OCT=y From 412c15e2b426073587c9f40f722330c14e3e4c9a Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Thu, 14 Nov 2024 16:43:19 +0800 Subject: [PATCH 5/6] fix(bus & lcd): update RGB conf based on esp-idf v5.4 --- CHANGELOG.md | 4 + src/ESP_Panel.cpp | 4 + src/bus/RGB.h | 179 ++++++++++++++++++++++++++------------- src/lcd/ESP_PanelLcd.cpp | 6 +- 4 files changed, 135 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4881a86d..abbd8e05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ * feat(board): add board Waveshare ESP32-S3-Touch-LCD-4.3B/5/5B/7 @H-sw123 (#124) * feat(board): add configuration for ignoring board in Kconfig +### Bugfixes: + +* fix(bus & lcd): update RGB conf based on esp-idf v5.4 + ## v0.2.0 - 2024-11-08 ### Enhancements: diff --git a/src/ESP_Panel.cpp b/src/ESP_Panel.cpp index 4b02877c..d5e706c1 100644 --- a/src/ESP_Panel.cpp +++ b/src/ESP_Panel.cpp @@ -231,8 +231,12 @@ bool ESP_Panel::init(void) .bits_per_pixel = ESP_PANEL_LCD_RGB_PIXEL_BITS, .num_fbs = 1, .bounce_buffer_size_px = ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE, +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) + .dma_burst_size = 64, +#else .sram_trans_align = 4, .psram_trans_align = 64, +#endif /* ESP_IDF_VERSION */ .hsync_gpio_num = ESP_PANEL_LCD_RGB_IO_HSYNC, .vsync_gpio_num = ESP_PANEL_LCD_RGB_IO_VSYNC, .de_gpio_num = ESP_PANEL_LCD_RGB_IO_DE, diff --git a/src/bus/RGB.h b/src/bus/RGB.h index c7c4ac80..5ccddb5a 100644 --- a/src/bus/RGB.h +++ b/src/bus/RGB.h @@ -50,36 +50,69 @@ * @brief Macro for 16-bit RGB565 RGB configuration * */ +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) #define ESP_PANEL_RGB_16BIT_CONFIG_DEFAULT(width, height, \ - d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ - d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io, \ - hsync_io, vsync_io, pclk_io, de_io, disp_io) \ - { \ - .clk_src = LCD_CLK_SRC_DEFAULT, \ - .timings = ESP_PANEL_RGB_TIMING_16BIT_CONFIG_DEFAULT(width, height), \ - .data_width = 16, \ - .bits_per_pixel = 16, \ - .num_fbs = 1, \ - .bounce_buffer_size_px = 0, \ - .psram_trans_align = 64, \ - .hsync_gpio_num = hsync_io, \ - .vsync_gpio_num = vsync_io, \ - .de_gpio_num = de_io, \ - .pclk_gpio_num = pclk_io, \ - .disp_gpio_num = disp_io, \ - .data_gpio_nums = { \ - d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ - d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io \ - }, \ - .flags = { \ - .disp_active_low = 0, \ - .refresh_on_demand = 0, \ - .fb_in_psram = 1, \ - .double_fb = 0, \ - .no_fb = 0, \ - .bb_invalidate_cache = 0, \ - }, \ - } + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io, \ + hsync_io, vsync_io, pclk_io, de_io, disp_io) \ + { \ + .clk_src = LCD_CLK_SRC_DEFAULT, \ + .timings = ESP_PANEL_RGB_TIMING_16BIT_CONFIG_DEFAULT(width, height), \ + .data_width = 16, \ + .bits_per_pixel = 16, \ + .num_fbs = 1, \ + .bounce_buffer_size_px = 0, \ + .dma_burst_size = 64, \ + .hsync_gpio_num = hsync_io, \ + .vsync_gpio_num = vsync_io, \ + .de_gpio_num = de_io, \ + .pclk_gpio_num = pclk_io, \ + .disp_gpio_num = disp_io, \ + .data_gpio_nums = { \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io \ + }, \ + .flags = { \ + .disp_active_low = 0, \ + .refresh_on_demand = 0, \ + .fb_in_psram = 1, \ + .double_fb = 0, \ + .no_fb = 0, \ + .bb_invalidate_cache = 0, \ + }, \ + } +#else +#define ESP_PANEL_RGB_16BIT_CONFIG_DEFAULT(width, height, \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io, \ + hsync_io, vsync_io, pclk_io, de_io, disp_io) \ + { \ + .clk_src = LCD_CLK_SRC_DEFAULT, \ + .timings = ESP_PANEL_RGB_TIMING_16BIT_CONFIG_DEFAULT(width, height), \ + .data_width = 16, \ + .bits_per_pixel = 16, \ + .num_fbs = 1, \ + .bounce_buffer_size_px = 0, \ + .psram_trans_align = 64, \ + .hsync_gpio_num = hsync_io, \ + .vsync_gpio_num = vsync_io, \ + .de_gpio_num = de_io, \ + .pclk_gpio_num = pclk_io, \ + .disp_gpio_num = disp_io, \ + .data_gpio_nums = { \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + d8_io, d9_io, d10_io, d11_io, d12_io, d13_io, d14_io, d15_io \ + }, \ + .flags = { \ + .disp_active_low = 0, \ + .refresh_on_demand = 0, \ + .fb_in_psram = 1, \ + .double_fb = 0, \ + .no_fb = 0, \ + .bb_invalidate_cache = 0, \ + }, \ + } +#endif /* ESP_IDF_VERSION */ /** * @brief Macro for 8-bit RGB timing configuration @@ -110,35 +143,67 @@ * @brief Macro for 8-bit RGB888 RGB configuration * */ +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) #define ESP_PANEL_RGB_8BIT_CONFIG_DEFAULT(width, height, \ - d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ - hsync_io, vsync_io, pclk_io, de_io, disp_io) \ - { \ - .clk_src = LCD_CLK_SRC_DEFAULT, \ - .timings = ESP_PANEL_RGB_TIMING_8BIT_CONFIG_DEFAULT(width, height), \ - .data_width = 8, \ - .bits_per_pixel = 24, \ - .num_fbs = 1, \ - .bounce_buffer_size_px = 0, \ - .psram_trans_align = 64, \ - .hsync_gpio_num = hsync_io, \ - .vsync_gpio_num = vsync_io, \ - .de_gpio_num = de_io, \ - .pclk_gpio_num = pclk_io, \ - .disp_gpio_num = disp_io, \ - .data_gpio_nums = { \ - d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ - -1, -1, -1, -1, -1, -1, -1, -1, \ - }, \ - .flags = { \ - .disp_active_low = 0, \ - .refresh_on_demand = 0, \ - .fb_in_psram = 1, \ - .double_fb = 0, \ - .no_fb = 0, \ - .bb_invalidate_cache = 0, \ - }, \ - } + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + hsync_io, vsync_io, pclk_io, de_io, disp_io) \ + { \ + .clk_src = LCD_CLK_SRC_DEFAULT, \ + .timings = ESP_PANEL_RGB_TIMING_8BIT_CONFIG_DEFAULT(width, height), \ + .data_width = 8, \ + .bits_per_pixel = 24, \ + .num_fbs = 1, \ + .bounce_buffer_size_px = 0, \ + .dma_burst_size = 64, \ + .hsync_gpio_num = hsync_io, \ + .vsync_gpio_num = vsync_io, \ + .de_gpio_num = de_io, \ + .pclk_gpio_num = pclk_io, \ + .disp_gpio_num = disp_io, \ + .data_gpio_nums = { \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + -1, -1, -1, -1, -1, -1, -1, -1, \ + }, \ + .flags = { \ + .disp_active_low = 0, \ + .refresh_on_demand = 0, \ + .fb_in_psram = 1, \ + .double_fb = 0, \ + .no_fb = 0, \ + .bb_invalidate_cache = 0, \ + }, \ + } +#else +#define ESP_PANEL_RGB_8BIT_CONFIG_DEFAULT(width, height, \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + hsync_io, vsync_io, pclk_io, de_io, disp_io) \ + { \ + .clk_src = LCD_CLK_SRC_DEFAULT, \ + .timings = ESP_PANEL_RGB_TIMING_8BIT_CONFIG_DEFAULT(width, height), \ + .data_width = 8, \ + .bits_per_pixel = 24, \ + .num_fbs = 1, \ + .bounce_buffer_size_px = 0, \ + .psram_trans_align = 64, \ + .hsync_gpio_num = hsync_io, \ + .vsync_gpio_num = vsync_io, \ + .de_gpio_num = de_io, \ + .pclk_gpio_num = pclk_io, \ + .disp_gpio_num = disp_io, \ + .data_gpio_nums = { \ + d0_io, d1_io, d2_io, d3_io, d4_io, d5_io, d6_io, d7_io, \ + -1, -1, -1, -1, -1, -1, -1, -1, \ + }, \ + .flags = { \ + .disp_active_low = 0, \ + .refresh_on_demand = 0, \ + .fb_in_psram = 1, \ + .double_fb = 0, \ + .no_fb = 0, \ + .bb_invalidate_cache = 0, \ + }, \ + } +#endif /* ESP_IDF_VERSION */ /** * @brief Macro for 3-wire SPI panel IO configuration diff --git a/src/lcd/ESP_PanelLcd.cpp b/src/lcd/ESP_PanelLcd.cpp index 4976e5c5..1b45dd65 100644 --- a/src/lcd/ESP_PanelLcd.cpp +++ b/src/lcd/ESP_PanelLcd.cpp @@ -166,8 +166,11 @@ bool ESP_PanelLcd::begin(void) switch (bus->getType()) { #if SOC_LCD_RGB_SUPPORTED case ESP_PANEL_BUS_TYPE_RGB: { + esp_lcd_rgb_panel_event_callbacks_t rgb_event_cb = {}; +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) + rgb_event_cb.on_frame_buf_complete = (esp_lcd_rgb_panel_frame_buf_complete_cb_t)onRefreshFinish; +#else const esp_lcd_rgb_panel_config_t *rgb_config = static_cast(bus)->getRgbConfig(); - esp_lcd_rgb_panel_event_callbacks_t rgb_event_cb = { NULL }; if (rgb_config->bounce_buffer_size_px == 0) { // When bounce buffer is disabled, use `on_vsync` callback to notify draw bitmap finish rgb_event_cb.on_vsync = (esp_lcd_rgb_panel_vsync_cb_t)onRefreshFinish; @@ -175,6 +178,7 @@ bool ESP_PanelLcd::begin(void) // When bounce buffer is enabled, use `on_bounce_frame_finish` callback to notify draw bitmap finish rgb_event_cb.on_bounce_frame_finish = (esp_lcd_rgb_panel_bounce_buf_finish_cb_t)onRefreshFinish; } +#endif ESP_PANEL_CHECK_ERR_RET( esp_lcd_rgb_panel_register_event_callbacks(handle, &rgb_event_cb, &_callback_data), false, "Register RGB callback failed" From f598214b9d5e6f03712089fdb753b68e2479be97 Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Thu, 14 Nov 2024 17:42:29 +0800 Subject: [PATCH 6/6] feat(ci): use finer-grained file modification jobs --- .gitlab/ci/build.yml | 122 +++++- .gitlab/ci/rules.yml | 407 ++++++++++++++++-- CHANGELOG.md | 1 + conftest.py | 217 ---------- pytest.ini | 42 -- src/ESP_Panel_Library.h | 2 +- src/board/m5stack/M5CORES3.h | 2 +- src/{ => panel}/ESP_Panel.cpp | 2 + src/{ => panel}/ESP_Panel.h | 9 +- test_apps/common/CMakeLists.txt | 5 + test_apps/common/main/CMakeLists.txt | 4 + test_apps/common/main/idf_component.yml | 9 + test_apps/common/main/test_app_main.cpp | 70 +++ test_apps/common/main/test_common.cpp | 118 +++++ .../sdkconfig.ci.espressif_esp32_c3_lcdkit | 0 ...ig.ci.espressif_esp32_p4_function_ev_board | 0 .../sdkconfig.ci.espressif_esp32_s3_box_3 | 0 ....ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 | 0 ...ig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 | 0 test_apps/common/sdkconfig.defaults | 5 + test_apps/common/sdkconfig.defaults.esp32p4 | 8 + test_apps/common/sdkconfig.defaults.esp32s3 | 13 + ...el_7_0 => sdkconfig.elecrow.crowpanel_7_0} | 0 .../sdkconfig.espressif.esp32_c3_lcdkit} | 0 ...nfig.espressif.esp32_p4_function_ev_board} | 0 ...3_box => sdkconfig.espressif.esp32_s3_box} | 0 .../sdkconfig.espressif.esp32_s3_box_3} | 0 ...> sdkconfig.espressif.esp32_s3_box_3_beta} | 0 ... => sdkconfig.espressif.esp32_s3_box_lite} | 0 ...3_eye => sdkconfig.espressif.esp32_s3_eye} | 0 ...2 => sdkconfig.espressif.esp32_s3_korvo_2} | 0 ...sdkconfig.espressif.esp32_s3_lcd_ev_board} | 0 ...kconfig.espressif.esp32_s3_lcd_ev_board_2} | 0 ...ig.espressif.esp32_s3_lcd_ev_board_2_v1_5} | 0 ...nfig.espressif.esp32_s3_lcd_ev_board_v1_5} | 0 ...g => sdkconfig.espressif.esp32_s3_usb_otg} | 0 ...> sdkconfig.jingcai.esp32_4848S040C_I_Y_3} | 0 ...tack_m5core2 => sdkconfig.m5stack.m5core2} | 0 ...tack_m5core3 => sdkconfig.m5stack.m5core3} | 0 ...5stack_m5dial => sdkconfig.m5stack.m5dial} | 0 ...nano => sdkconfig.waveshare.esp32_p4_nano} | 0 ...kconfig.waveshare.esp32_s3_touch_lcd_1_85} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_2_1} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_4_3} | 0 ...config.waveshare.esp32_s3_touch_lcd_4_3_b} | 0 ... sdkconfig.waveshare.esp32_s3_touch_lcd_5} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_5_B} | 0 ... sdkconfig.waveshare.esp32_s3_touch_lcd_7} | 0 test_apps/panel/main/test_app_main.cpp | 2 +- ...el_7_0 => sdkconfig.elecrow.crowpanel_7_0} | 0 .../panel/sdkconfig.espressif.esp32_c3_lcdkit | 3 + ...onfig.espressif.esp32_p4_function_ev_board | 2 + ...3_box => sdkconfig.espressif.esp32_s3_box} | 0 .../panel/sdkconfig.espressif.esp32_s3_box_3 | 5 + ...> sdkconfig.espressif.esp32_s3_box_3_beta} | 0 ... => sdkconfig.espressif.esp32_s3_box_lite} | 0 ...3_eye => sdkconfig.espressif.esp32_s3_eye} | 0 ...2 => sdkconfig.espressif.esp32_s3_korvo_2} | 0 ...sdkconfig.espressif.esp32_s3_lcd_ev_board} | 0 ...kconfig.espressif.esp32_s3_lcd_ev_board_2} | 0 ...fig.espressif.esp32_s3_lcd_ev_board_2_v1_5 | 4 + ...onfig.espressif.esp32_s3_lcd_ev_board_v1_5 | 4 + ...g => sdkconfig.espressif.esp32_s3_usb_otg} | 0 ...> sdkconfig.jingcai.esp32_4848S040C_I_Y_3} | 0 ...tack_m5core2 => sdkconfig.m5stack.m5core2} | 0 ...tack_m5core3 => sdkconfig.m5stack.m5core3} | 0 ...5stack_m5dial => sdkconfig.m5stack.m5dial} | 0 ...nano => sdkconfig.waveshare.esp32_p4_nano} | 0 ...kconfig.waveshare.esp32_s3_touch_lcd_1_85} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_2_1} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_4_3} | 0 ...config.waveshare.esp32_s3_touch_lcd_4_3_b} | 0 ... sdkconfig.waveshare.esp32_s3_touch_lcd_5} | 0 ...dkconfig.waveshare.esp32_s3_touch_lcd_5_B} | 0 ... sdkconfig.waveshare.esp32_s3_touch_lcd_7} | 0 75 files changed, 750 insertions(+), 306 deletions(-) delete mode 100644 conftest.py delete mode 100644 pytest.ini rename src/{ => panel}/ESP_Panel.cpp (99%) rename src/{ => panel}/ESP_Panel.h (91%) create mode 100644 test_apps/common/CMakeLists.txt create mode 100644 test_apps/common/main/CMakeLists.txt create mode 100644 test_apps/common/main/idf_component.yml create mode 100644 test_apps/common/main/test_app_main.cpp create mode 100644 test_apps/common/main/test_common.cpp rename test_apps/{lvgl_port => common}/sdkconfig.ci.espressif_esp32_c3_lcdkit (100%) rename test_apps/{lvgl_port => common}/sdkconfig.ci.espressif_esp32_p4_function_ev_board (100%) rename test_apps/{lvgl_port => common}/sdkconfig.ci.espressif_esp32_s3_box_3 (100%) rename test_apps/{lvgl_port => common}/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 (100%) rename test_apps/{lvgl_port => common}/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 (100%) create mode 100644 test_apps/common/sdkconfig.defaults create mode 100644 test_apps/common/sdkconfig.defaults.esp32p4 create mode 100644 test_apps/common/sdkconfig.defaults.esp32s3 rename test_apps/lvgl_port/{sdkconfig.ci.elecrow_crowpanel_7_0 => sdkconfig.elecrow.crowpanel_7_0} (100%) rename test_apps/{panel/sdkconfig.ci.espressif_esp32_c3_lcdkit => lvgl_port/sdkconfig.espressif.esp32_c3_lcdkit} (100%) rename test_apps/{panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board => lvgl_port/sdkconfig.espressif.esp32_p4_function_ev_board} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_box => sdkconfig.espressif.esp32_s3_box} (100%) rename test_apps/{panel/sdkconfig.ci.espressif_esp32_s3_box_3 => lvgl_port/sdkconfig.espressif.esp32_s3_box_3} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_box_3_beta => sdkconfig.espressif.esp32_s3_box_3_beta} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_box_lite => sdkconfig.espressif.esp32_s3_box_lite} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_eye => sdkconfig.espressif.esp32_s3_eye} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_korvo_2 => sdkconfig.espressif.esp32_s3_korvo_2} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_lcd_ev_board => sdkconfig.espressif.esp32_s3_lcd_ev_board} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 => sdkconfig.espressif.esp32_s3_lcd_ev_board_2} (100%) rename test_apps/{panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 => lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5} (100%) rename test_apps/{panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 => lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.espressif_esp32_s3_usb_otg => sdkconfig.espressif.esp32_s3_usb_otg} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 => sdkconfig.jingcai.esp32_4848S040C_I_Y_3} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.m5stack_m5core2 => sdkconfig.m5stack.m5core2} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.m5stack_m5core3 => sdkconfig.m5stack.m5core3} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.m5stack_m5dial => sdkconfig.m5stack.m5dial} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_p4_nano => sdkconfig.waveshare.esp32_p4_nano} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 => sdkconfig.waveshare.esp32_s3_touch_lcd_1_85} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 => sdkconfig.waveshare.esp32_s3_touch_lcd_2_1} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 => sdkconfig.waveshare.esp32_s3_touch_lcd_4_3} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b => sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 => sdkconfig.waveshare.esp32_s3_touch_lcd_5} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B => sdkconfig.waveshare.esp32_s3_touch_lcd_5_B} (100%) rename test_apps/lvgl_port/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 => sdkconfig.waveshare.esp32_s3_touch_lcd_7} (100%) rename test_apps/panel/{sdkconfig.ci.elecrow_crowpanel_7_0 => sdkconfig.elecrow.crowpanel_7_0} (100%) create mode 100644 test_apps/panel/sdkconfig.espressif.esp32_c3_lcdkit create mode 100644 test_apps/panel/sdkconfig.espressif.esp32_p4_function_ev_board rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_box => sdkconfig.espressif.esp32_s3_box} (100%) create mode 100644 test_apps/panel/sdkconfig.espressif.esp32_s3_box_3 rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_box_3_beta => sdkconfig.espressif.esp32_s3_box_3_beta} (100%) rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_box_lite => sdkconfig.espressif.esp32_s3_box_lite} (100%) rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_eye => sdkconfig.espressif.esp32_s3_eye} (100%) rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_korvo_2 => sdkconfig.espressif.esp32_s3_korvo_2} (100%) rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_lcd_ev_board => sdkconfig.espressif.esp32_s3_lcd_ev_board} (100%) rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 => sdkconfig.espressif.esp32_s3_lcd_ev_board_2} (100%) create mode 100644 test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 create mode 100644 test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 rename test_apps/panel/{sdkconfig.ci.espressif_esp32_s3_usb_otg => sdkconfig.espressif.esp32_s3_usb_otg} (100%) rename test_apps/panel/{sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 => sdkconfig.jingcai.esp32_4848S040C_I_Y_3} (100%) rename test_apps/panel/{sdkconfig.ci.m5stack_m5core2 => sdkconfig.m5stack.m5core2} (100%) rename test_apps/panel/{sdkconfig.ci.m5stack_m5core3 => sdkconfig.m5stack.m5core3} (100%) rename test_apps/panel/{sdkconfig.ci.m5stack_m5dial => sdkconfig.m5stack.m5dial} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_p4_nano => sdkconfig.waveshare.esp32_p4_nano} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 => sdkconfig.waveshare.esp32_s3_touch_lcd_1_85} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 => sdkconfig.waveshare.esp32_s3_touch_lcd_2_1} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 => sdkconfig.waveshare.esp32_s3_touch_lcd_4_3} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b => sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 => sdkconfig.waveshare.esp32_s3_touch_lcd_5} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B => sdkconfig.waveshare.esp32_s3_touch_lcd_5_B} (100%) rename test_apps/panel/{sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 => sdkconfig.waveshare.esp32_s3_touch_lcd_7} (100%) diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index 00a6c606..52eccddc 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -42,8 +42,8 @@ - pip install idf_build_apps - python .gitlab/tools/build_apps.py ${EXAMPLE_DIR} --config ${EXAMPLE_CONFIG} -t all -vv -# Target ESP-IDF versions -.build_idf_active_release_version: +# Images for different target ESP-IDF +.build_idf_active_release_image: parallel: matrix: - IMAGE: espressif/idf:release-v5.1 @@ -51,17 +51,26 @@ - IMAGE: espressif/idf:release-v5.3 - IMAGE: espressif/idf:release-v5.4 -.build_esp32_p4_idf_release_version: +.build_esp32_p4_idf_release_image: parallel: matrix: - IMAGE: espressif/idf:release-v5.3 - IMAGE: espressif/idf:release-v5.4 -# Test apps +# Test apps common +build_test_apps_common: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_common + variables: + EXAMPLE_DIR: test_apps/common + +# Test apps lcd build_test_apps_lcd_3wire_spi_rgb: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_lcd_3wire_spi_rgb variables: EXAMPLE_DIR: test_apps/lcd/3wire_spi_rgb @@ -69,7 +78,7 @@ build_test_apps_lcd_3wire_spi_rgb: build_test_apps_lcd_mipi_dsi: extends: - .build_examples_template - - .build_esp32_p4_idf_release_version + - .build_esp32_p4_idf_release_image - .rules:build:test_apps_lcd_mipi_dsi variables: EXAMPLE_DIR: test_apps/lcd/mipi_dsi @@ -77,7 +86,7 @@ build_test_apps_lcd_mipi_dsi: build_test_apps_lcd_qspi: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_lcd_qspi variables: EXAMPLE_DIR: test_apps/lcd/qspi @@ -85,7 +94,7 @@ build_test_apps_lcd_qspi: build_test_apps_lcd_rgb: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_lcd_rgb variables: EXAMPLE_DIR: test_apps/lcd/rgb @@ -93,31 +102,108 @@ build_test_apps_lcd_rgb: build_test_apps_lcd_spi: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_lcd_spi variables: EXAMPLE_DIR: test_apps/lcd/spi -build_test_apps_lvgl_port: +# Test apps lvgl_port +build_test_apps_lvgl_port_elecrow: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_lvgl_port_board_elecrow + variables: + EXAMPLE_DIR: test_apps/lvgl_port + EXAMPLE_CONFIG: sdkconfig.elecrow.* + +build_test_apps_lvgl_port_espressif: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_lvgl_port_board_espressif + variables: + EXAMPLE_DIR: test_apps/lvgl_port + EXAMPLE_CONFIG: sdkconfig.espressif.* + +build_test_apps_lvgl_port_jingcai: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_lvgl_port_board_jingcai + variables: + EXAMPLE_DIR: test_apps/lvgl_port + EXAMPLE_CONFIG: sdkconfig.jingcai.* + +build_test_apps_lvgl_port_m5stack: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_lvgl_port_board_m5stack + variables: + EXAMPLE_DIR: test_apps/lvgl_port + EXAMPLE_CONFIG: sdkconfig.m5stack.* + +build_test_apps_lvgl_port_waveshare: extends: - .build_examples_template - - .build_idf_active_release_version - - .rules:build:test_apps_lvgl_port + - .build_idf_active_release_image + - .rules:build:test_apps_lvgl_port_board_waveshare variables: EXAMPLE_DIR: test_apps/lvgl_port + EXAMPLE_CONFIG: sdkconfig.waveshare.* + +# Test apps panel +build_test_apps_panel_elecrow: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_panel_board_elecrow + variables: + EXAMPLE_DIR: test_apps/panel + EXAMPLE_CONFIG: sdkconfig.elecrow.* + +build_test_apps_panel_espressif: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_panel_board_espressif + variables: + EXAMPLE_DIR: test_apps/panel + EXAMPLE_CONFIG: sdkconfig.espressif.* + +build_test_apps_panel_jingcai: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_panel_board_jingcai + variables: + EXAMPLE_DIR: test_apps/panel + EXAMPLE_CONFIG: sdkconfig.jingcai.* + +build_test_apps_panel_m5stack: + extends: + - .build_examples_template + - .build_idf_active_release_image + - .rules:build:test_apps_panel_board_m5stack + variables: + EXAMPLE_DIR: test_apps/panel + EXAMPLE_CONFIG: sdkconfig.m5stack.* -build_test_apps_panel: +build_test_apps_panel_waveshare: extends: - .build_examples_template - - .build_idf_active_release_version - - .rules:build:test_apps_panel + - .build_idf_active_release_image + - .rules:build:test_apps_panel_board_waveshare variables: EXAMPLE_DIR: test_apps/panel + EXAMPLE_CONFIG: sdkconfig.waveshare.* +# Test apps touch build_test_apps_touch_i2c: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_touch_i2c variables: EXAMPLE_DIR: test_apps/touch/i2c @@ -125,7 +211,7 @@ build_test_apps_touch_i2c: build_test_apps_touch_spi: extends: - .build_examples_template - - .build_idf_active_release_version + - .build_idf_active_release_image - .rules:build:test_apps_touch_spi variables: EXAMPLE_DIR: test_apps/touch/spi @@ -134,7 +220,7 @@ build_test_apps_touch_spi: # build_example_esp_brookesia_phone_m5stace_core_s3: # extends: # - .build_examples_template -# - .build_esp32_s3_idf_release_version +# - .build_esp32_s3_idf_release_image # - .rules:build:example_esp_brookesia_phone_m5stace_core_s3 # variables: # EXAMPLE_DIR: examples/esp_idf/esp_brookesia_phone_m5stace_core_s3 diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 7a558e75..f8c6128f 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -7,22 +7,185 @@ # For test - ".gitlab/**/*" - ".build-rules.yml" - - "conftest.py" - - "pytest.ini" -# component folder -.patterns-component: &patterns-component - - "src/**/*" +# component common files +.patterns-component_common: &patterns-component_common - "CMakeLists.txt" - - "esp_brookesia_conf.h" + - "ESP_Panel_Conf.h" - "idf_component.yml" - "Kconfig" + - "src/*" -# docs folder +# component backlight files +.patterns-component_backlight: &patterns-component_backlight + - "src/backlight/**/*" + +# component bus files +.patterns-component_bus_common: &patterns-component_bus_common + - "src/bus/ESP_PanelBus.*" + +.patterns-component_bus_mipi_dsi: &patterns-component_bus_mipi_dsi + - .patterns-component_bus_common + - "src/bus/DSI.*" + +.patterns-component_bus_i2c: &patterns-component_bus_i2c + - .patterns-component_bus_common + - "src/bus/I2C.*" + +.patterns-component_bus_qspi: &patterns-component_bus_qspi + - .patterns-component_bus_common + - "src/bus/QSPI.*" + +.patterns-component_bus_rgb: &patterns-component_bus_rgb + - .patterns-component_bus_common + - "src/bus/RGB.*" + +.patterns-component_bus_3wire_spi_rgb: &patterns-component_bus_3wire_spi_rgb + - .patterns-component_bus_rgb + - "src/bus/base/esp_lcd_panel_io_3wire_spi.c" + - "src/bus/base/esp_lcd_panel_io_additions.h" + +.patterns-component_bus_spi: &patterns-component_bus_spi + - .patterns-component_bus_common + - "src/bus/SPI.*" + +# component host files +.patterns-component_host: &patterns-component_host + - "src/host/**/*" + +# component lcd files +.patterns-component_lcd_common: &patterns-component_lcd_common + - "src/lcd/base/esp_lcd_vendor_types.h" + - "src/lcd/ESP_PanelLcd.*" + +.patterns-component_lcd_mipi_dsi: &patterns-component_lcd_mipi_dsi + - .patterns-component_bus_mipi_dsi + - .patterns-component_lcd_common + - "src/lcd/base/esp_lcd_ek79007.*" + - "src/lcd/EK79007.*" + - "src/lcd/base/esp_lcd_ili9881c.*" + - "src/lcd/ILI9881C.*" + - "src/lcd/base/esp_lcd_jd9365.*" + - "src/lcd/JD9365.*" + +.patterns-component_lcd_qspi: &patterns-component_lcd_qspi + - .patterns-component_bus_qspi + - .patterns-component_lcd_common + - "src/lcd/base/esp_lcd_gc9b71.*" + - "src/lcd/GC9B71.*" + - "src/lcd/base/esp_lcd_sh8601.*" + - "src/lcd/SH8601.*" + - "src/lcd/base/esp_lcd_spd2010.*" + - "src/lcd/SPD2010.*" + - "src/lcd/base/esp_lcd_st77916.*" + - "src/lcd/ST77916.*" + - "src/lcd/base/esp_lcd_st77922.*" + - "src/lcd/ST77922.*" + +.patterns-component_lcd_rgb: &patterns-component_lcd_rgb + - .patterns-component_bus_rgb + - .patterns-component_lcd_common + - "src/lcd/EK9716B.*" + - "src/lcd/ST7262.*" + +.patterns-component_lcd_3wire_spi_rgb: &patterns-component_lcd_3wire_spi_rgb + - .patterns-component_bus_3wire_spi_rgb + - .patterns-component_lcd_common + - "src/lcd/base/esp_lcd_gc9503.*" + - "src/lcd/GC9503.*" + - "src/lcd/base/esp_lcd_st7701.*" + - "src/lcd/ST7701.*" + +.patterns-component_lcd_spi: &patterns-component_lcd_spi + - .patterns-component_bus_spi + - .patterns-component_lcd_common + - "src/lcd/base/esp_lcd_gc9a01.*" + - "src/lcd/GC9A01.*" + - "src/lcd/base/esp_lcd_gc9b71.*" + - "src/lcd/GC9B71.*" + - "src/lcd/base/esp_lcd_ILI9341.*" + - "src/lcd/ILI9341.*" + - "src/lcd/base/esp_lcd_nv3022b.*" + - "src/lcd/NV3022B.*" + - "src/lcd/base/esp_lcd_sh8601.*" + - "src/lcd/SH8601.*" + - "src/lcd/base/esp_lcd_spd2010.*" + - "src/lcd/SPD2010.*" + - "src/lcd/base/esp_lcd_st7789.*" + - "src/lcd/ST7789.*" + - "src/lcd/base/esp_lcd_st77916.*" + - "src/lcd/ST77916.*" + - "src/lcd/base/esp_lcd_st77922.*" + - "src/lcd/ST77922.*" + +# component touch files +.patterns-component_touch_common: &patterns-component_touch_common + - "src/touch/base/esp_lcd_touch.*" + - "src/touch/ESP_PanelTouch.*" + +.patterns-component_touch_spi: &patterns-component_touch_spi + - .patterns-component_bus_spi + - "src/touch/base/esp_lcd_touch_xpt2046.*" + - "src/touch/XPT2046.*" + +.patterns-component_touch_i2c: &patterns-component_touch_i2c + - .patterns-component_bus_i2c + - "src/touch/base/esp_lcd_touch_cst816s.*" + - "src/touch/CST816S.*" + - "src/touch/base/esp_lcd_touch_ft5x06.*" + - "src/touch/FT5x06.*" + - "src/touch/base/esp_lcd_touch_gt911.*" + - "src/touch/GT911.*" + - "src/touch/base/esp_lcd_touch_gt1151.*" + - "src/touch/GT1151.*" + - "src/touch/base/esp_lcd_touch_st7123.*" + - "src/touch/ST7123.*" + - "src/touch/base/esp_lcd_touch_tt21100.*" + - "src/touch/TT21100.*" + +# component panel files +.patterns-component_panel: &patterns-component_panel + - .patterns-component_backlight + - .patterns-component_bus + - .patterns-component_host + - .patterns-component_lcd + - .patterns-component_touch + - "src/panel/**/*" + +# component board files +.patterns-component_board_common: &patterns-component_board_common + - .patterns-component_panel + - "src/board/*" + +.patterns-component_board_elecrow: &patterns-component_board_elecrow + - .patterns-component_board_common + - "src/board/elecrow/**/*" + +.patterns-component_board_espressif: &patterns-component_board_espressif + - .patterns-component_board_common + - "src/board/espressif/**/*" + +.patterns-component_board_jingcai: &patterns-component_board_jingcai + - .patterns-component_board_common + - "src/board/jingcai/**/*" + +.patterns-component_board_m5stack: &patterns-component_board_m5stack + - .patterns-component_board_common + - "src/board/m5stack/**/*" + +.patterns-component_board_waveshare: &patterns-component_board_waveshare + - .patterns-component_board_common + - "src/board/waveshare/**/*" + +# docs files .patterns-docs_md: &patterns-docs_md - "**/*.md" -# test_apps folder +# test_apps common files +.patterns-test_apps_common: &patterns-test_apps_common + - "test_apps/common/**/*" + +# test_apps lcd files .patterns-test_apps_lcd_3wire_spi_rgb: &patterns-test_apps_lcd_3wire_spi_rgb - "test_apps/lcd/3wire_spi_rgb/**/*" @@ -38,19 +201,72 @@ .patterns-test_apps_lcd_spi: &patterns-test_apps_lcd_spi - "test_apps/lcd/spi/**/*" -.patterns-test_apps_lvgl_port: &patterns-test_apps_lvgl_port +# test_apps lvgl_port files +.patterns-test_apps_lvgl_port_common: &patterns-test_apps_lvgl_port_common - "test_apps/lvgl_port/**/*" + - "!test_apps/lvgl_port/sdkconfig.elecrow.*" + - "!test_apps/lvgl_port/sdkconfig.espressif.*" + - "!test_apps/lvgl_port/sdkconfig.jingcai.*" + - "!test_apps/lvgl_port/sdkconfig.m5stack.*" + - "!test_apps/lvgl_port/sdkconfig.waveshare.*" -.patterns-test_apps_panel: &patterns-test_apps_panel +.patterns-test_apps_lvgl_port_elecrow: &patterns-test_apps_lvgl_port_board_elecrow + - .patterns-test_apps_lvgl_port_common + - "test_apps/lvgl_port/sdkconfig.elecrow.*" + +.patterns-test_apps_lvgl_port_espressif: &patterns-test_apps_lvgl_port_board_espressif + - .patterns-test_apps_lvgl_port_common + - "test_apps/lvgl_port/sdkconfig.espressif.*" + +.patterns-test_apps_lvgl_port_jingcai: &patterns-test_apps_lvgl_port_board_jingcai + - .patterns-test_apps_lvgl_port_common + - "test_apps/lvgl_port/sdkconfig.jingcai.*" + +.patterns-test_apps_lvgl_port_m5stack: &patterns-test_apps_lvgl_port_board_m5stack + - .patterns-test_apps_lvgl_port_common + - "test_apps/lvgl_port/sdkconfig.m5stack.*" + +.patterns-test_apps_lvgl_port_waveshare: &patterns-test_apps_lvgl_port_board_waveshare + - .patterns-test_apps_lvgl_port_common + - "test_apps/lvgl_port/sdkconfig.waveshare.*" + +# test_apps panel files +.patterns-test_apps_panel_common: &patterns-test_apps_panel_common - "test_apps/panel/**/*" + - "!test_apps/panel/sdkconfig.elecrow.*" + - "!test_apps/panel/sdkconfig.espressif.*" + - "!test_apps/panel/sdkconfig.jingcai.*" + - "!test_apps/panel/sdkconfig.m5stack.*" + - "!test_apps/panel/sdkconfig.waveshare.*" + +.patterns-test_apps_panel_elecrow: &patterns-test_apps_panel_board_elecrow + - .patterns-test_apps_panel_common + - "test_apps/panel/sdkconfig.elecrow.*" + +.patterns-test_apps_panel_espressif: &patterns-test_apps_panel_board_espressif + - .patterns-test_apps_panel_common + - "test_apps/panel/sdkconfig.espressif.*" + +.patterns-test_apps_panel_jingcai: &patterns-test_apps_panel_board_jingcai + - .patterns-test_apps_panel_common + - "test_apps/panel/sdkconfig.jingcai.*" +.patterns-test_apps_panel_m5stack: &patterns-test_apps_panel_board_m5stack + - .patterns-test_apps_panel_common + - "test_apps/panel/sdkconfig.m5stack.*" + +.patterns-test_apps_panel_waveshare: &patterns-test_apps_panel_board_waveshare + - .patterns-test_apps_panel_common + - "test_apps/panel/sdkconfig.waveshare.*" + +# test_apps touch files .patterns-test_apps_touch_i2c: &patterns-test_apps_touch_i2c - "test_apps/touch/i2c/**/*" .patterns-test_apps_touch_spi: &patterns-test_apps_touch_spi - "test_apps/touch/spi/**/*" -# examples folder +# examples files # .patterns-example_esp_brookesia_phone_m5stace_core_s3: &patterns-example_esp_brookesia_phone_m5stace_core_s3 # - "examples/esp_idf/esp_brookesia_phone_m5stace_core_s3/**/*" @@ -92,7 +308,21 @@ - <<: *if-dev-push changes: *patterns-build_system -# rules for test_apps +# rules for test_apps common +.rules:build:test_apps_common: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_common + - <<: *if-dev-push + changes: *patterns-test_apps_common + +# rules for test_apps lcd .rules:build:test_apps_lcd_3wire_spi_rgb: rules: - <<: *if-protected @@ -102,7 +332,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_lcd_3wire_spi_rgb - <<: *if-dev-push changes: *patterns-test_apps_lcd_3wire_spi_rgb @@ -115,7 +345,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_lcd_mipi_dsi - <<: *if-dev-push changes: *patterns-test_apps_lcd_mipi_dsi @@ -128,7 +358,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_lcd_qspi - <<: *if-dev-push changes: *patterns-test_apps_lcd_qspi @@ -141,7 +371,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_lcd_rgb - <<: *if-dev-push changes: *patterns-test_apps_lcd_rgb @@ -154,11 +384,42 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_lcd_spi - <<: *if-dev-push changes: *patterns-test_apps_lcd_spi -.rules:build:test_apps_lvgl_port: +# rules for test_apps lvgl_port +.rules:build:test_apps_lvgl_port_board_elecrow: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_elecrow + - <<: *if-dev-push + changes: *patterns-test_apps_lvgl_port_board_elecrow + +.rules:build:test_apps_lvgl_port_board_espressif: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_espressif + - <<: *if-dev-push + changes: *patterns-test_apps_lvgl_port_board_espressif + +.rules:build:test_apps_lvgl_port_board_jingcai: rules: - <<: *if-protected - <<: *if-label-build @@ -167,11 +428,59 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_panel - <<: *if-dev-push - changes: *patterns-test_apps_lvgl_port + changes: *patterns-component_board_jingcai + - <<: *if-dev-push + changes: *patterns-test_apps_lvgl_port_board_jingcai + +.rules:build:test_apps_lvgl_port_board_m5stack: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_m5stack + - <<: *if-dev-push + changes: *patterns-test_apps_lvgl_port_board_m5stack + +.rules:build:test_apps_lvgl_port_board_waveshare: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_waveshare + - <<: *if-dev-push + changes: *patterns-test_apps_lvgl_port_board_waveshare + +# rules for test_apps panel +.rules:build:test_apps_panel_board_elecrow: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_elecrow + - <<: *if-dev-push + changes: *patterns-test_apps_panel_board_elecrow -.rules:build:test_apps_panel: +.rules:build:test_apps_panel_board_espressif: rules: - <<: *if-protected - <<: *if-label-build @@ -180,10 +489,58 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_espressif + - <<: *if-dev-push + changes: *patterns-test_apps_panel_board_espressif + +.rules:build:test_apps_panel_board_jingcai: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_jingcai + - <<: *if-dev-push + changes: *patterns-test_apps_panel_board_jingcai + +.rules:build:test_apps_panel_board_m5stack: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_m5stack + - <<: *if-dev-push + changes: *patterns-test_apps_panel_board_m5stack + +.rules:build:test_apps_panel_board_waveshare: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-label-target_test + - <<: *if-trigger-job + - <<: *if-dev-push + changes: *patterns-build_system + - <<: *if-dev-push + changes: *patterns-component_panel + - <<: *if-dev-push + changes: *patterns-component_board_waveshare - <<: *if-dev-push - changes: *patterns-test_apps_panel + changes: *patterns-test_apps_panel_board_waveshare +# rules for test_apps touch .rules:build:test_apps_touch_i2c: rules: - <<: *if-protected @@ -193,7 +550,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_touch_i2c - <<: *if-dev-push changes: *patterns-test_apps_touch_i2c @@ -206,7 +563,7 @@ - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push - changes: *patterns-component + changes: *patterns-component_touch_spi - <<: *if-dev-push changes: *patterns-test_apps_touch_spi diff --git a/CHANGELOG.md b/CHANGELOG.md index abbd8e05..4bc517a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * feat(board): add board Waveshare ESP32-P4-NANO @Y1hsiaochunnn (#123) * feat(board): add board Waveshare ESP32-S3-Touch-LCD-4.3B/5/5B/7 @H-sw123 (#124) * feat(board): add configuration for ignoring board in Kconfig +* feat(ci): use finer-grained file modification jobs ### Bugfixes: diff --git a/conftest.py b/conftest.py deleted file mode 100644 index 8e415863..00000000 --- a/conftest.py +++ /dev/null @@ -1,217 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD -# -# SPDX-License-Identifier: Apache-2.0 - -import logging -import os -import pathlib -import re -import sys -from datetime import datetime -from typing import Callable, List, Optional, Tuple - -import pytest -from pytest import Config, FixtureRequest, Function, Session -from pytest_embedded.plugin import multi_dut_argument, multi_dut_fixture - -IDF_VERSION = os.environ.get('IDF_VERSION') -PYTEST_ROOT_DIR = str(pathlib.Path(__file__).parent) -logging.info(f'Pytest root dir: {PYTEST_ROOT_DIR}') - - -@pytest.fixture(scope='session', autouse=True) -def idf_version() -> str: - if os.environ.get('IDF_VERSION'): - return os.environ.get('IDF_VERSION') - idf_path = os.environ.get('IDF_PATH') - if not idf_path: - logging.warning('Failed to get IDF_VERSION!') - return '' - version_path = os.path.join(os.environ['IDF_PATH'], 'tools/cmake/version.cmake') - regex = re.compile(r'^\s*set\s*\(\s*IDF_VERSION_([A-Z]{5})\s+(\d+)') - ver = {} - with open(version_path) as f: - for line in f: - m = regex.match(line) - if m: - ver[m.group(1)] = m.group(2) - return '{}.{}'.format(int(ver['MAJOR']), int(ver['MINOR'])) - - -@pytest.fixture(scope='session', autouse=True) -def session_tempdir() -> str: - _tmpdir = os.path.join( - os.path.dirname(__file__), - 'pytest_log', - datetime.now().strftime('%Y-%m-%d_%H-%M-%S'), - ) - os.makedirs(_tmpdir, exist_ok=True) - return _tmpdir - - -@pytest.fixture -@multi_dut_argument -def config(request: FixtureRequest) -> str: - config_marker = list(request.node.iter_markers(name='config')) - return config_marker[0].args[0] if config_marker else 'defaults' - - -@pytest.fixture -@multi_dut_argument -def app_path(request: FixtureRequest, test_file_path: str) -> str: - config_marker = list(request.node.iter_markers(name='app_path')) - if config_marker: - return config_marker[0].args[0] - else: - # compatible with old pytest-embedded parametrize --app_path - return request.config.getoption('app_path', None) or os.path.dirname(test_file_path) - - -@pytest.fixture -def test_case_name(request: FixtureRequest, target: str, config: str) -> str: - if not isinstance(target, str): - target = '|'.join(sorted(list(set(target)))) - if not isinstance(config, str): - config = '|'.join(sorted(list(config))) - return f'{target}.{config}.{request.node.originalname}' - - -@pytest.fixture -@multi_dut_fixture -def build_dir( - app_path: str, - target: Optional[str], - config: Optional[str], - idf_version: str -) -> Optional[str]: - """ - Check local build dir with the following priority: - - 1. /${IDF_VERSION}/build__ - 2. /${IDF_VERSION}/build_ - 3. /build__ - 4. /build - 5. - - Args: - app_path: app path - target: target - config: config - - Returns: - valid build directory - """ - - assert target - assert config - check_dirs = [] - if idf_version: - check_dirs.append(os.path.join(idf_version, f'build_{target}_{config}')) - check_dirs.append(os.path.join(idf_version, f'build_{target}')) - check_dirs.append(f'build_{target}_{config}') - check_dirs.append('build') - check_dirs.append('.') - for check_dir in check_dirs: - binary_path = os.path.join(app_path, check_dir) - if os.path.isdir(binary_path): - logging.info(f'find valid binary path: {binary_path}') - return check_dir - - logging.warning( - f'checking binary path: {binary_path} ... missing ... try another place') - - logging.error( - f'no build dir. Please build the binary "python .gitlab/tools/build_apps.py {app_path}" and run pytest again') - sys.exit(1) - - -@pytest.fixture(autouse=True) -@multi_dut_fixture -def junit_properties( - test_case_name: str, record_xml_attribute: Callable[[str, object], None] -) -> None: - """ - This fixture is autoused and will modify the junit report test case name to .. - """ - record_xml_attribute('name', test_case_name) - - -################## -# Hook functions # -################## -_idf_pytest_embedded_key = pytest.StashKey['IdfPytestEmbedded'] - - -def pytest_addoption(parser: pytest.Parser) -> None: - base_group = parser.getgroup('idf') - base_group.addoption( - '--env', - help='only run tests matching the environment NAME.', - ) - - -def pytest_configure(config: Config) -> None: - # Require cli option "--target" - help_commands = ['--help', '--fixtures', '--markers', '--version'] - for cmd in help_commands: - if cmd in config.invocation_params.args: - target = 'unneeded' - break - else: - target = config.getoption('target') - if not target: - raise ValueError('Please specify one target marker via "--target [TARGET]"') - - config.stash[_idf_pytest_embedded_key] = IdfPytestEmbedded( - target=target, - env_name=config.getoption('env'), - ) - config.pluginmanager.register(config.stash[_idf_pytest_embedded_key]) - - -def pytest_unconfigure(config: Config) -> None: - _pytest_embedded = config.stash.get(_idf_pytest_embedded_key, None) - if _pytest_embedded: - del config.stash[_idf_pytest_embedded_key] - config.pluginmanager.unregister(_pytest_embedded) - - -class IdfPytestEmbedded: - def __init__( - self, - target: Optional[str] = None, - env_name: Optional[str] = None, - ): - # CLI options to filter the test cases - self.target = target - self.env_name = env_name - - self._failed_cases: List[ - Tuple[str, bool, bool] - ] = [] # (test_case_name, is_known_failure_cases, is_xfail) - - @pytest.hookimpl(tryfirst=True) - def pytest_sessionstart(self, session: Session) -> None: - if self.target: - self.target = self.target.lower() - session.config.option.target = self.target - - # @pytest.hookimpl(tryfirst=True) - def pytest_collection_modifyitems(self, items: List[Function]) -> None: - # set default timeout 10 minutes for each case - for item in items: - # default timeout 5 mins - if 'timeout' not in item.keywords: - item.add_marker(pytest.mark.timeout(5 * 60)) - - # filter all the test cases with "--target" - if self.target: - def item_targets(item): - return [m.args[0] for m in item.iter_markers(name='target')] - items[:] = [item for item in items if self.target in item_targets(item)] - - # filter all the test cases with "--env" - if self.env_name: - def item_envs(item): - return [m.args[0] for m in item.iter_markers(name='env')] - items[:] = [item for item in items if self.env_name in item_envs(item)] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 8026cc74..00000000 --- a/pytest.ini +++ /dev/null @@ -1,42 +0,0 @@ -[pytest] -# exclude examples/ota/simple_ota_example/pytest_simple_ota.py -norecursedirs = examples/ota/* -# only the files with prefix `pytest_` would be recognized as pytest test scripts. -python_files = pytest_*.py - -# set traceback to "short" to prevent the overwhelming tracebacks -addopts = - -s - --embedded-services esp,idf - --tb short - --skip-check-coredump y - -# ignore PytestExperimentalApiWarning for record_xml_attribute -filterwarnings = - ignore::_pytest.warning_types.PytestExperimentalApiWarning - - -markers = - # target markers - target: target chip name (--target) - # env markers - env: target test env name (--env) - # config markers - config: choose specific bins built by `sdkconfig.ci.` - # app_path markers - app_path: choose specific app_path, [/build_xxx] - - -# log related -log_cli = True -log_cli_level = INFO -log_cli_format = %(asctime)s %(levelname)s %(message)s -log_cli_date_format = %Y-%m-%d %H:%M:%S - -# junit related -junit_family = xunit1 - - -## log all to `system-out` when case fail -junit_logging = stdout -junit_log_passing_tests = False diff --git a/src/ESP_Panel_Library.h b/src/ESP_Panel_Library.h index bb63e6fd..d1cdc9e6 100644 --- a/src/ESP_Panel_Library.h +++ b/src/ESP_Panel_Library.h @@ -60,4 +60,4 @@ #include "ESP_IOExpander_Library.h" /* Panel */ -#include "ESP_Panel.h" +#include "panel/ESP_Panel.h" diff --git a/src/board/m5stack/M5CORES3.h b/src/board/m5stack/M5CORES3.h index f05acc69..83aa025a 100644 --- a/src/board/m5stack/M5CORES3.h +++ b/src/board/m5stack/M5CORES3.h @@ -5,7 +5,7 @@ */ #pragma once -#include + // *INDENT-OFF* //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/ESP_Panel.cpp b/src/panel/ESP_Panel.cpp similarity index 99% rename from src/ESP_Panel.cpp rename to src/panel/ESP_Panel.cpp index d5e706c1..c86f8879 100644 --- a/src/ESP_Panel.cpp +++ b/src/panel/ESP_Panel.cpp @@ -4,6 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "ESP_PanelLog.h" +#include "ESP_Panel.h" #include "ESP_Panel_Library.h" #ifdef ESP_PANEL_USE_BOARD diff --git a/src/ESP_Panel.h b/src/panel/ESP_Panel.h similarity index 91% rename from src/ESP_Panel.h rename to src/panel/ESP_Panel.h index d6797d82..903844b5 100644 --- a/src/ESP_Panel.h +++ b/src/panel/ESP_Panel.h @@ -5,7 +5,14 @@ */ #pragma once -#include "ESP_Panel_Library.h" +#include "ESP_Panel_Conf_Internal.h" +#include "ESP_Panel_Board_Internal.h" +#include "host/ESP_PanelHost.h" +#include "bus/ESP_PanelBus.h" +#include "lcd/ESP_PanelLcd.h" +#include "touch/ESP_PanelTouch.h" +#include "backlight/ESP_PanelBacklight.h" +#include "ESP_IOExpander_Library.h" #ifdef ESP_PANEL_USE_BOARD #include diff --git a/test_apps/common/CMakeLists.txt b/test_apps/common/CMakeLists.txt new file mode 100644 index 00000000..87bdb0ce --- /dev/null +++ b/test_apps/common/CMakeLists.txt @@ -0,0 +1,5 @@ +# The following lines of boilerplate have to be in your project's CMakeLists +# in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(common_test) diff --git a/test_apps/common/main/CMakeLists.txt b/test_apps/common/main/CMakeLists.txt new file mode 100644 index 00000000..28d0889f --- /dev/null +++ b/test_apps/common/main/CMakeLists.txt @@ -0,0 +1,4 @@ +idf_component_register( + SRCS "test_app_main.cpp" "test_common.cpp" + WHOLE_ARCHIVE +) diff --git a/test_apps/common/main/idf_component.yml b/test_apps/common/main/idf_component.yml new file mode 100644 index 00000000..e69eb944 --- /dev/null +++ b/test_apps/common/main/idf_component.yml @@ -0,0 +1,9 @@ +## IDF Component Manager Manifest File +dependencies: + test_utils: + path: ${IDF_PATH}/tools/unit-test-app/components/test_utils + test_driver_utils: + path: ${IDF_PATH}/components/driver/test_apps/components/test_driver_utils + ESP32_Display_Panel: + version: "*" + override_path: "../../../../ESP32_Display_Panel" diff --git a/test_apps/common/main/test_app_main.cpp b/test_apps/common/main/test_app_main.cpp new file mode 100644 index 00000000..811cfc94 --- /dev/null +++ b/test_apps/common/main/test_app_main.cpp @@ -0,0 +1,70 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ +#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_heap_caps.h" +#include "unity.h" +#include "unity_test_runner.h" +#include "ESP_Panel_Library.h" + +// Some resources are lazy allocated in the LCD driver, the threadhold is left for that case +#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_MIPI_DSI +#define TEST_MEMORY_LEAK_THRESHOLD (-800) +#elif ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_RGB +#define TEST_MEMORY_LEAK_THRESHOLD (-500) +#else +#define TEST_MEMORY_LEAK_THRESHOLD (-300) +#endif + +static size_t before_free_8bit; +static size_t before_free_32bit; + +static void check_leak(size_t before_free, size_t after_free, const char *type) +{ + ssize_t delta = after_free - before_free; + printf("MALLOC_CAP_%s: Before %u bytes free, After %u bytes free (delta %d)\n", type, before_free, after_free, delta); + TEST_ASSERT_MESSAGE(delta >= TEST_MEMORY_LEAK_THRESHOLD, "memory leak"); +} + +void setUp(void) +{ + before_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); +} + +void tearDown(void) +{ + size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); + check_leak(before_free_8bit, after_free_8bit, "8BIT"); + check_leak(before_free_32bit, after_free_32bit, "32BIT"); +} + +extern "C" void app_main(void) +{ + /** + * _______ ______ __ __ ________ __ + * | \ / \ | \ | \| \| \ + * | $$$$$$$\| $$$$$$\| $$\ | $$| $$$$$$$$| $$ + * | $$__/ $$| $$__| $$| $$$\| $$| $$__ | $$ + * | $$ $$| $$ $$| $$$$\ $$| $$ \ | $$ + * | $$$$$$$ | $$$$$$$$| $$\$$ $$| $$$$$ | $$ + * | $$ | $$ | $$| $$ \$$$$| $$_____ | $$_____ + * | $$ | $$ | $$| $$ \$$$| $$ \| $$ \ + * \$$ \$$ \$$ \$$ \$$ \$$$$$$$$ \$$$$$$$$ + */ + printf(" _______ ______ __ __ ________ __\r\n"); + printf("| \\ / \\ | \\ | \\| \\| \\\r\n"); + printf("| $$$$$$$\\| $$$$$$\\| $$\\ | $$| $$$$$$$$| $$\r\n"); + printf("| $$__/ $$| $$__| $$| $$$\\| $$| $$__ | $$\r\n"); + printf("| $$ $$| $$ $$| $$$$\\ $$| $$ \\ | $$\r\n"); + printf("| $$$$$$$ | $$$$$$$$| $$\\$$ $$| $$$$$ | $$\r\n"); + printf("| $$ | $$ | $$| $$ \\$$$$| $$_____ | $$_____\r\n"); + printf("| $$ | $$ | $$| $$ \\$$$| $$ \\| $$ \\\r\n"); + printf(" \\$$ \\$$ \\$$ \\$$ \\$$ \\$$$$$$$$ \\$$$$$$$$\r\n"); + unity_run_menu(); +} diff --git a/test_apps/common/main/test_common.cpp b/test_apps/common/main/test_common.cpp new file mode 100644 index 00000000..f96cecc5 --- /dev/null +++ b/test_apps/common/main/test_common.cpp @@ -0,0 +1,118 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ +#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_heap_caps.h" +#include "esp_log.h" +#include "unity.h" +#include "unity_test_runner.h" +#include "ESP_Panel_Library.h" + +#define TEST_LCD_ENABLE_ATTACH_CALLBACK (0) +#define TEST_LCD_SHOW_TIME_MS (5000) + +#define TEST_TOUCH_ENABLE_ATTACH_CALLBACK (0) +#define TEST_TOUCH_READ_POINTS_NUM (5) +#define TEST_TOUCH_READ_TIME_MS (3000) +#define TEST_TOUCH_READ_DELAY_MS (30) + +#define delay(x) vTaskDelay(pdMS_TO_TICKS(x)) + +using namespace std; + +static const char *TAG = "test_panel"; + +#if TEST_LCD_ENABLE_ATTACH_CALLBACK +IRAM_ATTR static bool onLcdRefreshFinishCallback(void *user_data) +{ + esp_rom_printf("Refresh finish callback\n"); + + return false; +} +#endif + +#if TEST_TOUCH_ENABLE_ATTACH_CALLBACK && (ESP_PANEL_TOUCH_IO_INT >= 0) +IRAM_ATTR static bool onTouchInterruptCallback(void *user_data) +{ + esp_rom_printf("Touch interrupt callback\n"); + + return false; +} +#endif + +TEST_CASE("Test component common drivers", "[common]") +{ + shared_ptr panel = make_shared(); + TEST_ASSERT_NOT_NULL_MESSAGE(panel, "Create panel object failed"); + + ESP_LOGI(TAG, "Initialize display panel"); + TEST_ASSERT_TRUE_MESSAGE(panel->init(), "Panel init failed"); + TEST_ASSERT_TRUE_MESSAGE(panel->begin(), "Panel begin failed"); + + ESP_PanelLcd *lcd = panel->getLcd(); + ESP_PanelTouch *touch = panel->getTouch(); + ESP_PanelBacklight *backlight = panel->getBacklight(); + + if (backlight != nullptr) { + ESP_LOGI(TAG, "Turn off the backlight"); + backlight->off(); + } else { + ESP_LOGI(TAG, "Backlight is not available"); + } + + if (lcd != nullptr) { +#if TEST_LCD_ENABLE_ATTACH_CALLBACK + TEST_ASSERT_TRUE_MESSAGE( + lcd->attachRefreshFinishCallback(onLcdRefreshFinishCallback, NULL), "Attach refresh callback failed" + ); +#endif + ESP_LOGI(TAG, "Draw color bar from top to bottom, the order is B - G - R"); + TEST_ASSERT_TRUE_MESSAGE( + lcd->colorBarTest(panel->getLcdWidth(), panel->getLcdHeight()), "LCD color bar test failed" + ); + } else { + ESP_LOGI(TAG, "LCD is not available"); + } + + if (backlight != nullptr) { + ESP_LOGI(TAG, "Turn on the backlight"); + TEST_ASSERT_TRUE_MESSAGE(backlight->on(), "Backlight on failed"); + } + + if (lcd != nullptr) { + ESP_LOGI(TAG, "Wait for %d ms to show the color bar", TEST_LCD_SHOW_TIME_MS); + vTaskDelay(pdMS_TO_TICKS(TEST_LCD_SHOW_TIME_MS)); + } + + if (touch != nullptr) { +#if TEST_LCD_ENABLE_ATTACH_CALLBACK && (ESP_PANEL_TOUCH_IO_INT >= 0) + TEST_ASSERT_TRUE_MESSAGE( + touch->attachInterruptCallback(onTouchInterruptCallback, NULL), "Attach touch interrupt callback failed" + ); +#endif + uint32_t t = 0; + ESP_PanelTouchPoint point[TEST_TOUCH_READ_POINTS_NUM]; + int read_touch_result = 0; + + ESP_LOGI(TAG, "Reading touch_device point..."); + while (t++ < TEST_TOUCH_READ_TIME_MS / TEST_TOUCH_READ_DELAY_MS) { + read_touch_result = touch->readPoints(point, TEST_TOUCH_READ_POINTS_NUM, TEST_TOUCH_READ_DELAY_MS); + if (read_touch_result > 0) { + for (int i = 0; i < read_touch_result; i++) { + ESP_LOGI(TAG, "Touch point(%d): x %d, y %d, strength %d\n", i, point[i].x, point[i].y, point[i].strength); + } + } else if (read_touch_result < 0) { + ESP_LOGE(TAG, "Read touch_device point failed"); + } + if (!touch->isInterruptEnabled()) { + delay(TEST_TOUCH_READ_DELAY_MS); + } + } + } else { + ESP_LOGI(TAG, "Touch is not available"); + } +} diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit b/test_apps/common/sdkconfig.ci.espressif_esp32_c3_lcdkit similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_c3_lcdkit rename to test_apps/common/sdkconfig.ci.espressif_esp32_c3_lcdkit diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board b/test_apps/common/sdkconfig.ci.espressif_esp32_p4_function_ev_board similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_p4_function_ev_board rename to test_apps/common/sdkconfig.ci.espressif_esp32_p4_function_ev_board diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 b/test_apps/common/sdkconfig.ci.espressif_esp32_s3_box_3 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3 rename to test_apps/common/sdkconfig.ci.espressif_esp32_s3_box_3 diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 b/test_apps/common/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 rename to test_apps/common/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 b/test_apps/common/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 rename to test_apps/common/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 diff --git a/test_apps/common/sdkconfig.defaults b/test_apps/common/sdkconfig.defaults new file mode 100644 index 00000000..9cba724d --- /dev/null +++ b/test_apps/common/sdkconfig.defaults @@ -0,0 +1,5 @@ +CONFIG_ESP_TASK_WDT_EN=n +CONFIG_FREERTOS_HZ=1000 + +CONFIG_ESP_PANEL_USE_SUPPORTED_BOARD=y +CONFIG_BOARD_MANUFACTURER_ALL=y diff --git a/test_apps/common/sdkconfig.defaults.esp32p4 b/test_apps/common/sdkconfig.defaults.esp32p4 new file mode 100644 index 00000000..449e9636 --- /dev/null +++ b/test_apps/common/sdkconfig.defaults.esp32p4 @@ -0,0 +1,8 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_HEX=y +CONFIG_SPIRAM_SPEED_200M=y +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/test_apps/common/sdkconfig.defaults.esp32s3 b/test_apps/common/sdkconfig.defaults.esp32s3 new file mode 100644 index 00000000..8770213f --- /dev/null +++ b/test_apps/common/sdkconfig.defaults.esp32s3 @@ -0,0 +1,13 @@ +CONFIG_COMPILER_OPTIMIZATION_PERF=y + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_SPEED_80M=y +# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash +# For v5.2 and below +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y +# For v5.3 and above +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +# Used in conjunction with "RGB Bounce Buffer" +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 b/test_apps/lvgl_port/sdkconfig.elecrow.crowpanel_7_0 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.elecrow_crowpanel_7_0 rename to test_apps/lvgl_port/sdkconfig.elecrow.crowpanel_7_0 diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit b/test_apps/lvgl_port/sdkconfig.espressif.esp32_c3_lcdkit similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_c3_lcdkit rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_c3_lcdkit diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board b/test_apps/lvgl_port/sdkconfig.espressif.esp32_p4_function_ev_board similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_p4_function_ev_board rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_p4_function_ev_board diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_3 similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3 rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_3 diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_3_beta similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_3_beta rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_3_beta diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_lite similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_box_lite rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_box_lite diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_eye similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_eye rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_eye diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_korvo_2 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_korvo_2 rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_korvo_2 diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_2 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_2 diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2_v1_5 rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_v1_5 rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 diff --git a/test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg b/test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_usb_otg similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.espressif_esp32_s3_usb_otg rename to test_apps/lvgl_port/sdkconfig.espressif.esp32_s3_usb_otg diff --git a/test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 b/test_apps/lvgl_port/sdkconfig.jingcai.esp32_4848S040C_I_Y_3 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 rename to test_apps/lvgl_port/sdkconfig.jingcai.esp32_4848S040C_I_Y_3 diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 b/test_apps/lvgl_port/sdkconfig.m5stack.m5core2 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core2 rename to test_apps/lvgl_port/sdkconfig.m5stack.m5core2 diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 b/test_apps/lvgl_port/sdkconfig.m5stack.m5core3 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.m5stack_m5core3 rename to test_apps/lvgl_port/sdkconfig.m5stack.m5core3 diff --git a/test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial b/test_apps/lvgl_port/sdkconfig.m5stack.m5dial similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.m5stack_m5dial rename to test_apps/lvgl_port/sdkconfig.m5stack.m5dial diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_p4_nano similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_p4_nano rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_p4_nano diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_1_85 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_1_85 diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_2_1 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_2_1 diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3 diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_5 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_5 diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_5_B similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5_B rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_5_B diff --git a/test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 b/test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_7 similarity index 100% rename from test_apps/lvgl_port/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 rename to test_apps/lvgl_port/sdkconfig.waveshare.esp32_s3_touch_lcd_7 diff --git a/test_apps/panel/main/test_app_main.cpp b/test_apps/panel/main/test_app_main.cpp index 9b5a6232..811cfc94 100644 --- a/test_apps/panel/main/test_app_main.cpp +++ b/test_apps/panel/main/test_app_main.cpp @@ -9,7 +9,7 @@ #include "esp_heap_caps.h" #include "unity.h" #include "unity_test_runner.h" -#include "ESP_Panel.h" +#include "ESP_Panel_Library.h" // Some resources are lazy allocated in the LCD driver, the threadhold is left for that case #if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_MIPI_DSI diff --git a/test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 b/test_apps/panel/sdkconfig.elecrow.crowpanel_7_0 similarity index 100% rename from test_apps/panel/sdkconfig.ci.elecrow_crowpanel_7_0 rename to test_apps/panel/sdkconfig.elecrow.crowpanel_7_0 diff --git a/test_apps/panel/sdkconfig.espressif.esp32_c3_lcdkit b/test_apps/panel/sdkconfig.espressif.esp32_c3_lcdkit new file mode 100644 index 00000000..fc1ce926 --- /dev/null +++ b/test_apps/panel/sdkconfig.espressif.esp32_c3_lcdkit @@ -0,0 +1,3 @@ +CONFIG_IDF_TARGET="esp32c3" +CONFIG_BOARD_ESP32_C3_LCDKIT=y +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y diff --git a/test_apps/panel/sdkconfig.espressif.esp32_p4_function_ev_board b/test_apps/panel/sdkconfig.espressif.esp32_p4_function_ev_board new file mode 100644 index 00000000..328e7230 --- /dev/null +++ b/test_apps/panel/sdkconfig.espressif.esp32_p4_function_ev_board @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32p4" +CONFIG_BOARD_ESP32_P4_FUNCTION_EV_BOARD=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box b/test_apps/panel/sdkconfig.espressif.esp32_s3_box similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box rename to test_apps/panel/sdkconfig.espressif.esp32_s3_box diff --git a/test_apps/panel/sdkconfig.espressif.esp32_s3_box_3 b/test_apps/panel/sdkconfig.espressif.esp32_s3_box_3 new file mode 100644 index 00000000..cdf4b6de --- /dev/null +++ b/test_apps/panel/sdkconfig.espressif.esp32_s3_box_3 @@ -0,0 +1,5 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_ESP32_S3_BOX_3=y +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta b/test_apps/panel/sdkconfig.espressif.esp32_s3_box_3_beta similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_3_beta rename to test_apps/panel/sdkconfig.espressif.esp32_s3_box_3_beta diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite b/test_apps/panel/sdkconfig.espressif.esp32_s3_box_lite similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_box_lite rename to test_apps/panel/sdkconfig.espressif.esp32_s3_box_lite diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye b/test_apps/panel/sdkconfig.espressif.esp32_s3_eye similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_eye rename to test_apps/panel/sdkconfig.espressif.esp32_s3_eye diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 b/test_apps/panel/sdkconfig.espressif.esp32_s3_korvo_2 similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_korvo_2 rename to test_apps/panel/sdkconfig.espressif.esp32_s3_korvo_2 diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board rename to test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2 similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_lcd_ev_board_2 rename to test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2 diff --git a/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 new file mode 100644 index 00000000..0364ee45 --- /dev/null +++ b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_2_v1_5 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 new file mode 100644 index 00000000..f02b235e --- /dev/null +++ b/test_apps/panel/sdkconfig.espressif.esp32_s3_lcd_ev_board_v1_5 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOARD_ESP32_S3_LCD_EV_BOARD_V1_5=y + +CONFIG_SPIRAM_MODE_OCT=y diff --git a/test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg b/test_apps/panel/sdkconfig.espressif.esp32_s3_usb_otg similarity index 100% rename from test_apps/panel/sdkconfig.ci.espressif_esp32_s3_usb_otg rename to test_apps/panel/sdkconfig.espressif.esp32_s3_usb_otg diff --git a/test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 b/test_apps/panel/sdkconfig.jingcai.esp32_4848S040C_I_Y_3 similarity index 100% rename from test_apps/panel/sdkconfig.ci.jingcai_esp32_4848S040C_I_Y_3 rename to test_apps/panel/sdkconfig.jingcai.esp32_4848S040C_I_Y_3 diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5core2 b/test_apps/panel/sdkconfig.m5stack.m5core2 similarity index 100% rename from test_apps/panel/sdkconfig.ci.m5stack_m5core2 rename to test_apps/panel/sdkconfig.m5stack.m5core2 diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5core3 b/test_apps/panel/sdkconfig.m5stack.m5core3 similarity index 100% rename from test_apps/panel/sdkconfig.ci.m5stack_m5core3 rename to test_apps/panel/sdkconfig.m5stack.m5core3 diff --git a/test_apps/panel/sdkconfig.ci.m5stack_m5dial b/test_apps/panel/sdkconfig.m5stack.m5dial similarity index 100% rename from test_apps/panel/sdkconfig.ci.m5stack_m5dial rename to test_apps/panel/sdkconfig.m5stack.m5dial diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano b/test_apps/panel/sdkconfig.waveshare.esp32_p4_nano similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_p4_nano rename to test_apps/panel/sdkconfig.waveshare.esp32_p4_nano diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_1_85 similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_1_85 rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_1_85 diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_2_1 similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_2_1 rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_2_1 diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3 similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3 rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3 diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_4_3_b rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_4_3_b diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5 similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_5 rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5 diff --git a/test_apps/panel/sdkconfig.ci.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.ci.waveshare_esp32_s3_touch_lcd_5_B rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_5_B diff --git a/test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 b/test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_7 similarity index 100% rename from test_apps/panel/sdkconfig.ci.waveshare_esp32_s3_touch_lcd_7 rename to test_apps/panel/sdkconfig.waveshare.esp32_s3_touch_lcd_7