Module esp32_hal::serial[][src]

Expand description

UART peripheral control

Controls the 3 uart peripherals (UART0, UART1, UART2).

Example

Creation of the serial peripheral and writing formatted info.

let serial: Serial<_, _, _> = Serial::new(
    dp.UART0,
    esp32_hal::serial::Pins {
        tx: gpios.gpio1,
        rx: gpios.gpio3,
        cts: None,
        rts: None,
    },
    config,
    clkcntrl_config,
    &mut dport,
    )
    .unwrap();

writeln!(serial, "Serial output").unwrap();

TODO

  • Add all extra features esp32 supports (eg rs485, etc. etc.)
  • Free APB lock when TX is idle (and no RX used)
  • Address errata 3.17: UART fifo_cnt is inconsistent with FIFO pointer

Modules

UART configuration

Structs

Pins used by the UART interface

Serial receiver

Serial abstraction

Serial transmitter

Enums

Serial error

Interrupt event