Trait rp2040_hal::uart::UartDevice

source ·
pub trait UartDevice: Deref<Target = RegisterBlock> + SubsystemReset + Sealed + 'static {
    const ID: usize;

    // Required methods
    fn tx_dreq() -> u8
       where Self: Sized;
    fn rx_dreq() -> u8
       where Self: Sized;
}
Expand description

Trait to handle both underlying devices (UART0 & UART1)

Required Associated Constants§

source

const ID: usize

Index of the Uart.

Required Methods§

source

fn tx_dreq() -> u8
where Self: Sized,

The DREQ number for which TX DMA requests are triggered.

source

fn rx_dreq() -> u8
where Self: Sized,

The DREQ number for which RX DMA requests are triggered.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl UartDevice for UART0

source§

fn tx_dreq() -> u8

The DREQ number for which TX DMA requests are triggered.

source§

fn rx_dreq() -> u8

The DREQ number for which RX DMA requests are triggered.

source§

const ID: usize = 0usize

source§

impl UartDevice for UART1

source§

fn tx_dreq() -> u8

The DREQ number for which TX DMA requests are triggered.

source§

fn rx_dreq() -> u8

The DREQ number for which RX DMA requests are triggered.

source§

const ID: usize = 1usize

Implementors§