Skip to content

Updated API HardwareSerial Rx/Tx/Data Invert docs #2

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 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
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
13 changes: 13 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,19 @@ serial.setRtsCts(PA12, PA11);
serial.begin(460800);
```

#### Enable Tx, Rx Pin Active Level and/or Data Inversion

Available in core version greater than **2.10.1**

The U(S)ART Tx and Rx pin signal values can be inverted (VDD = 0/mark, Gnd = 1/idle), and the U(S)ART can send and receive data in negative/inverse logic (1 = L, 0 = H); the
parity bit is also inverted.

* Enable Tx and Rx active level inversion on `HardwareSerial` instances, respectively:
* `void setTxInvert(void)`
* `void setRxInvert(void)`
* Enable data inversion on `HardwareSerial` instances:
* `void setDataInvert(void)`

## [[HardwareTimer library]]


Expand Down