Struct stm32f1xx_hal::serial::Rx
source · pub struct Rx<USART> { /* private fields */ }
Expand description
Serial receiver
Implementations§
source§impl<USART: Instance> Rx<USART>
impl<USART: Instance> Rx<USART>
sourcepub fn read_u16(&mut self) -> Result<u16, Error>
pub fn read_u16(&mut self) -> Result<u16, Error>
Reads 9-bit words from the UART/USART
If the UART/USART was configured with WordLength::Bits9
, 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.
pub fn read(&mut self) -> Result<u8, Error>
sourcepub fn listen_idle(&mut self)
pub fn listen_idle(&mut self)
Start listening for idle interrupt event
sourcepub fn unlisten_idle(&mut self)
pub fn unlisten_idle(&mut self)
Stop listening for idle interrupt event
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag