pub trait _embedded_hal_serial_Read<Word> {
type Error;
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
Required Methods
Implementors
sourceimpl<USART, PINS, WORD> Read<WORD> for Serial<USART, PINS, WORD> where
USART: Instance,
Rx<USART, WORD>: Read<WORD, Error = Error>,
impl<USART, PINS, WORD> Read<WORD> for Serial<USART, PINS, WORD> where
USART: Instance,
Rx<USART, WORD>: Read<WORD, Error = Error>,
sourceimpl<USART: Instance> Read<u16> for Rx<USART, u16>
impl<USART: Instance> Read<u16> for Rx<USART, u16>
Reads 9-bit words from the UART/USART
If the UART/USART was configured with WordLength::DataBits9
, the returned value will contain
9 received data bits and all other bits set to zero. Otherwise, the returned value will contain
8 received data bits and all other bits set to zero.