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