embedded_hal_nb::serial

Trait Read

Source
pub trait Read<Word: Copy = u8>: ErrorType {
    // Required method
    fn read(&mut self) -> Result<Word, Self::Error>;
}
Expand description

Read half of a serial interface.

Some serial interfaces support different data sizes (8 bits, 9 bits, etc.); This can be encoded in this trait via the Word type parameter.

Required Methods§

Source

fn read(&mut self) -> Result<Word, Self::Error>

Reads a single word from the serial interface

Implementations on Foreign Types§

Source§

impl<T: Read<Word> + ?Sized, Word: Copy> Read<Word> for &mut T

Source§

fn read(&mut self) -> Result<Word, Self::Error>

Implementors§

impl<C, D, R, T> Read<<C as AnyConfig>::Word> for Uart<C, D, R, T>

impl<P, C> Read<<C as CharSize>::Word> for Spi<Config<P, Slave, C>, Rx>

impl<P, M, C> Read<<C as CharSize>::Word> for Spi<Config<P, M, C>, Rx>