Struct stm32f4xx_hal::serial::Rx
source · [−]pub struct Rx<USART, WORD = u8> { /* private fields */ }
Expand description
Serial receiver
Implementations
sourceimpl<USART: Instance, WORD> Rx<USART, WORD>
impl<USART: Instance, WORD> Rx<USART, WORD>
sourcepub fn listen(&mut self)
pub fn listen(&mut self)
Start listening for an rx not empty interrupt event
Note, you will also have to enable the corresponding interrupt in the NVIC to start receiving events.
sourcepub fn listen_idle(&mut self)
pub fn listen_idle(&mut self)
Start listening for a line idle interrupt event
Note, you will also have to enable the corresponding interrupt in the NVIC to start receiving events.
sourcepub fn unlisten_idle(&mut self)
pub fn unlisten_idle(&mut self)
Stop listening for the line idle interrupt event
Trait Implementations
sourceimpl<USART: Instance> PeriAddress for Rx<USART, u8>
impl<USART: Instance> PeriAddress for Rx<USART, u8>
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.
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.
sourceimpl<USART: Instance, WORD> RxISR for Rx<USART, WORD>
impl<USART: Instance, WORD> RxISR for Rx<USART, WORD>
sourcefn is_rx_not_empty(&self) -> bool
fn is_rx_not_empty(&self) -> bool
Return true if the rx register is not empty (and can be read)
sourcefn clear_idle_interrupt(&self)
fn clear_idle_interrupt(&self)
Clear idle line interrupt flag