#[repr(transparent)]pub struct Cfg(pub u32);Expand description
USART Configuration register. Basic USART configuration settings that typically are not changed during operation.
Tuple Fields§
§0: u32Implementations§
Source§impl Cfg
impl Cfg
Sourcepub const fn set_enable(&mut self, val: bool)
pub const fn set_enable(&mut self, val: bool)
USART Enable.
Sourcepub const fn set_datalen(&mut self, val: Datalen)
pub const fn set_datalen(&mut self, val: Datalen)
Selects the data size for the USART.
Sourcepub const fn set_paritysel(&mut self, val: Paritysel)
pub const fn set_paritysel(&mut self, val: Paritysel)
Selects what type of parity is used by the USART.
Sourcepub const fn stoplen(&self) -> Stoplen
pub const fn stoplen(&self) -> Stoplen
Number of stop bits appended to transmitted data. Only a single stop bit is required for received data.
Sourcepub const fn set_stoplen(&mut self, val: Stoplen)
pub const fn set_stoplen(&mut self, val: Stoplen)
Number of stop bits appended to transmitted data. Only a single stop bit is required for received data.
Sourcepub const fn set_mode32k(&mut self, val: bool)
pub const fn set_mode32k(&mut self, val: bool)
Selects standard or 32 kHz clocking mode.
Sourcepub const fn set_linmode(&mut self, val: bool)
pub const fn set_linmode(&mut self, val: bool)
LIN break mode enable.
Sourcepub const fn ctsen(&self) -> bool
pub const fn ctsen(&self) -> bool
CTS Enable. Determines whether CTS is used for flow control. CTS can be from the input pin, or from the USART’s own RTS if loopback mode is enabled.
Sourcepub const fn set_ctsen(&mut self, val: bool)
pub const fn set_ctsen(&mut self, val: bool)
CTS Enable. Determines whether CTS is used for flow control. CTS can be from the input pin, or from the USART’s own RTS if loopback mode is enabled.
Sourcepub const fn set_syncen(&mut self, val: Syncen)
pub const fn set_syncen(&mut self, val: Syncen)
Selects synchronous or asynchronous operation.
Sourcepub const fn clkpol(&self) -> Clkpol
pub const fn clkpol(&self) -> Clkpol
Selects the clock polarity and sampling edge of received data in synchronous mode.
Sourcepub const fn set_clkpol(&mut self, val: Clkpol)
pub const fn set_clkpol(&mut self, val: Clkpol)
Selects the clock polarity and sampling edge of received data in synchronous mode.
Sourcepub const fn set_syncmst(&mut self, val: Syncmst)
pub const fn set_syncmst(&mut self, val: Syncmst)
Synchronous mode Master select.
Sourcepub const fn set_oeta(&mut self, val: bool)
pub const fn set_oeta(&mut self, val: bool)
Output Enable Turnaround time enable for RS-485 operation.
Sourcepub const fn set_autoaddr(&mut self, val: bool)
pub const fn set_autoaddr(&mut self, val: bool)
Automatic Address matching enable.