diff --git a/cores/esp32/HardwareSerial.h b/cores/esp32/HardwareSerial.h index 72f41c6a1ef..7df71c24381 100644 --- a/cores/esp32/HardwareSerial.h +++ b/cores/esp32/HardwareSerial.h @@ -135,7 +135,7 @@ typedef enum { #endif // Default pins for UART1 are arbitrary, and defined here for convenience. - +#if SOC_UART_NUM > 1 #ifndef RX1 #if CONFIG_IDF_TARGET_ESP32 #define RX1 (gpio_num_t)9