pub struct Rx<USART> { /* private fields */ }
Expand description
Serial receiver
Implementations§
Source§impl 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
Source§impl 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§
Source§impl CharacterMatch for Rx<USART1>
impl CharacterMatch for Rx<USART1>
Source§fn 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
Source§impl CharacterMatch for Rx<USART2>
impl CharacterMatch for Rx<USART2>
Source§fn 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