mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
Per review.
This commit is contained in:
parent
2e214843db
commit
cd7d137774
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user