mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Don't define UART_SELECTION_UART2 when UART2 is unavailable (#2512)
This commit is contained in:
parent
8823024509
commit
63d6b610b8
2 changed files with 3 additions and 3 deletions
|
@ -153,7 +153,7 @@ void Logger::pre_setup() {
|
|||
case UART_SELECTION_UART1:
|
||||
this->hw_serial_ = &Serial1;
|
||||
break;
|
||||
#if defined(USE_ESP32) && !CONFIG_IDF_TARGET_ESP32C3 && !CONFIG_IDF_TARGET_ESP32S2
|
||||
#if defined(USE_ESP32) && !defined(USE_ESP32_VARIANT_ESP32C3) && !defined(USE_ESP32_VARIANT_ESP32S2)
|
||||
case UART_SELECTION_UART2:
|
||||
this->hw_serial_ = &Serial2;
|
||||
break;
|
||||
|
@ -169,7 +169,7 @@ void Logger::pre_setup() {
|
|||
case UART_SELECTION_UART1:
|
||||
uart_num_ = UART_NUM_1;
|
||||
break;
|
||||
#if !CONFIG_IDF_TARGET_ESP32C3 && !CONFIG_IDF_TARGET_ESP32S2
|
||||
#if defined(USE_ESP32) && !defined(USE_ESP32_VARIANT_ESP32C3) && !defined(USE_ESP32_VARIANT_ESP32S2)
|
||||
case UART_SELECTION_UART2:
|
||||
uart_num_ = UART_NUM_2;
|
||||
break;
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace logger {
|
|||
enum UARTSelection {
|
||||
UART_SELECTION_UART0 = 0,
|
||||
UART_SELECTION_UART1,
|
||||
#ifdef USE_ESP32
|
||||
#if defined(USE_ESP32) && !defined(USE_ESP32_VARIANT_ESP32C3) && !defined(USE_ESP32_VARIANT_ESP32S2)
|
||||
UART_SELECTION_UART2,
|
||||
#endif
|
||||
#ifdef USE_ESP8266
|
||||
|
|
Loading…
Reference in a new issue