pub type USART2 = Periph<RegisterBlock, 1073759232>;Expand description
Universal synchronous asynchronous receiver transmitter
See peripheral structure
Aliased Type§
pub struct USART2 { /* private fields */ }Trait Implementations§
Source§impl Enable for USART2
impl Enable for USART2
Source§fn is_enabled() -> bool
fn is_enabled() -> bool
Check if peripheral enabled
Source§fn is_disabled() -> bool
fn is_disabled() -> bool
Check if peripheral disabled
Source§unsafe fn enable_unchecked()
unsafe fn enable_unchecked()
Safety Read more
Source§unsafe fn disable_unchecked()
unsafe fn disable_unchecked()
Safety Read more
Source§impl UartPeriph for USART2
impl UartPeriph for USART2
Source§fn clear_err_flag(&self)
fn clear_err_flag(&self)
In order to clear that error flag, you have to do a read from the sr register followed by a read from the dr register.
Source§fn is_tx_complete(&self) -> bool
fn is_tx_complete(&self) -> bool
Transfer is empty and completed
fn write(&mut self, word: u16) -> Result<(), Error>
fn read(&mut self) -> Result<u16, Error>
fn set_interrupt(&mut self, event: Event, enable: bool)
fn is_interrupt_enable(&mut self, event: Event) -> bool
Source§fn is_interrupted(&mut self, event: Event) -> bool
fn is_interrupted(&mut self, event: Event) -> bool
Read and clean the flag