1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

Per review.

This commit is contained in:
Dirk O. Kaar 2021-04-04 19:26:24 +02:00
parent 2e214843db
commit cd7d137774

View File

@ -830,18 +830,11 @@ uart_set_tx(uart_t* uart, int tx_pin)
{
return true;
}
else if (tx_pin == 2)
else if (tx_pin == 1 || tx_pin == 2)
{
pinMode(uart->tx_pin, INPUT);
uart->tx_pin = tx_pin;
pinMode(uart->tx_pin, FUNCTION_4);
return true;
}
else if (tx_pin != 2)
{
pinMode(uart->tx_pin, INPUT);
uart->tx_pin = 1;
pinMode(uart->tx_pin, SPECIAL);
pinMode(uart->tx_pin, tx_pin == 1 ? SPECIAL : FUNCTION_4);
return true;
}
}