Module uart

Source
Expand description

§Universal Asynchronous Receiver/Transmitter (UART)

§Overview

The UART is a hardware peripheral which handles communication using serial interfaces. This peripheral provides a cheap and ubiquitous method for full- and half-duplex communication between devices.

§Configuration

The usual setting such as baud rate, data bits, parity, and stop bits can easily be configured. See the config module documentation for more information.

§Usage

The UART driver implements a number of third-party traits, with the intention of making the HAL inter-compatible with various device drivers from the community. This includes the embedded-hal, embedded-hal-nb, and embedded-io traits.

§Examples

fn main(mut uart: LpUart) -> ! {
    loop {
        writeln!(uart, "Hello, world!").ok();
        esp_lp_hal::delay::Delay.delay_ms(1000);
    }
}

Modules§

config
UART configuration

Structs§

LpUart
LP-UART driver

Enums§

Error
UART Error