Don't define UART_SELECTION_UART2 when UART2 is unavailable (#2512)

This commit is contained in:
Oxan van Leeuwen 2021-10-14 11:25:10 +02:00 committed by Jesse Hills
parent 9b7fb829f9
commit 73940bc1bd
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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