mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 17:05:21 +01:00
parent
54c9dd4173
commit
22f9f75914
1 changed files with 0 additions and 4 deletions
|
@ -20,10 +20,6 @@ void UARTComponent::setup() {
|
||||||
// is 1 we still want to use Serial.
|
// is 1 we still want to use Serial.
|
||||||
if (this->tx_pin_.value_or(1) == 1 && this->rx_pin_.value_or(3) == 3) {
|
if (this->tx_pin_.value_or(1) == 1 && this->rx_pin_.value_or(3) == 3) {
|
||||||
this->hw_serial_ = &Serial;
|
this->hw_serial_ = &Serial;
|
||||||
} else if (this->tx_pin_.value_or(10) == 10 && this->rx_pin_.value_or(9) == 9) {
|
|
||||||
this->hw_serial_ = &Serial1;
|
|
||||||
} else if (this->tx_pin_.value_or(17) == 17 && this->rx_pin_.value_or(16) == 16) {
|
|
||||||
this->hw_serial_ = &Serial2;
|
|
||||||
} else {
|
} else {
|
||||||
this->hw_serial_ = new HardwareSerial(next_uart_num++);
|
this->hw_serial_ = new HardwareSerial(next_uart_num++);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue