-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpin_config-t-display-esp32-s3.h
More file actions
120 lines (92 loc) · 3.77 KB
/
pin_config-t-display-esp32-s3.h
File metadata and controls
120 lines (92 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#pragma once
//
// pin_config-t-dispay-esp32-s3.h
//
#define INTERRUPT_MODE FALLING
#define WIFI_CONNECT_WAIT_MAX (30 * 1000)
//#define NTP_SERVER1 "pool.ntp.org"
//#define NTP_SERVER2 "time.nist.gov"
#define GMT_OFFSET_SEC 0
#define DAY_LIGHT_OFFSET_SEC 0
// if CUSTOM_TIMEZONE is not defined then TIMEZONE API used based on IP, check zones.h
// #define CUSTOM_TIMEZONE "Europe/London"
/* Automatically update local time */
//#define GET_TIMEZONE_API "https://ipapi.co/timezone/"
/* LCD CONFIG */
// Too low or too high pixel clock may cause screen mosaic
#define EXAMPLE_LCD_PIXEL_CLOCK_HZ (16 * 1000 * 1000)
// The pixel number in horizontal and vertical
#define EXAMPLE_LCD_H_RES 320
#define EXAMPLE_LCD_V_RES 170
#define LVGL_LCD_BUF_SIZE (EXAMPLE_LCD_H_RES * EXAMPLE_LCD_V_RES)
#define EXAMPLE_PSRAM_DATA_ALIGNMENT 64
/*ESP32S3*/
#define PIN_BUTTON_1 0 // IO00, TCM-UI LH button, tcm 'DOWN' & long press to enter/exit editing, also strap pin BOOT
//#ifdef TCMENU_INPUT_2_BUTTON
const int PIN_SERIAL2_RX = 2;
const int PIN_SERIAL2_TX = 3;
//#endif
#define PIN_BAT_VOLT 4 // internal
#define PIN_LCD_RES 5 // internal
#define PIN_LCD_CS 6 // internal
#define PIN_LCD_DC 7 // internal
#define PIN_LCD_WR 8 // internal
#define PIN_LCD_RD 9 // internal
//#define PIN_ENC2_OK 10 // not required here.
#define PIN_ENC2_B 10 // ENCx_LABEL_B_CLK
#define PIN_ENC2_A 11 // ENCx_LABEL_A_DT
//#define PIN_ENC3_OK 12 // not required here.
#define PIN_ENC3_B 12 // ENCx_LABEL_B_CLK
#define PIN_ENC3_A 13 // ENCx_LABEL_A_DT
/* External expansion */
// 10 SPI_CS
// 11 MOSI SPI_D
// 12 SCK SPI_CLK
// 13 MISO SPI_Q
//#define PIN_SD_CLK 11
//#define PIN_SD_D0 12
//#define PIN_SD_CMD 13
#define PIN_BUTTON_2 14 // IO14, TCM-UI RH button, tcm 'UP' and long press to exit editing or jump to top menu item.
#define PIN_POWER_ON 15
//#define PIN_TOUCH_INT 16
//const int PIN_DEBUG_LED = 16; // spare 2023-09-21 This pin doesnt work for LED. Why?
const int PIN_SERVO_AIR_VALVE = 17;
#ifdef TCMENU_INPUT_2_BUTTON
const int PIN_PWM_THROTTLE = 18;
#else
//#define PIN_ENC1_OK_TCMDESIGNER 18 // ENC1_LABEL_SW_OK - NOTE : Assigned in tcmenu designer. TCM-UI
#endif
//#define PIN_IIC_SCL 17 // For IMU MPU-6050 on default I2C address.
//#define PIN_IIC_SDA 18 // For IMU MPU-6050 on default I2C address.
//const int PIN_SERIAL2_RX = 17;
//const int PIN_SERIAL2_TX = 21;
//#define PIN_TOUCH_RES 21
const int PIN_DEBUG_LED = 21;
#define PIN_LCD_BL 38
#define PIN_LCD_D0 39
#define PIN_LCD_D1 40
#define PIN_LCD_D2 41
#define PIN_LCD_D3 42
// Grove-Pin1 GND
// Grove-Pin2 3V3
//const int PIN_SERIAL1_RX = 43; // also Grove-Pin3 - 2024-04-03 testing for USB CDC mode UART pins
//const int PIN_SERIAL1_TX = 44; // also Grove-Pin4 - 2024-04-03 testing for USB CDC mode UART pins
//const int PIN_SERVO_AIR_VALVE = 44;
#ifdef TCMENU_INPUT_2_BUTTON
const int PIN_INTR_TCW_RED = 43;
const int PIN_INTR_CCW_WHITE = 44;
#else
//#define PIN_ENC1_B_TCMDESIGNER 43 // ENC1_LABEL_A_DT - NOTE : Assigned in tcmenu designer. TCM-UI
//#define PIN_ENC1_A_TCMDESIGNER 44 // ENC1_LABEL_B_CLK - NOTE : Assigned in tcmenu designer. TCM-UI
#endif
#define PIN_LCD_D4 45
#define PIN_LCD_D5 46
#define PIN_LCD_D6 47
#define PIN_LCD_D7 48
//#define MYSERIAL0_BEGIN Serial0.begin(BAUD_SERIAL1, SERIAL_8N1, 19, 20);
//#define MYSERIAL0_BEGIN Serial0.begin(BAUD_SERIAL1, SERIAL_8N1, 20, 19);
//#define MYSERIAL1_BEGIN Serial1.begin(BAUD_SERIAL1, SERIAL_8N1, PIN_SERIAL1_RX, PIN_SERIAL1_TX);
//#ifdef TCMENU_INPUT_2_BUTTON
#define MYSERIAL2_BEGIN Serial2.begin(BAUD_SERIAL2, SERIAL_8N1, PIN_SERIAL2_RX, PIN_SERIAL2_TX);
//#endif
// END_OF_FILE