Expand description

Asynchronous serial communication using UART/USART peripherals

Word length

By default, the UART/USART uses 8 data bits. The Serial, Rx, and Tx structs implement the embedded-hal read and write traits with u8 as the word type.

You can also configure the hardware to use 9 data bits with the Config wordlength_9() function. After creating a Serial with this option, use the with_u16_data() function to convert the Serial<_, _, u8> object into a Serial<_, _, u16> that can send and receive u16s.

In this mode, the Serial<_, _, u16>, Rx<_, u16>, and Tx<_, u16> structs instead implement the embedded-hal read and write traits with u16 as the word type. You can use these implementations for 9-bit words.

Modules

Structs

Serial receiver

Serial abstraction

Serial transmitter

Enums

Serial error Serial error kind

Interrupt event

Traits

Type Definitions

A filler type for when the Rx pin is unnecessary

A filler type for when the Tx pin is unnecessary