Skip to content

Commit 26beb79

Browse files
author
MacChu0315-Espressif
committed
feat(board): add new board M5DIAL
1 parent 510822e commit 26beb79

File tree

13 files changed

+229
-11
lines changed

13 files changed

+229
-11
lines changed

ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Below is a list of [supported development boards](src/board/README.md):
5959
| **Manufacturer** | **Board Model** |
6060
| --------------- | --------------- |
6161
| [Espressif](src/board/README.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, 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 |
62-
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2 |
62+
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2, M5STACK-M5DIAL |
6363
| [Jingcai](src/board/README.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |
6464

6565
Developers and manufacturers are welcome to submit PRs to add more development boards.

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性:
5959
| **厂商** | **开发板型号** |
6060
| -------- | -------------- |
6161
| [Espressif](src/board/README.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, 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 |
62-
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2 |
62+
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2, M5STACK-M5DIAL |
6363
| [Jingcai](src/board/README.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |
6464

6565
欢迎开发者和厂商提交 PR 来添加更多的开发板。

examples/LVGL/v8/Porting/ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

examples/LVGL/v8/Rotation/ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

examples/Panel/PanelTest/ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

examples/SquareLine/v8/Porting/ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

examples/SquareLine/v8/WiFiClock/ESP_Panel_Board_Supported.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
* M5Stack (https://m5stack.com/):
5151
*
5252
* - M5STACK_M5CORE2: https://docs.m5stack.com/zh_CN/core/core2
53+
* - M5STACK_M5DIAL: https://docs.m5stack.com/zh_CN/core/M5Dial
5354
*
5455
*/
5556
// #define BOARD_M5STACK_M5CORE2
57+
// #define BOARD_M5STACK_M5DIAL
5658

5759
/*
5860
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
@@ -77,6 +79,6 @@
7779
*/
7880
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
7981
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
80-
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 1
82+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 2
8183

8284
#endif

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=0.1.3
33
author=espressif
44
maintainer=espressif
55
sentence=ESP32_Display_Panel is an Arduino library designed for ESP SoCs to drive display panels and facilitate rapid GUI development.
6-
paragraph=Currently supported boards:ESP32-C3-LCDkit,ESP32-S3-Box,ESP32-S3-Box-3,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,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: GC9A01,GC9B71,GC9503,ILI9341,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046.
6+
paragraph=Currently supported boards:ESP32-C3-LCDkit,ESP32-S3-Box,ESP32-S3-Box-3,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,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: GC9A01,GC9B71,GC9503,ILI9341,NV3022B,ST7262,ST7701,ST7789,ST7796,ST77916,ST77922. Currently supported Touch controllers: CST816S,FT5x06,GT1151,GT911,ST7123,TT21100,XPT2046.
77
category=Other
88
architectures=esp32
99
url=https://github.com/esp-arduino-libs/ESP32_Display_Panel

src/ESP_PanelVersions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* File `ESP_Panel_Board_Supported.h` */
2727
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 0
2828
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 1
29-
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_PATCH 1
29+
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_PATCH 2
3030

3131
/* Check if the current configuration file version is compatible with the library version */
3232
// File `ESP_Panel_Conf.h`

src/board/ESP_PanelBoard.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
defined(BOARD_ESP32_S3_KORVO_2) + defined(BOARD_ESP32_S3_LCD_EV_BOARD) + \
1515
defined(BOARD_ESP32_S3_LCD_EV_BOARD_V1_5) + defined(BOARD_ESP32_S3_LCD_EV_BOARD_2) + \
1616
defined(BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5) + defined(BOARD_ESP32_S3_USB_OTG) + \
17-
defined(BOARD_M5STACK_M5CORE2) + defined(BOARD_ESP32_4848S040C_I_Y_3) \
17+
defined(BOARD_M5STACK_M5CORE2) + defined(BOARD_M5STACK_M5DIAL) + defined(BOARD_ESP32_4848S040C_I_Y_3) \
1818
> 1
1919
#error "Multiple boards enabled! Please check file `ESP_Panel_Board_Supported.h` and make sure only one board is enabled."
2020
#endif
@@ -48,6 +48,8 @@
4848
/* M5Stack */
4949
#elif defined(BOARD_M5STACK_M5CORE2) || CONFIG_BOARD_M5STACK_M5CORE2
5050
#include "board/m5stack/M5CORE2.h"
51+
#elif defined(BOARD_M5STACK_M5DIAL) || CONFIG_BOARD_M5STACK_M5DIAL
52+
#include "board/m5stack/M5DIAL.h"
5153
/* Jingcai */
5254
#elif defined(BOARD_ESP32_4848S040C_I_Y_3) || CONFIG_BOARD_ESP32_4848S040C_I_Y_3
5355
#include "board/jingcai/ESP32_4848S040C_I_Y_3.h"

src/board/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| **Picture** | **Name** | **LCD Bus** | **LCD Controller** | **Touch Bus** | **Touch Controller** |
2323
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :--------------: | :----------------: | :-----------: | :------------------: |
2424
| [<img src="https://static-cdn.m5stack.com/resource/docs/products/core/core2/core2_01.webp" width="150">](https://www.displaysmodule.com/sale-41828962-experience-the-power-of-the-esp32-display-module-sku-esp32-4848s040c-i-y-3.html) | [M5STACK_M5CORE2](https://docs.m5stack.com/zh_CN/core/core2) | SPI | ILI9342C | I2C | FT6336U |
25+
| [<img src="https://static-cdn.m5stack.com/resource/docs/products/core/M5Dial/img-2afd549e-8af8-47b4-823a-e90e063a0139.webp" width="150">](https://www.displaysmodule.com/sale-41828962-experience-the-power-of-the-esp32-display-module-sku-esp32-4848s040c-i-y-3.html) | [M5STACK_M5DIAL](https://docs.m5stack.com/zh_CN/core/M5Dial) | SPI | GC9A01 | I2C | FT5x06 |
2526

2627
### [Shenzhen Jingcai Intelligent](https://www.displaysmodule.com/)
2728

src/board/m5stack/M5DIAL.h

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
9+
// *INDENT-OFF*
10+
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
12+
//////////////////////////// Please update the following macros to configure the LCD panel /////////////////////////////
13+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
14+
/* Set to 1 when using an LCD panel */
15+
#define ESP_PANEL_USE_LCD (1) // 0/1
16+
17+
#if ESP_PANEL_USE_LCD
18+
/**
19+
* LCD Controller Name.
20+
*/
21+
#define ESP_PANEL_LCD_NAME GC9A01
22+
23+
/* LCD resolution in pixels */
24+
#define ESP_PANEL_LCD_WIDTH (240)
25+
#define ESP_PANEL_LCD_HEIGHT (240)
26+
27+
/* LCD Bus Settings */
28+
/**
29+
* If set to 1, the bus will skip to initialize the corresponding host. Users need to initialize the host in advance.
30+
* It is useful if other devices use the same host. Please ensure that the host is initialized only once.
31+
*/
32+
#define ESP_PANEL_LCD_BUS_SKIP_INIT_HOST (0) // 0/1
33+
/**
34+
* LCD Bus Type.
35+
*/
36+
#define ESP_PANEL_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_SPI)
37+
/**
38+
* LCD Bus Parameters.
39+
*
40+
* Please refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html and
41+
* https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html for more details.
42+
*
43+
*/
44+
#if ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_SPI
45+
46+
#define ESP_PANEL_LCD_BUS_HOST_ID (1) // Typically set to 1
47+
#define ESP_PANEL_LCD_SPI_IO_CS (7)
48+
#if !ESP_PANEL_LCD_BUS_SKIP_INIT_HOST
49+
#define ESP_PANEL_LCD_SPI_IO_SCK (6)
50+
#define ESP_PANEL_LCD_SPI_IO_MOSI (5)
51+
#define ESP_PANEL_LCD_SPI_IO_MISO (-1) // -1 if not used
52+
#endif
53+
#define ESP_PANEL_LCD_SPI_IO_DC (4)
54+
#define ESP_PANEL_LCD_SPI_MODE (0) // 0/1/2/3, typically set to 0
55+
#define ESP_PANEL_LCD_SPI_CLK_HZ (40 * 1000 * 1000)
56+
// Should be an integer divisor of 80M, typically set to 40M
57+
#define ESP_PANEL_LCD_SPI_TRANS_QUEUE_SZ (10) // Typically set to 10
58+
#define ESP_PANEL_LCD_SPI_CMD_BITS (8) // Typically set to 8
59+
#define ESP_PANEL_LCD_SPI_PARAM_BITS (8) // Typically set to 8
60+
61+
#endif /* ESP_PANEL_LCD_BUS_TYPE */
62+
63+
/**
64+
* LCD Venbdor Initialization Commands.
65+
*
66+
* Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for
67+
* initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver
68+
* will use the default initialization sequence code.
69+
*
70+
* There are two formats for the sequence code:
71+
* 1. Raw data: {command, (uint8_t []){ data0, data1, ... }, data_size, delay_ms}
72+
* 2. Formater: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and
73+
* ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command)
74+
*/
75+
// #define ESP_PANEL_LCD_VENDOR_INIT_CMD \
76+
// { \
77+
// {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \
78+
// {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \
79+
// {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \
80+
// {0x29, (uint8_t []){0x00}, 0, 120}, \
81+
// or \
82+
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \
83+
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \
84+
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \
85+
// ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \
86+
// }
87+
88+
/* LCD Color Settings */
89+
/* LCD color depth in bits */
90+
#define ESP_PANEL_LCD_COLOR_BITS (16) // 8/16/18/24
91+
/*
92+
* LCD RGB Element Order. Choose one of the following:
93+
* - 0: RGB
94+
* - 1: BGR
95+
*/
96+
#define ESP_PANEL_LCD_BGR_ORDER (1) // 0/1
97+
#define ESP_PANEL_LCD_INEVRT_COLOR (1) // 0/1
98+
99+
/* LCD Transformation Flags */
100+
#define ESP_PANEL_LCD_SWAP_XY (0) // 0/1
101+
#define ESP_PANEL_LCD_MIRROR_X (1) // 0/1
102+
#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1
103+
104+
/* LCD Other Settings */
105+
/* IO num of RESET pin, set to -1 if not use */
106+
#define ESP_PANEL_LCD_IO_RST (8)
107+
#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level
108+
109+
#endif /* ESP_PANEL_USE_LCD */
110+
111+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
112+
//////////////////////////// Please update the following macros to configure the touch panel ///////////////////////////
113+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
114+
/* Set to 1 when using an touch panel */
115+
#define ESP_PANEL_USE_TOUCH (1) // 0/1
116+
#if ESP_PANEL_USE_TOUCH
117+
/**
118+
* Touch controller name.
119+
* Touch Controller of M5DIAL is FT3267, but the driver is compatible with FT5x06.
120+
*/
121+
#define ESP_PANEL_TOUCH_NAME FT5x06
122+
123+
/* Touch resolution in pixels */
124+
#define ESP_PANEL_TOUCH_H_RES (ESP_PANEL_LCD_WIDTH) // Typically set to the same value as the width of LCD
125+
#define ESP_PANEL_TOUCH_V_RES (ESP_PANEL_LCD_HEIGHT) // Typically set to the same value as the height of LCD
126+
127+
/* Touch Panel Bus Settings */
128+
/**
129+
* If set to 1, the bus will skip to initialize the corresponding host. Users need to initialize the host in advance.
130+
* It is useful if other devices use the same host. Please ensure that the host is initialized only once.
131+
*/
132+
#define ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1
133+
/**
134+
* Touch panel bus type.
135+
*/
136+
#define ESP_PANEL_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C)
137+
/* Touch panel bus parameters */
138+
#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C
139+
140+
#define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0
141+
#define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // Typically set to 0 to use default address
142+
#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST
143+
#define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000)
144+
// Typically set to 400K
145+
#define ESP_PANEL_TOUCH_I2C_SCL_PULLUP (1) // 0/1
146+
#define ESP_PANEL_TOUCH_I2C_SDA_PULLUP (1) // 0/1
147+
#define ESP_PANEL_TOUCH_I2C_IO_SCL (12)
148+
#define ESP_PANEL_TOUCH_I2C_IO_SDA (11)
149+
#endif
150+
151+
#endif
152+
153+
/* Touch Transformation Flags */
154+
#define ESP_PANEL_TOUCH_SWAP_XY (0) // 0/1
155+
#define ESP_PANEL_TOUCH_MIRROR_X (0) // 0/1
156+
#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1
157+
158+
/* Touch Other Settings */
159+
/* IO num of RESET pin, set to -1 if not use */
160+
#define ESP_PANEL_TOUCH_IO_RST (-1)
161+
#define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level
162+
/* IO num of INT pin, set to -1 if not use */
163+
#define ESP_PANEL_TOUCH_IO_INT (14)
164+
#define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level
165+
166+
#endif /* ESP_PANEL_USE_TOUCH */
167+
168+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
169+
///////////////////////////// Please update the following macros to configure the backlight ////////////////////////////
170+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
171+
#define ESP_PANEL_USE_BACKLIGHT (1) // 0/1
172+
#if ESP_PANEL_USE_BACKLIGHT
173+
/* IO num of backlight pin */
174+
#define ESP_PANEL_BACKLIGHT_IO (9)
175+
#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level
176+
177+
/* Set to 1 if turn off the backlight after initializing the panel; otherwise, set it to turn on */
178+
#define ESP_PANEL_BACKLIGHT_IDLE_OFF (0) // 0: on, 1: off
179+
180+
/* Set to 1 if use PWM for brightness control */
181+
#define ESP_PANEL_LCD_BL_USE_PWM (1) // 0/1
182+
#endif /* ESP_PANEL_USE_BACKLIGHT */
183+
184+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
185+
///////////////////////////// Please update the following macros to configure the IO expander //////////////////////////
186+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
187+
/* Set to 0 if not using IO Expander */
188+
#define ESP_PANEL_USE_EXPANDER (0) // 0/1
189+
190+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
191+
///////////////////////////// Please utilize the following macros to execute any additional code if required. //////////
192+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
193+
// #define ESP_PANEL_BEGIN_START_FUNCTION( panel )
194+
// #define ESP_PANEL_BEGIN_EXPANDER_START_FUNCTION( panel )
195+
// #define ESP_PANEL_BEGIN_EXPANDER_END_FUNCTION( panel )
196+
// #define ESP_PANEL_BEGIN_LCD_START_FUNCTION( panel )
197+
// #define ESP_PANEL_BEGIN_LCD_END_FUNCTION( panel )
198+
// #define ESP_PANEL_BEGIN_TOUCH_START_FUNCTION( panel )
199+
// #define ESP_PANEL_BEGIN_TOUCH_END_FUNCTION( panel )
200+
// #define ESP_PANEL_BEGIN_BACKLIGHT_START_FUNCTION( panel )
201+
// #define ESP_PANEL_BEGIN_BACKLIGHT_END_FUNCTION( panel )
202+
// #define ESP_PANEL_BEGIN_END_FUNCTION( panel )
203+
// *INDENT-OFF*

0 commit comments

Comments
 (0)