From 102cb69aecd35b1a84a15c9ffb255d46580cf961 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 24 Oct 2024 22:40:57 +0200 Subject: [PATCH] Updated base components up to step 6 Todo: - Doc files - README - PanelVersions - CHANGELOG Update Board_Instructions.md Update README.md Update README_CN.md Update ESP_PanelVersions.h Update CHANGELOG.md Update src/board/ESP_PanelBoard.h Co-authored-by: Zhongwei Liu <109257001+Lzw655@users.noreply.github.com> Suggested updates Pre-commit success --- .github/workflows/pre-commit.yml | 2 +- CHANGELOG.md | 6 + ESP_Panel_Board_Supported.h | 7 +- README.md | 2 +- README_CN.md | 2 +- check_copyright_config.yaml | 2 +- docs/Board_Contribution_Guide.md | 2 +- docs/Board_Contribution_Guide_CN.md | 2 +- docs/Board_Instructions.md | 2 + .../v8/Porting/ESP_Panel_Board_Supported.h | 7 +- .../v8/Rotation/ESP_Panel_Board_Supported.h | 7 +- .../PanelTest/ESP_Panel_Board_Supported.h | 7 +- .../src/ESP_Panel_Board_Supported.h | 7 +- .../v8/Porting/ESP_Panel_Board_Supported.h | 7 +- .../v8/WiFiClock/ESP_Panel_Board_Supported.h | 7 +- library.properties | 4 +- src/ESP_PanelVersions.h | 4 +- src/board/ESP_PanelBoard.h | 8 +- src/board/waveshare/ESP32_S3_Touch_LCD_1_85.h | 261 ++++++++++++++++++ ...uch_LCD_4.3.h => ESP32_S3_Touch_LCD_4_3.h} | 0 20 files changed, 312 insertions(+), 34 deletions(-) create mode 100644 src/board/waveshare/ESP32_S3_Touch_LCD_1_85.h rename src/board/waveshare/{ESP32_S3_Touch_LCD_4.3.h => ESP32_S3_Touch_LCD_4_3.h} (100%) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 6c5a578c..6ad99eda 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,4 +14,4 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 \ No newline at end of file + - uses: pre-commit/action@v2.0.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 44afb311..c4968b6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog +## v0.1.8 - 2024-10-25 + +* feat(board): add support for Waveshare ESP32-S3-Touch-LCD-1.85 + +### Enhancements: + ## v0.1.7 - 2024-08-22 ### Enhancements: diff --git a/ESP_Panel_Board_Supported.h b/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/ESP_Panel_Board_Supported.h +++ b/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/README.md b/README.md index 7918c1e6..f9aa309c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Below is a 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 | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85 | Developers and manufacturers are welcomed to contribute PRs to add more development boards. For detailed instructions, please refer to the [`Board Development Guide`](./docs/Board_Contribution_Guide.md). diff --git a/README_CN.md b/README_CN.md index ab51df37..6b487326 100644 --- a/README_CN.md +++ b/README_CN.md @@ -66,7 +66,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 | +| [Waveshare](docs/Board_Instructions.md#waveshare) | ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-1.85 | 欢迎开发者和厂商贡献 PR 来添加更多的开发板,详细说明请参考 [`开发板贡献指南`](./docs/Board_Contribution_Guide_CN.md)。 diff --git a/check_copyright_config.yaml b/check_copyright_config.yaml index 7b484aaf..78761a6b 100644 --- a/check_copyright_config.yaml +++ b/check_copyright_config.yaml @@ -39,4 +39,4 @@ examples_and_unit_tests: # ignore: # You can also select ignoring files here # perform_check: no # Don't check files from that block -# include: \ No newline at end of file +# include: diff --git a/docs/Board_Contribution_Guide.md b/docs/Board_Contribution_Guide.md index 98a2ea13..08e98e90 100644 --- a/docs/Board_Contribution_Guide.md +++ b/docs/Board_Contribution_Guide.md @@ -58,4 +58,4 @@ Using the adaption of `M5Stack M5DIAL` as an example, follow these steps to modi 5. **[M]** *[ESP_Panel_Board_Supported](../ESP_Panel_Board_Supported.h)*, *[library.properties](../library.properties)*, *[docs/Board_Instructions.md](../docs/Board_Instructions.md)*, *[README_CN.md](../README_CN.md)*, *[README.md](../README.md)*: Update the supported development boards information in these files. 6. **[M]** *[docs/Board_Instructions.md](../docs/Board_Instructions.md)*: Update the recommended configuration for the new development board. 7. **[M]** *[src/ESP_PanelVersions.h](../src/ESP_PanelVersions.h)*: Ensure that the version under `Library Version` should be ahead of the latest tag version in terms of the tag version; when changes occur to *[ESP_Panel_Board_Custom.h](../ESP_Panel_Board_Custom.h)*, *[ESP_Panel_Board_Supported.h](../ESP_Panel_Board_Supported.h)*, and *[ESP_Panel_Conf.h](../ESP_Panel_Conf.h)* in the root directory, ensure that the version number at the end of the corresponding file and at the beginging of *[src/ESP_PanelVersions.h](../src/ESP_PanelVersions.h)* should be ahead of the latest tag version in terms of the minor version. -8. **[M]** *[CHANGELOG.md](../CHANGELOG.md)*: Update the changelog. \ No newline at end of file +8. **[M]** *[CHANGELOG.md](../CHANGELOG.md)*: Update the changelog. diff --git a/docs/Board_Contribution_Guide_CN.md b/docs/Board_Contribution_Guide_CN.md index 701322ac..83d7e60a 100644 --- a/docs/Board_Contribution_Guide_CN.md +++ b/docs/Board_Contribution_Guide_CN.md @@ -58,4 +58,4 @@ pip3 install pre-commit && pre-commit install 5. **[M]** *[ESP_Panel_Board_Supported](../ESP_Panel_Board_Supported.h)*、*[library.properties](../library.properties)*、*[docs/Board_Instructions.md](../docs/Board_Instructions.md)*、*[README_CN.md](../README_CN.md)*、*[README.md](../README.md)*:更新上述文件中“已支持开发板”说明。 6. **[M]** *[docs/Board_Instructions.md](../docs/Board_Instructions.md)*:更新新开发板的推荐配置。 7. **[M]** *[src/ESP_PanelVersions.h](../src/ESP_PanelVersions.h)*:确保 `Library Version` 下的版本应小版本领先于最新 tag 版本。当根目录下的 *[ESP_Panel_Board_Custom.h](../ESP_Panel_Board_Custom.h)*、*[ESP_Panel_Board_Supported.h](../ESP_Panel_Board_Supported.h)* 和 *[ESP_Panel_Conf.h](../ESP_Panel_Conf.h)* 发生变化时,相应文件末尾和 *[src/ESP_PanelVersions.h](../src/ESP_PanelVersions.h)* 开头的版本号应中版本领先于最新 tag 版本。 -8. **[M]** *[CHANGELOG.md](../CHANGELOG.md)*:更新变更日志。 \ No newline at end of file +8. **[M]** *[CHANGELOG.md](../CHANGELOG.md)*:更新变更日志。 diff --git a/docs/Board_Instructions.md b/docs/Board_Instructions.md index beb745bf..f4c4fc46 100644 --- a/docs/Board_Instructions.md +++ b/docs/Board_Instructions.md @@ -43,6 +43,7 @@ | **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 | ## Recommended Configurations in the Arduino IDE @@ -66,6 +67,7 @@ Below are recommended configurations for developing GUI applications on differen | 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) | **Notes:** diff --git a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h +++ b/examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h +++ b/examples/Panel/PanelTest/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/PlatformIO/src/ESP_Panel_Board_Supported.h +++ b/examples/PlatformIO/src/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h index a1b8821c..1d70523a 100644 --- a/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h +++ b/examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h @@ -77,11 +77,12 @@ /* * Waveshare Supported Boards (https://www.waveshare.com/): * - * - 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 (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 * */ // #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 +// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// @@ -98,7 +99,7 @@ * */ #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0 #endif diff --git a/library.properties b/library.properties index 2a6c0738..ff0dbfe7 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=ESP32_Display_Panel -version=0.1.7 +version=0.1.8 author=espressif maintainer=espressif sentence=ESP32_Display_Panel is an Arduino 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,M5STACK-M5CORE2,M5STACK-M5DIAL,M5STACK-M5CORES3,ESP32-4848S040C_I_Y_3. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB. Currently supported LCD controllers: EK9716B,GC9A01,GC9B71,GC9503,ILI9341,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,M5STACK-M5CORE2,M5STACK-M5DIAL,M5STACK-M5CORES3,ESP32-4848S040C_I_Y_3,ESP32-S3-Touch-LCD-4.3,ESP32-S3-Touch-LCD-1.85. Currently supported devices: Bus,LCD,Touch,Backlight,IO expander. Currently supported Bus: I2C,SPI,QSPI,3-wire SPI + RGB. Currently supported LCD controllers: EK9716B,GC9A01,GC9B71,GC9503,ILI9341,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 50337ef1..ac6dae7a 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 1 -#define ESP_PANEL_VERSION_PATCH 7 +#define ESP_PANEL_VERSION_PATCH 8 /* File `ESP_Panel_Conf.h` */ #define ESP_PANEL_CONF_VERSION_MAJOR 0 @@ -25,7 +25,7 @@ /* File `ESP_Panel_Board_Supported.h` */ #define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 0 -#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 3 +#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 4 #define ESP_PANEL_BOARD_SUPPORTED_VERSION_PATCH 0 /* Check if the current configuration file version is compatible with the library version */ diff --git a/src/board/ESP_PanelBoard.h b/src/board/ESP_PanelBoard.h index 6ae99775..7b2b2be4 100644 --- a/src/board/ESP_PanelBoard.h +++ b/src/board/ESP_PanelBoard.h @@ -15,7 +15,7 @@ defined(BOARD_ESP32_S3_LCD_EV_BOARD_V1_5) + defined(BOARD_ESP32_S3_LCD_EV_BOARD_2) + \ defined(BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5) + defined(BOARD_ESP32_S3_USB_OTG) + defined(BOARD_ELECROW_CROWPANEL_7_0) + \ defined(BOARD_M5STACK_M5CORE2) + defined(BOARD_M5STACK_M5DIAL) + defined(BOARD_M5STACK_M5CORES3) + \ - defined(BOARD_ESP32_4848S040C_I_Y_3) + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) \ + defined(BOARD_ESP32_4848S040C_I_Y_3) + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) + defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85) \ > 1 #error "Multiple boards enabled! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." #endif @@ -61,9 +61,11 @@ #include "board/jingcai/ESP32_4848S040C_I_Y_3.h" /* Waveshare */ #elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3) || CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 - #include "board/waveshare/ESP32_S3_Touch_LCD_4.3.h" + #include "board/waveshare/ESP32_S3_Touch_LCD_4_3.h" +#elif defined(BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85) || CONFIG_BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 + #include "board/waveshare/ESP32_S3_Touch_LCD_1_85.h" #else - #error "Unkonw board selected! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." + #error "Unknown board selected! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled." #endif // *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_1_85.h b/src/board/waveshare/ESP32_S3_Touch_LCD_1_85.h new file mode 100644 index 00000000..19f00310 --- /dev/null +++ b/src/board/waveshare/ESP32_S3_Touch_LCD_1_85.h @@ -0,0 +1,261 @@ +/* + * 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 ST77916 + +/* LCD resolution in pixels */ +#define ESP_PANEL_LCD_WIDTH (360) +#define ESP_PANEL_LCD_HEIGHT (360) + +/* 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 (0) // 0/1 +/** + * LCD Bus Type. + */ +#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_QSPI) +/** + * 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_QSPI + + #define ESP_PANEL_LCD_BUS_HOST_ID (1) // Typically set to 1 + #define ESP_PANEL_LCD_SPI_IO_CS (21) +#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST + #define ESP_PANEL_LCD_SPI_IO_SCK (40) + #define ESP_PANEL_LCD_SPI_IO_DATA0 (46) + #define ESP_PANEL_LCD_SPI_IO_DATA1 (45) + #define ESP_PANEL_LCD_SPI_IO_DATA2 (42) + #define ESP_PANEL_LCD_SPI_IO_DATA3 (41) +#endif + #define ESP_PANEL_LCD_SPI_MODE (0) // 0/1/2/3, typically set to 0 + #define ESP_PANEL_LCD_SPI_CLK_HZ (80 * 1000 * 1000) + // Should be an integer divisor of 80M, typically set to 40M + #define ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ (10) // Typically set to 10 + #define ESP_PANEL_LCD_SPI_CMD_BITS (32) // Typically set to 32 + #define ESP_PANEL_LCD_SPI_PARAM_BITS (8) // Typically set to 8 + +#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. Formater: 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 */ +/* Reset pin */ +#define ESP_PANEL_LCD_IO_RST (-1) // IO num of RESET pin, set to -1 if not use +#define ESP_PANEL_LCD_RST_LEVEL (0) // Active level. 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 CST816S + +/* 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 (1) // Typically set to 0 + #define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // 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 +#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 (3) + #define ESP_PANEL_TOUCH_I2C_IO_SDA (1) +#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 */ +/* Reset pin */ +#define ESP_PANEL_TOUCH_IO_RST (-1) // IO num of RESET pin, set to -1 if not use + // For GT911, the RST pin is also used to configure the I2C address +#define ESP_PANEL_TOUCH_RST_LEVEL (0) // Active level. 0: low level, 1: high level +/* Interrupt pin */ +#define ESP_PANEL_TOUCH_IO_INT (4) // IO num of INT pin, set to -1 if not use + // For GT911, the INT pin is also used to configure the I2C address +#define ESP_PANEL_TOUCH_INT_LEVEL (0) // Active level. 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 (5) // 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 (1) // 0/1 +#if ESP_PANEL_USE_EXPANDER +/** + * IO expander name. + */ +#define ESP_PANEL_EXPANDER_NAME TCA95xx_8bit + +/* 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 (0) // 0/1 +/* IO expander parameters */ +#define ESP_PANEL_EXPANDER_HOST_ID (0) // Typically set to 0 +#define ESP_PANEL_EXPANDER_I2C_ADDRESS (0x20) // 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 +#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 (0) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_SDA_PULLUP (0) // 0/1 + #define ESP_PANEL_EXPANDER_I2C_IO_SCL (10) + #define ESP_PANEL_EXPANDER_I2C_IO_SDA (11) +#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 ) \ +{ \ + _expander_ptr->pinMode(0,OUTPUT); \ + _expander_ptr->digitalWrite(0,LOW); \ + vTaskDelay(pdMS_TO_TICKS(30)); \ + _expander_ptr->digitalWrite(0,HIGH); \ + vTaskDelay(pdMS_TO_TICKS(50)); \ +} +// #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 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 + + +// *INDENT-OFF* diff --git a/src/board/waveshare/ESP32_S3_Touch_LCD_4.3.h b/src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h similarity index 100% rename from src/board/waveshare/ESP32_S3_Touch_LCD_4.3.h rename to src/board/waveshare/ESP32_S3_Touch_LCD_4_3.h