Skip to content

Commit b49cfc2

Browse files
authored
roll back HardwareSerial.h
1 parent 627ffe6 commit b49cfc2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: cores/esp32/HardwareSerial.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ typedef enum {
135135
#endif
136136

137137
// Default pins for UART1 are arbitrary, and defined here for convenience.
138-
138+
#if SOC_UART_NUM > 1
139139
#ifndef RX1
140140
#if CONFIG_IDF_TARGET_ESP32
141-
#define RX1 (gpio_num_t)9
141+
#define RX1 (gpio_num_t)26
142142
#elif CONFIG_IDF_TARGET_ESP32S2
143-
#define RX1 (gpio_num_t)18
143+
#define RX1 (gpio_num_t)4
144144
#elif CONFIG_IDF_TARGET_ESP32C3
145145
#define RX1 (gpio_num_t)18
146146
#elif CONFIG_IDF_TARGET_ESP32S3
@@ -150,9 +150,9 @@ typedef enum {
150150

151151
#ifndef TX1
152152
#if CONFIG_IDF_TARGET_ESP32
153-
#define TX1 (gpio_num_t)10
153+
#define TX1 (gpio_num_t)27
154154
#elif CONFIG_IDF_TARGET_ESP32S2
155-
#define TX1 (gpio_num_t)17
155+
#define TX1 (gpio_num_t)5
156156
#elif CONFIG_IDF_TARGET_ESP32C3
157157
#define TX1 (gpio_num_t)19
158158
#elif CONFIG_IDF_TARGET_ESP32S3
@@ -166,15 +166,15 @@ typedef enum {
166166
#if SOC_UART_NUM > 2
167167
#ifndef RX2
168168
#if CONFIG_IDF_TARGET_ESP32
169-
#define RX2 (gpio_num_t)16
169+
#define RX2 (gpio_num_t)4
170170
#elif CONFIG_IDF_TARGET_ESP32S3
171171
#define RX2 (gpio_num_t)19
172172
#endif
173173
#endif
174174

175175
#ifndef TX2
176176
#if CONFIG_IDF_TARGET_ESP32
177-
#define TX2 (gpio_num_t)17
177+
#define TX2 (gpio_num_t)25
178178
#elif CONFIG_IDF_TARGET_ESP32S3
179179
#define TX2 (gpio_num_t)20
180180
#endif

0 commit comments

Comments
 (0)