mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Use the correct UART/Serial
when CDC is enabled (#5957)
This commit is contained in:
parent
eefa1cd3ab
commit
ab22a3da34
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ void Logger::pre_setup() {
|
||||||
Serial1.begin(this->baud_rate_);
|
Serial1.begin(this->baud_rate_);
|
||||||
#else
|
#else
|
||||||
#if ARDUINO_USB_CDC_ON_BOOT
|
#if ARDUINO_USB_CDC_ON_BOOT
|
||||||
this->hw_serial_ = &Serial;
|
this->hw_serial_ = &Serial0;
|
||||||
Serial.begin(this->baud_rate_);
|
Serial0.begin(this->baud_rate_);
|
||||||
#else
|
#else
|
||||||
this->hw_serial_ = &Serial;
|
this->hw_serial_ = &Serial;
|
||||||
Serial.begin(this->baud_rate_);
|
Serial.begin(this->baud_rate_);
|
||||||
|
|
Loading…
Reference in a new issue