Skip to content

Commit ae75059

Browse files
committed
Prevent unwanted effects if setting invert on other than UART0 - only that has these flags defined and documented.
1 parent 7be11ce commit ae75059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/uart.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ uart_init(int uart_nr, int baudrate, int config, int mode, int tx_pin, size_t rx
657657
}
658658

659659
uart_set_baudrate(uart, baudrate);
660-
if(invert)
660+
if(uart->uart_nr == UART0 && invert)
661661
{
662662
config |= BIT(UCDTRI) | BIT(UCRTSI) | BIT(UCTXI) | BIT(UCDSRI) | BIT(UCCTSI) | BIT(UCRXI);
663663
}

0 commit comments

Comments
 (0)