UartDevice

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl UartDevice for UART0

Source§

const ID: usize = 0usize

Source§

impl UartDevice for UART1

Source§

const ID: usize = 1usize