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
Trait Implementations§
Auto Trait Implementations§
impl<USART> Freeze for Rx<USART>
impl<USART> RefUnwindSafe for Rx<USART>where
USART: RefUnwindSafe,
impl<USART> Send for Rx<USART>where
USART: Send,
impl<USART> Sync for Rx<USART>where
USART: Sync,
impl<USART> Unpin for Rx<USART>where
USART: Unpin,
impl<USART> UnwindSafe for Rx<USART>where
USART: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more