pub struct Rcu { /* private fields */ }Expand description
Owns the RCU peripheral with its clock tree already frozen; obtained from
UnfrozenRcu::freeze.
Implementations§
Source§impl Rcu
impl Rcu
Sourcepub fn ck_out(&mut self, src: CkOutSrc, div: CkOutDiv)
pub fn ck_out(&mut self, src: CkOutSrc, div: CkOutDiv)
Routes an internal clock node out onto PA8 (AF0) or PA9 (AF5).
The pin still has to be put into the matching alternate function. Applied
immediately and not recorded in Clocks.
Sourcepub fn enable_irc40k(&mut self)
pub fn enable_irc40k(&mut self)
Starts the internal 40 kHz oscillator and blocks until it is stable.
Sourcepub fn disable_irc40k(&mut self)
pub fn disable_irc40k(&mut self)
Stops the internal 40 kHz oscillator.
FWDGT and the RTC run off it; both stop with it.
Sourcepub fn enable_cfgcmp(&mut self)
pub fn enable_cfgcmp(&mut self)
Clocks SYSCFG and the comparator.
CFGCMPEN gates both blocks at once.
Sourcepub fn disable_cfgcmp(&mut self)
pub fn disable_cfgcmp(&mut self)
Stops the clock of SYSCFG and the comparator.
One bit gates both blocks: SYSCFG stops too.
Sourcepub fn reset_cfgcmp(&mut self)
pub fn reset_cfgcmp(&mut self)
Pulses the reset line of SYSCFG and the comparator.
One bit resets both blocks: the EXTI source selection and the remaps in SYSCFG return to their defaults too.
Sourcepub fn reset_flag(&self, flag: ResetFlag) -> bool
pub fn reset_flag(&self, flag: ResetFlag) -> bool
Whether flag took part in the last reset.
Reads the flag as it stands; more than one can answer true.
Sourcepub fn clear_reset_flags(&mut self)
pub fn clear_reset_flags(&mut self)
Clears every reset flag at once; RSTFC has no per-flag granularity.
Until this is called the flags accumulate across resets, so a later reading cannot tell which reset set them.