Trait UART

Source
pub trait UART {
    // Required methods
    fn reset(&mut self);
    fn line_mode(&mut self) -> LineMode;
    fn set_line_mode(&mut self, mode: LineMode);
    fn write(&mut self, data: &[u8]);
}
Expand description

High-level interface for UART drivers.

Required Methods§

Source

fn reset(&mut self)

Stop transmission, clear buffers, and set the device to a sane state.

Source

fn line_mode(&mut self) -> LineMode

Get the device’s active line protocol mode.

Source

fn set_line_mode(&mut self, mode: LineMode)

Update the device’s line protocol mode.

Source

fn write(&mut self, data: &[u8])

Send the given data through the UART. Blocks until all data is set.

Implementors§

Source§

impl UART for UARTPL011<'_>

Source§

impl UART for NullUART

Source§

impl<A: RegisterAccess> UART for UART16550<A>

Available on x86 or x86-64 only.