Struct stm32l4xx_hal::serial::Rx
source · [−]pub struct Rx<USART> { /* private fields */ }
Expand description
Serial receiver
Implementations
sourceimpl Rx<USART1>
impl Rx<USART1>
pub fn with_dma(self, channel: C5) -> RxDma1
sourcepub fn check_for_error(&mut self) -> Result<(), Error>
pub fn check_for_error(&mut self) -> Result<(), Error>
Check for, and return, any errors
The read
methods can only return one error at a time, but
there might actually be multiple errors. This method will
return and clear a currently active error. Once it returns
Ok(())
, it should be possible to proceed with the next
read
call unimpeded.
sourcepub fn is_idle(&mut self, clear: bool) -> bool
pub fn is_idle(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an idle line and clears the flag
sourcepub fn is_receiver_timeout(&mut self, clear: bool) -> bool
pub fn is_receiver_timeout(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an receiver timeout and clears the flag
sourcepub fn check_character_match(&mut self, clear: bool) -> bool
pub fn check_character_match(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an character match and clears the flag
sourceimpl Rx<USART2>
impl Rx<USART2>
pub fn with_dma(self, channel: C6) -> RxDma2
sourcepub fn check_for_error(&mut self) -> Result<(), Error>
pub fn check_for_error(&mut self) -> Result<(), Error>
Check for, and return, any errors
The read
methods can only return one error at a time, but
there might actually be multiple errors. This method will
return and clear a currently active error. Once it returns
Ok(())
, it should be possible to proceed with the next
read
call unimpeded.
sourcepub fn is_idle(&mut self, clear: bool) -> bool
pub fn is_idle(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an idle line and clears the flag
sourcepub fn is_receiver_timeout(&mut self, clear: bool) -> bool
pub fn is_receiver_timeout(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an receiver timeout and clears the flag
sourcepub fn check_character_match(&mut self, clear: bool) -> bool
pub fn check_character_match(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an character match and clears the flag
Trait Implementations
sourceimpl CharacterMatch for Rx<USART1>
impl CharacterMatch for Rx<USART1>
sourcefn check_character_match(&mut self, clear: bool) -> bool
fn check_character_match(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an character match and clears the flag
sourceimpl CharacterMatch for Rx<USART2>
impl CharacterMatch for Rx<USART2>
sourcefn check_character_match(&mut self, clear: bool) -> bool
fn check_character_match(&mut self, clear: bool) -> bool
Checks to see if the USART peripheral has detected an character match and clears the flag
sourceimpl ReceiverTimeout for Rx<USART1>
impl ReceiverTimeout for Rx<USART1>
sourcefn check_receiver_timeout(&mut self, clear: bool) -> bool
fn check_receiver_timeout(&mut self, clear: bool) -> bool
Check to see if the peripheral has detected a receiver timeout and clears the flag Read more
sourceimpl ReceiverTimeout for Rx<USART2>
impl ReceiverTimeout for Rx<USART2>
sourcefn check_receiver_timeout(&mut self, clear: bool) -> bool
fn check_receiver_timeout(&mut self, clear: bool) -> bool
Check to see if the peripheral has detected a receiver timeout and clears the flag Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more