pub trait Read<Word> {
    type Error;

    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 Associated Types

Read error

Required Methods

Reads a single word from the serial interface

Implementors

impl<P, M, L> Read<<L as Length>::Word> for Spi<Config<P, M, L>, Rx>where
    Config<P, M, L>: ValidConfig,
    P: ValidPads,
    M: MasterMode,
    L: Length,
    L::Word: PrimInt,
    u32: AsPrimitive<L::Word>,

impl<P, L> Read<<L as Length>::Word> for Spi<Config<P, Slave, L>, Rx>where
    Config<P, Slave, L>: ValidConfig,
    P: ValidPads,
    L: Length,
    L::Word: PrimInt,
    u32: AsPrimitive<L::Word>,

impl<C, D> Read<<C as AnyConfig>::Word> for Uart<C, D>where
    C: ValidConfig,
    D: Receive,
    DataReg: AsPrimitive<C::Word>,