Struct stm32f4xx_hal::serial::Rx
source · [−]pub struct Rx<USART, WORD = u8> { /* private fields */ }
Expand description
Serial receiver
Implementations
sourceimpl<USART, WORD> Rx<USART, WORD> where
USART: Instance,
impl<USART, WORD> Rx<USART, WORD> where
USART: Instance,
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
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Return 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
Trait Implementations
sourceimpl<USART> PeriAddress for Rx<USART, u8> where
USART: Instance,
impl<USART> PeriAddress for Rx<USART, u8> where
USART: Instance,
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.
impl DMASet<StreamX<DMA1, 1_u8>, PeripheralToMemory, 4_u8> for Rx<USART3>
impl DMASet<StreamX<DMA1, 5_u8>, PeripheralToMemory, 4_u8> for Rx<USART2>
impl DMASet<StreamX<DMA2, 1_u8>, PeripheralToMemory, 5_u8> for Rx<USART6>
impl DMASet<StreamX<DMA2, 2_u8>, PeripheralToMemory, 4_u8> for Rx<USART1>
impl DMASet<StreamX<DMA2, 2_u8>, PeripheralToMemory, 5_u8> for Rx<USART6>
impl DMASet<StreamX<DMA2, 5_u8>, PeripheralToMemory, 4_u8> for Rx<USART1>
Auto Trait Implementations
impl<USART, WORD> RefUnwindSafe for Rx<USART, WORD> where
USART: RefUnwindSafe,
WORD: RefUnwindSafe,
impl<USART, WORD> Send for Rx<USART, WORD> where
USART: Send,
WORD: Send,
impl<USART, WORD> Sync for Rx<USART, WORD> where
USART: Sync,
WORD: Sync,
impl<USART, WORD> Unpin for Rx<USART, WORD> where
USART: Unpin,
WORD: Unpin,
impl<USART, WORD> UnwindSafe for Rx<USART, WORD> where
USART: UnwindSafe,
WORD: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more