Skip to content

Implement invert for HardwareSerial #6816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent unwanted effects if setting invert on other than UART0 - only…
… that has these flags defined and documented.
  • Loading branch information
dok-net committed Nov 20, 2019
commit ae75059ec4d263e4dcf6213f983d557de0ee43de
2 changes: 1 addition & 1 deletion cores/esp8266/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ uart_init(int uart_nr, int baudrate, int config, int mode, int tx_pin, size_t rx
}

uart_set_baudrate(uart, baudrate);
if(invert)
if(uart->uart_nr == UART0 && invert)
{
config |= BIT(UCDTRI) | BIT(UCRTSI) | BIT(UCTXI) | BIT(UCDSRI) | BIT(UCCTSI) | BIT(UCRXI);
}
Expand Down