Trait Uart

Source
pub trait Uart {
    // Required methods
    fn write(&mut self, data: &[u8]) -> Result<usize, &'static str>;
    fn read(&mut self) -> Option<u8>;
}
Expand description

Trait for UART communication

This trait needs to be implemented in order for the library to work. All functions depend on the implementation of this trait.

Required Methods§

Source

fn write(&mut self, data: &[u8]) -> Result<usize, &'static str>

Source

fn read(&mut self) -> Option<u8>

Implementors§