pub trait _embedded_hal_serial_Read<Word> {
    type Error;

    // Required method
    fn read(&mut self) -> Result<Word, Error<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§

source

type Error

Read error

Required Methods§

source

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

Reads a single word from the serial interface

Implementors§

source§

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

§

type Error = Error

source§

impl<P, C> Read<<C as CharSize>::Word> for Spi<Config<P, Slave, C>, Rx>where Config<P, Slave, C>: ValidConfig, P: ValidPads, C: CharSize, <C as CharSize>::Word: PrimInt, u16: AsPrimitive<<C as CharSize>::Word>,

Implement serial::Read for Rx Spi structs in Slave OpMode

serial::Read is only implemented for Spi structs with Rx Capability. In Slave OpMode, Read does not have to initiate transactions, so it does not have to store any internal state. It only has to wait on RXC.

§

type Error = Error

source§

impl<P, M, C> Read<<C as CharSize>::Word> for Spi<Config<P, M, C>, Rx>where Config<P, M, C>: ValidConfig, P: ValidPads, M: MasterMode, C: CharSize, <C as CharSize>::Word: PrimInt, u16: AsPrimitive<<C as CharSize>::Word>,

Implement serial::Read for Rx Spi structs in a MasterMode

serial::Read is only implemented for Spi structs with Rx Capability. In a MasterMode, Read has to initiate transactions, so it keeps track of the transaction state. If a transaction is in progress, it will wait on RXC. If not, it will wait on DRE, and then send 0.

§

type Error = Error

source§

impl<RX, CTS> Read<u8> for UART0Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, CTS> Read<u8> for UART1Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, CTS> Read<u8> for UART2Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, CTS> Read<u8> for UART3Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, CTS> Read<u8> for UART4Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, CTS> Read<u8> for UART5Rx<RX, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART0<RX, TX, RTS, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART1<RX, TX, RTS, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART2<RX, TX, RTS, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART3<RX, TX, RTS, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART4<RX, TX, RTS, CTS>

§

type Error = ()

source§

impl<RX, TX, RTS, CTS> Read<u8> for UART5<RX, TX, RTS, CTS>

§

type Error = ()