Skip to content

Commit 0b0e139

Browse files
authored
添加微雪电子 esp32-c6-touch-amoled-1.43 和 esp32-c6-touch-amoled-1.43-b的支持 (78#907)
* 添加微雪电子 esp32-c6-touch-amoled-1.43 和 esp32-c6-touch-amoled-1.43-b的支持 * Fix: 根据PR评论优化代码格式
1 parent 0b364a8 commit 0b0e139

File tree

6 files changed

+417
-0
lines changed

6 files changed

+417
-0
lines changed

main/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ elseif(CONFIG_BOARD_TYPE_ESP32S3_Touch_LCD_3_5B)
119119
set(BOARD_TYPE "waveshare-s3-touch-lcd-3.5b")
120120
elseif(CONFIG_BOARD_TYPE_ESP32C6_LCD_1_69)
121121
set(BOARD_TYPE "waveshare-c6-lcd-1.69")
122+
elseif(CONFIG_BOARD_TYPE_ESP32C6_Touch_AMOLED_1_43)
123+
set(BOARD_TYPE "waveshare-c6-touch-amoled-1.43")
122124
elseif(CONFIG_BOARD_TYPE_ESP32P4_NANO)
123125
set(BOARD_TYPE "waveshare-p4-nano")
124126
elseif(CONFIG_BOARD_TYPE_ESP32P4_WIFI6_Touch_LCD_4B)

main/Kconfig.projbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ choice BOARD_TYPE
157157
config BOARD_TYPE_ESP32C6_LCD_1_69
158158
bool "Waveshare ESP32-C6-LCD-1.69"
159159
depends on IDF_TARGET_ESP32C6
160+
config BOARD_TYPE_ESP32C6_Touch_AMOLED_1_43
161+
bool "Waveshare ESP32-C6-Touch-AMOLOED-1.43"
162+
depends on IDF_TARGET_ESP32C6
160163
config BOARD_TYPE_ESP32S3_Touch_LCD_3_5
161164
bool "Waveshare ESP32-S3-Touch-LCD-3.5"
162165
depends on IDF_TARGET_ESP32S3
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# 产品链接
2+
3+
[微雪电子 ESP32-C6-Touch-AMOLED-1.43](https://www.waveshare.net/shop/ESP32-C6-Touch-AMOLED-1.43.htm)
4+
[微雪电子 ESP32-C6-Touch-AMOLED-1.43-B](https://www.waveshare.net/shop/ESP32-C6-Touch-AMOLED-1.43-B.htm)
5+
6+
# 编译配置命令
7+
8+
**克隆工程**
9+
10+
```bash
11+
git clone https://github.com/78/xiaozhi-esp32.git
12+
```
13+
14+
**进入工程**
15+
16+
```bash
17+
cd xiaozhi-esp32
18+
```
19+
20+
**配置编译目标为 ESP32C6**
21+
22+
```bash
23+
idf.py set-target esp32c6
24+
```
25+
26+
**打开 menuconfig**
27+
28+
```bash
29+
idf.py menuconfig
30+
```
31+
32+
**选择板子**
33+
34+
```bash
35+
Xiaozhi Assistant -> Board Type -> Waveshare ESP32-C6-Touch-AMOLED-1.43
36+
```
37+
38+
**编译**
39+
40+
```ba
41+
idf.py build
42+
```
43+
44+
**下载并打开串口终端**
45+
46+
```bash
47+
idf.py build flash monitor
48+
```
49+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#ifndef _BOARD_CONFIG_H_
2+
#define _BOARD_CONFIG_H_
3+
4+
#include <driver/gpio.h>
5+
6+
7+
#define AUDIO_INPUT_SAMPLE_RATE 24000
8+
#define AUDIO_OUTPUT_SAMPLE_RATE 24000
9+
10+
#define AUDIO_INPUT_REFERENCE false
11+
12+
#define AUDIO_I2S_GPIO_MCLK GPIO_NUM_19
13+
#define AUDIO_I2S_GPIO_WS GPIO_NUM_22
14+
#define AUDIO_I2S_GPIO_BCLK GPIO_NUM_21
15+
#define AUDIO_I2S_GPIO_DIN GPIO_NUM_20
16+
#define AUDIO_I2S_GPIO_DOUT GPIO_NUM_23
17+
18+
#define AUDIO_CODEC_PA_PIN GPIO_NUM_NC
19+
#define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_18
20+
#define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_8
21+
#define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
22+
#define AUDIO_CODEC_ES7210_ADDR ES7210_CODEC_DEFAULT_ADDR
23+
24+
#define I2C_Touch_ADDRESS 0x38
25+
#define I2C_ADDRESS ESP_IO_EXPANDER_I2C_TCA9554_ADDRESS_000
26+
#define BOOT_BUTTON_GPIO GPIO_NUM_9
27+
#define PWR_BUTTON_GPIO GPIO_NUM_2
28+
29+
#define LCD_CS GPIO_NUM_10
30+
#define LCD_PCLK GPIO_NUM_11
31+
#define LCD_D0 GPIO_NUM_4
32+
#define LCD_D1 GPIO_NUM_5
33+
#define LCD_D2 GPIO_NUM_6
34+
#define LCD_D3 GPIO_NUM_7
35+
#define LCD_RST GPIO_NUM_3
36+
#define LCD_LIGHT (-1)
37+
38+
#define EXAMPLE_LCD_H_RES 466
39+
#define EXAMPLE_LCD_V_RES 466
40+
41+
#define DISPLAY_MIRROR_X false
42+
#define DISPLAY_MIRROR_Y false
43+
#define DISPLAY_SWAP_XY false
44+
45+
#define DISPLAY_OFFSET_X 0
46+
#define DISPLAY_OFFSET_Y 0
47+
48+
49+
#endif // _BOARD_CONFIG_H_
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"target": "esp32c6",
3+
"builds": [
4+
{
5+
"name": "waveshare-c6-touch-amoled-1.43",
6+
"sdkconfig_append": [
7+
"CONFIG_USE_ESP_WAKE_WORD=y"
8+
]
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)