Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 627ffe6

Browse files
Restore 2.x RX1/TX1 RX2/TX2 pins
1 parent 83372a3 commit 627ffe6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

‎cores/esp32/HardwareSerial.h‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ typedef enum {
136136

137137
// Default pins for UART1 are arbitrary, and defined here for convenience.
138138

139-
#if SOC_UART_NUM > 1
140-
#ifndef RX1
139+
#ifndef RX1
141140
#if CONFIG_IDF_TARGET_ESP32
142-
#define RX1 (gpio_num_t)26
141+
#define RX1 (gpio_num_t)9
143142
#elif CONFIG_IDF_TARGET_ESP32S2
144-
#define RX1 (gpio_num_t)4
143+
#define RX1 (gpio_num_t)18
145144
#elif CONFIG_IDF_TARGET_ESP32C3
146145
#define RX1 (gpio_num_t)18
147146
#elif CONFIG_IDF_TARGET_ESP32S3
@@ -151,9 +150,9 @@ typedef enum {
151150

152151
#ifndef TX1
153152
#if CONFIG_IDF_TARGET_ESP32
154-
#define TX1 (gpio_num_t)27
153+
#define TX1 (gpio_num_t)10
155154
#elif CONFIG_IDF_TARGET_ESP32S2
156-
#define TX1 (gpio_num_t)5
155+
#define TX1 (gpio_num_t)17
157156
#elif CONFIG_IDF_TARGET_ESP32C3
158157
#define TX1 (gpio_num_t)19
159158
#elif CONFIG_IDF_TARGET_ESP32S3
@@ -167,15 +166,15 @@ typedef enum {
167166
#if SOC_UART_NUM > 2
168167
#ifndef RX2
169168
#if CONFIG_IDF_TARGET_ESP32
170-
#define RX2 (gpio_num_t)4
169+
#define RX2 (gpio_num_t)16
171170
#elif CONFIG_IDF_TARGET_ESP32S3
172171
#define RX2 (gpio_num_t)19
173172
#endif
174173
#endif
175174

176175
#ifndef TX2
177176
#if CONFIG_IDF_TARGET_ESP32
178-
#define TX2 (gpio_num_t)25
177+
#define TX2 (gpio_num_t)17
179178
#elif CONFIG_IDF_TARGET_ESP32S3
180179
#define TX2 (gpio_num_t)20
181180
#endif

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /