Skip to content

Commit ec796e1

Browse files
committed
Updated API HardwareSerial Rx/Tx/Data Invert docs
Update documentation to support [stm32duino/Arduino_Core_STM32#2701](stm32duino/Arduino_Core_STM32#2701) Signed-off-by: Andrew Yong <[email protected]>
1 parent 1cbab70 commit ec796e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

API.md

+13
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,19 @@ serial.setRtsCts(PA12, PA11);
335335
serial.begin(460800);
336336
```
337337

338+
#### Enable Tx, Rx Pin Active Level and/or Data Inversion
339+
340+
Available in core version greater than **2.11.0**
341+
342+
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
343+
parity bit is also inverted.
344+
345+
* Enable Tx and Rx active level inversion on `HardwareSerial` instances, respectively:
346+
* `void setTxInvert(void)`
347+
* `void setRxInvert(void)`
348+
* Enable data inversion on `HardwareSerial` instances:
349+
* `void setDataInvert(void)`
350+
338351
## [[HardwareTimer library]]
339352

340353

0 commit comments

Comments
 (0)