mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix build issue with UART component when building with Arduino and CDC (#5964)
This commit is contained in:
parent
8961e8ab32
commit
3ea5054cf2
1 changed files with 4 additions and 0 deletions
|
@ -88,7 +88,11 @@ void ESP32ArduinoUARTComponent::setup() {
|
||||||
#endif
|
#endif
|
||||||
static uint8_t next_uart_num = 0;
|
static uint8_t next_uart_num = 0;
|
||||||
if (is_default_tx && is_default_rx && next_uart_num == 0) {
|
if (is_default_tx && is_default_rx && next_uart_num == 0) {
|
||||||
|
#if ARDUINO_USB_CDC_ON_BOOT
|
||||||
|
this->hw_serial_ = &Serial0;
|
||||||
|
#else
|
||||||
this->hw_serial_ = &Serial;
|
this->hw_serial_ = &Serial;
|
||||||
|
#endif
|
||||||
next_uart_num++;
|
next_uart_num++;
|
||||||
} else {
|
} else {
|
||||||
#ifdef USE_LOGGER
|
#ifdef USE_LOGGER
|
||||||
|
|
Loading…
Reference in a new issue