From f5e40f99bb13a2522df65e1b580943d59c63c38b Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Fri, 28 Jan 2022 09:19:33 -0300 Subject: [PATCH 1/2] Fixes UART1 and UART2 default pins for ESP32-S3 --- cores/esp32/HardwareSerial.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cores/esp32/HardwareSerial.cpp b/cores/esp32/HardwareSerial.cpp index 82799ffcfc4..484ce9f822f 100644 --- a/cores/esp32/HardwareSerial.cpp +++ b/cores/esp32/HardwareSerial.cpp @@ -10,7 +10,7 @@ #ifndef SOC_RX0 #if CONFIG_IDF_TARGET_ESP32 #define SOC_RX0 3 -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define SOC_RX0 44 #elif CONFIG_IDF_TARGET_ESP32C3 #define SOC_RX0 20 @@ -20,7 +20,7 @@ #ifndef SOC_TX0 #if CONFIG_IDF_TARGET_ESP32 #define SOC_TX0 1 -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define SOC_TX0 43 #elif CONFIG_IDF_TARGET_ESP32C3 #define SOC_TX0 21 @@ -35,10 +35,12 @@ void serialEvent(void) {} #ifndef RX1 #if CONFIG_IDF_TARGET_ESP32 #define RX1 9 -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 #define RX1 18 #elif CONFIG_IDF_TARGET_ESP32C3 #define RX1 18 +#elif CONFIG_IDF_TARGET_ESP32S3 +#define RX1 15 #endif #endif @@ -49,6 +51,8 @@ void serialEvent(void) {} #define TX1 17 #elif CONFIG_IDF_TARGET_ESP32C3 #define TX1 19 +#elif CONFIG_IDF_TARGET_ESP32S3 +#define TX1 16 #endif #endif @@ -60,12 +64,16 @@ void serialEvent1(void) {} #ifndef RX2 #if CONFIG_IDF_TARGET_ESP32 #define RX2 16 +#else +#define RX2 19 #endif #endif #ifndef TX2 #if CONFIG_IDF_TARGET_ESP32 #define TX2 17 +#else +#define TX2 20 #endif #endif From 7c13c851222eff49476fc2267dca3aa8841d9440 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Fri, 28 Jan 2022 09:26:36 -0300 Subject: [PATCH 2/2] Fixes UART1 and UART2 default pins for ESP32-S3 --- cores/esp32/HardwareSerial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/HardwareSerial.cpp b/cores/esp32/HardwareSerial.cpp index 484ce9f822f..3cbcf264fcc 100644 --- a/cores/esp32/HardwareSerial.cpp +++ b/cores/esp32/HardwareSerial.cpp @@ -64,7 +64,7 @@ void serialEvent1(void) {} #ifndef RX2 #if CONFIG_IDF_TARGET_ESP32 #define RX2 16 -#else +#elif CONFIG_IDF_TARGET_ESP32S3 #define RX2 19 #endif #endif @@ -72,7 +72,7 @@ void serialEvent1(void) {} #ifndef TX2 #if CONFIG_IDF_TARGET_ESP32 #define TX2 17 -#else +#elif CONFIG_IDF_TARGET_ESP32S3 #define TX2 20 #endif #endif