Skip to content

Commit 10eb6a5

Browse files
committed
update library
1 parent d226901 commit 10eb6a5

38 files changed

+1589
-250
lines changed

.github/workflows/arduino_lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
pull_request:
66
types: [opened, reopened, synchronize]
7+
push:
8+
branches:
9+
- master
710

811
jobs:
912
lint:

.github/workflows/build_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
pull_request:
66
types: [opened, reopened, synchronize]
7+
push:
8+
branches:
9+
- master
710

811
jobs:
912
build:
@@ -14,6 +17,7 @@ jobs:
1417
[
1518
"sdkconfig.defaults.esp32_c3_lcdkit",
1619
"sdkconfig.defaults.esp32_s3_box",
20+
"sdkconfig.defaults.esp32_s3_box_3",
1721
"sdkconfig.defaults.esp32_s3_box_lite",
1822
"sdkconfig.defaults.esp32_s3_eye",
1923
"sdkconfig.defaults.esp32_s3_korvo_2",

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
pull_request:
66
types: [opened, reopened, synchronize]
7+
push:
8+
branches:
9+
- master
710

811
jobs:
912
pre-commit:

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ idf_component_register(
1212
REQUIRES
1313
driver
1414
esp_lcd
15+
esp-io-expander
1516
)
1617

1718
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-missing-field-initializers -Wno-narrowing)

ESP_Panel_Conf_Template.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Supported Boards.
1616
* - ESP32-C3-LCDkit: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-lcdkit/index.html
1717
* - ESP32-S3-Box: https://github.com/espressif/esp-box/tree/master
18+
* - ESP32-S3-Box-3: https://github.com/espressif/esp-box/tree/master
1819
* - ESP32-S3-Box-Lite: https://github.com/espressif/esp-box/tree/master
1920
* - ESP32-S3-EYE: https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP32-S3-EYE_Getting_Started_Guide.md
2021
* - ESP32-S3-Korvo-2: https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/user-guide-esp32-s3-korvo-2.html
@@ -26,6 +27,7 @@
2627
*/
2728
// #define ESP_PANEL_BOARD_ESP32_C3_LCDKIT
2829
// #define ESP_PANEL_BOARD_ESP32_S3_BOX
30+
// #define ESP_PANEL_BOARD_ESP32_S3_BOX_3
2931
// #define ESP_PANEL_BOARD_ESP32_S3_BOX_LITE
3032
// #define ESP_PANEL_BOARD_ESP32_S3_EYE
3133
// #define ESP_PANEL_BOARD_ESP32_S3_KORVO_2
@@ -40,10 +42,9 @@
4042
#if ESP_PANEL_USE_LCD
4143
/**
4244
* LCD IC name. Choose one of the following:
43-
* - ST7262
44-
* - ST7789
45-
* - GC9503
46-
* - GC9A01
45+
* - ILI9341
46+
* - GC9503, GC9A01
47+
* - ST7262, ST7789, ST7796
4748
*/
4849
#define ESP_PANEL_LCD_NAME ST7789
4950

@@ -167,8 +168,7 @@
167168
* LCD Touch IC name. Choose one of the following:
168169
* - CST816S
169170
* - FT5x06
170-
* - GT1151
171-
* - GT911
171+
* - GT1151, GT911
172172
* - TT21100
173173
* - STMPE610
174174
*/

Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ menu "ESP Panel Configuration"
2525
bool "ESP32-S3-Box"
2626
help
2727
320x240, LCD: ILI9342, Touch: TT21100
28+
config ESP_PANEL_BOARD_ESP32_S3_BOX_3
29+
bool "ESP32-S3-Box-3"
30+
help
31+
320x240, LCD: ILI9342, Touch: TT21100
2832
config ESP_PANEL_BOARD_ESP32_S3_BOX_LITE
2933
bool "ESP32-S3-Box-Lite"
3034
help

README.md

Lines changed: 60 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
# esp-display-panel
1+
[![Arduino Lint](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml) [![pre-commit](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml) [![Build Test Apps](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/build_test.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/build_test.yml)
22

3-
esp-display-panel is a versatile Arduino library designed to drive display panels with ESP32. It is primarily developed for various [Espressif development boards](#espressif-development-boards), and can also be used for custom boards.
3+
# ESP32_Display_Panel
44

5-
esp-display-panel is based on [arduino-esp32](https://github.com/espressif/arduino-esp32) and [Espressif Components Registry](https://components.espressif.com/), with various components encapsulated using C++.
5+
* [中文版](./README_CN.md)
6+
7+
ESP32_Display_Panel is an Arduino library designed for driving display screens using ESP32 SoCs. It can be used not only for developing various [Espressif development boards](#espressif-development-boards) but also for custom board development.
8+
9+
ESP32_Display_Panel encapsulates various components from the [Espressif Components Registry](https://components.espressif.com/). It is developed based on [arduino-esp32](https://github.com/espressif/arduino-esp32) and can be easily downloaded and integrated into the Arduino IDE.
610

711
## Overview
812

9-
The block diagram of esp-display-panel is shown in the figure below, mainly comprising the following features:
13+
The block diagram of ESP32_Display_Panel is shown in the figure below, it primarily includes the following features:
1014

1115
* Supports various Espressif development boards.
12-
* Supports custom boards.
16+
* Supports custom board.
1317
* Supports multiple types of drivers, including Bus, LCD, Touch, Backlight.
1418

1519
<div align="center"><img src="docs/_static/block_diagram.png" alt ="Block Diagram" width="600"></div>
1620

1721
## Dependencies Version
1822

19-
| **esp-display-panel** | **arduino-esp32** | **esp-io-expander** |
20-
| :-------------------: | :---------------: | :-----------------: |
21-
| v0.x.x | >= v2.0.9 | >= v0.0.1 |
23+
| **Name** | **Version** |
24+
| ------------------------------------------------------------------------ | ----------- |
25+
| ESP32_Display_Panel | v0.x.x |
26+
| [ESP32_IO_Expander](https://github.com/esp-arduino-libs/esp-io-expander) | >= v0.0.1 |
27+
| [arduino-esp32](https://github.com/espressif/arduino-esp32) | >= v2.0.9 |
2228

2329
## Supported Boards & Drivers
2430

@@ -28,6 +34,7 @@ The block diagram of esp-display-panel is shown in the figure below, mainly comp
2834
| :--------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :--------------: | :----------------: | :-----------: | :------------------: |
2935
| <img src="https://docs.espressif.com/projects/esp-dev-kits/en/latest/_images/esp32-c3-lcdkit-isometric-raw.png" width="150"> | [ESP32-C3-LCDkit](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-lcdkit/index.html) | SPI | GC9A01 | - | - |
3036
| <img src="https://github.com/espressif/esp-box/raw/master/docs/_static/esp32_s3_box.png" width="150"> | [ESP32-S3-Box](https://github.com/espressif/esp-box/tree/master) | SPI | ILI9342 | I2C | TT21100 |
37+
| <img src="https://github.com/espressif/esp-box/raw/master/docs/_static/esp32_s3_box_3.png" width="150"> |[ESP32-S3-Box-3](https://github.com/espressif/esp-box/tree/master) | SPI | ILI9342 | I2C | TT21100 |
3138
| <img src="https://github.com/espressif/esp-box/raw/master/docs/_static/esp32_s3_box_lite.png" width="150"> | [ESP32-S3-Box-Lite](https://github.com/espressif/esp-box/tree/master) | SPI | ST7789 | - | - |
3239
| <img src="https://github.com/espressif/esp-who/raw/master/docs/_static/get-started/ESP32-S3-EYE-isometric.png" width="100"> | [ESP32-S3-EYE](https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP32-S3-EYE_Getting_Started_Guide.md) | SPI | ST7789 | - | - |
3340
| <img src="https://docs.espressif.com/projects/esp-adf/en/latest/_images/esp32-s3-korvo-2-v3.0-overview.png" width="150"> | [ESP32-S3-Korvo-2](https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/user-guide-esp32-s3-korvo-2.html) | SPI | ILI9342 | I2C | TT21100 |
@@ -37,20 +44,22 @@ The block diagram of esp-display-panel is shown in the figure below, mainly comp
3744

3845
### Bus
3946

40-
| **Bus** | **Version** |
41-
| ------------------------------------------------------------------------------------------------------ | ----------- |
42-
| I2C | - |
43-
| SPI | - |
44-
| [3-wire SPI + RGB]((https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions)) | v1.0.0 |
47+
| **Bus** | **Version** |
48+
| ---------------------------------------------------------------------------------------------------- | ----------- |
49+
| I2C | - |
50+
| SPI | - |
51+
| [3-wire SPI + RGB](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions) | v1.0.0 |
4552

4653
### LCD Controller
4754

48-
| **LCD Controller** | **Version** |
49-
| ------------------------------------------------------------------------------ | ----------- |
50-
| ST7262 | - |
51-
| ST7789 | - |
52-
| [GC9503](https://components.espressif.com/components/espressif/esp_lcd_gc9503) | 1.0.0 |
53-
| [GC9A01](https://components.espressif.com/components/espressif/esp_lcd_gc9a01) | 1.0.1 |
55+
| **LCD Controller** | **Version** |
56+
| -------------------------------------------------------------------------------- | ----------- |
57+
| [ILI9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | 1.0.2 |
58+
| [GC9503](https://components.espressif.com/components/espressif/esp_lcd_gc9503) | 1.0.0 |
59+
| [GC9A01](https://components.espressif.com/components/espressif/esp_lcd_gc9a01) | 1.0.1 |
60+
| ST7262 | - |
61+
| ST7789 | - |
62+
| [ST7796](https://components.espressif.com/components/espressif/esp_lcd_st7796) | 1.0.0 |
5463

5564
### Touch Controller
5665

@@ -66,11 +75,11 @@ The block diagram of esp-display-panel is shown in the figure below, mainly comp
6675

6776
## How to Use
6877

69-
To use a library in Arduino IDE, please refer to the [docs](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries) for IDE v1.x.x or the [docs](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library) for IDE v2.x.x.
78+
For information on how to use the library in the Arduino IDE, please refer to the documentation for [Arduino IDE v1.x.x](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries) or [Arduino IDE v2.x.x](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library).
7079

7180
### Examples
7281

73-
Here are some examples of using esp-display-panel. To access them in the Arduino IDE, navigate to `File -> Examples -> esp-display-panel`. **Each example sketch and README offer comprehensive usage instructions. Please review them before compiling.**
82+
Here are some examples of using ESP32_Display_Panel. To access them in the Arduino IDE, navigate to `File -> Examples -> ESP32_Display_Panel`. **Each example sketch and README offer comprehensive usage instructions. Please review them before compiling.**
7483

7584
* Panel:
7685
* [Draw Color Bar](examples/Panel/DrawColorBar/): This example demonstrates how to draw simple color bar.
@@ -80,64 +89,65 @@ Here are some examples of using esp-display-panel. To access them in the Arduino
8089

8190
### Detailed Usage
8291

83-
Here are the details of how to use esp-display-panel.
92+
The following provides a comprehensive guide on how to use ESP32_Display_Panel.
8493

85-
### Configure esp-display-panel
94+
### Configure ESP32_Display_Panel
8695

87-
esp-display-panel has its own configuration file called `ESP_Panel_Conf.h`. When esp-display-panel is installed, follow these configuration steps:
96+
ESP32_Display_Panel has its own configuration file called `ESP_Panel_Conf.h`. After installing ESP32_Display_Panel, follow these configuration steps:
8897

89-
1. Go to the directory of the installed Arduino libraries.
90-
2. Go to the `esp-display-panel` folder, copy `ESP_Panel_Conf_Template.h` and place it out of `esp-display-panel` folder. It should be at the same level as the `esp-display-panel` folder. Then rename it as `ESP_Panel_Conf.h`.
91-
92-
Finally, the layout of the Arduino Libraries folder with `ESP_Panel_Conf.h` should look like this:
98+
1. Navigate to the directory where Arduino libraries are installed.
99+
2. Navigate to the `ESP32_Display_Panel` folder, copy `ESP_Panel_Conf_Template.h` and place the copy outside the `ESP32_Display_Panel` folder at the same directory level. Then rename the copied file as `ESP_Panel_Conf.h`.
100+
3. Finally, the layout of the Arduino Libraries folder with `ESP_Panel_Conf.h` appear as follows:
93101

94102
```
95103
Arduino
96104
|-libraries
97-
|-esp-display-panel
105+
|-ESP32_Display_Panel
98106
|-other_lib_1
99107
|-other_lib_2
100108
|-ESP_Panel_Conf.h
101109
```
102110

103-
### Configure Supported Board
111+
4. Please refer to the [Supported Boards List](#supported-boards--drivers) to check if the current board is compatible. If it is compatible, please navigate to the "[For Supported Boards](#for-supported-board)" section; Otherwise, navigate to the "[For Unsupported Boards](#for-unsupported-board)" section.
104112

105-
Please refer to the list of [Supported Boards](#supported-boards--drivers) to verify whether the current board is compatible.
113+
#### For Supported Board
106114

107-
Open `ESP_Panel_Conf.h` and uncomment one of the following macros to select an supported development board. Taking `ESP32_S3_BOX` as an example:
115+
1. Open `ESP_Panel_Conf.h` file. First, set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `1` (default is `1`). Then, according to the name of your target development board, uncomment the macro definitions in the format `ESP_PANEL_BOARD_<NAME>` below,
116+
2. The following code takes *ESP32_S3_BOX* development board as an example:
108117

109118
```c
119+
...
110120
// #define ESP_PANEL_BOARD_ESP32_C3_LCDKIT
111121
#define ESP_PANEL_BOARD_ESP32_S3_BOX
112122
// #define ESP_PANEL_BOARD_ESP32_S3_BOX_LITE
123+
...
113124
```
114125

115-
After that, refer to [Use Library](#use-library) to use the library in the sketch.
126+
3. After that, navigate to the "[Use APIs](#use-apis)" section to use the library in the sketch.
116127

117-
### Configure Unsupported Board
128+
#### For Unsupported Board
118129

119-
Since esp-display-panel library can only utilize the internally supported drivers, please ensure that the LCD, Touch, and required Bus for the custom board are present in the list of [Supported Drivers](#supported-boards--drivers).
130+
Since ESP32_Display_Panel library can only utilize the internally supported drivers, please ensure that the **LCD**, **Touch**, and **Bus** for the custom board are present in the list of [Supported Drivers](#supported-boards--drivers).
120131

121-
Open `ESP_Panel_Conf.h`. Firstly, set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `0`, as below:
132+
1. Open `ESP_Panel_Conf.h` and set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `0`, as shown below:
122133

123134
```c
124135
#define ESP_PANEL_USE_SUPPORTED_BOARD (0)
125136
```
126137
127-
After that, modify the values of other macros as needed. They represent parameters that can be adjusted for LCD, Touch, and other devices initialization.
138+
2. Modify the values of other macros as needed. They represent parameters that can be adjusted for LCD, Touch, and other devices initialization.
128139
129-
Here are some important macros for the **LCD**:
140+
* Here are some important macros for the **LCD**:
130141
131142
```c
132143
/* Set to 0 if not using LCD */
133144
#define ESP_PANEL_USE_LCD (0)
134145
135146
/**
136-
* LCD IC name. Choose one of the following:
137-
* - ST7262
138-
* - ST7789
139-
* - GC9503
140-
* - GC9A01
147+
* LCD controller name. Choose one of the following:
148+
* - ILI9341
149+
* - GC9503, GC9A01
150+
* - ST7262, ST7789, ST7796
141151
*/
142152
#define ESP_PANEL_LCD_NAME ST7789
143153
@@ -189,7 +199,7 @@ Here are some important macros for the **LCD**:
189199
#define ESP_PANEL_LCD_RST_LEVEL (0)
190200
```
191201

192-
Here are some important macros for the **LCD Touch**:
202+
* Here are some important macros for the **LCD Touch**:
193203

194204
```c
195205
/* Set to 0 if not using LCD touch */
@@ -199,8 +209,7 @@ Here are some important macros for the **LCD Touch**:
199209
* LCD Touch IC name. Choose one of the following:
200210
* - CST816S
201211
* - FT5x06
202-
* - GT1151
203-
* - GT911
212+
* - GT1151, GT911
204213
* - TT21100
205214
* - STMPE610
206215
*/
@@ -242,7 +251,7 @@ Here are some important macros for the **LCD Touch**:
242251
#define ESP_PANEL_LCD_TOUCH_INT_LEVEL (0)
243252
```
244253

245-
Here are some important macros for the **backlight**:
254+
* Here are some important macros for the **backlight**:
246255

247256
```c
248257
#define ESP_PANEL_USE_BL (0)
@@ -265,9 +274,11 @@ Here are some important macros for the **backlight**:
265274
...
266275
```
267276

268-
### Use Library
277+
3. After configuring the `ESP_Panel_Conf.h` file, please navigate to the "[Use APIs](#use-apis)" section to check the functions provided by ESP32_Display_Panel.
278+
279+
### Use APIs
269280

270-
Use the library in the sketch, and the following codes show the usage of common APIs:
281+
The following codes show the usage of common APIs:
271282

272283
```
273284
#include <ESP_Panel_Library.h>

0 commit comments

Comments
 (0)