Skip to main content

Rcu

Struct Rcu 

Source
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

Source

pub fn clocks(&self) -> Clocks

The frequencies the tree was frozen at.

Source

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.

Source

pub fn enable_irc40k(&mut self)

Starts the internal 40 kHz oscillator and blocks until it is stable.

Source

pub fn disable_irc40k(&mut self)

Stops the internal 40 kHz oscillator.

FWDGT and the RTC run off it; both stop with it.

Source

pub fn enable_cfgcmp(&mut self)

Clocks SYSCFG and the comparator.

CFGCMPEN gates both blocks at once.

Source

pub fn disable_cfgcmp(&mut self)

Stops the clock of SYSCFG and the comparator.

One bit gates both blocks: SYSCFG stops too.

Source

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.

Source

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.

Source

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.

Auto Trait Implementations§

§

impl !Sync for Rcu

§

impl Freeze for Rcu

§

impl RefUnwindSafe for Rcu

§

impl Send for Rcu

§

impl Unpin for Rcu

§

impl UnsafeUnpin for Rcu

§

impl UnwindSafe for Rcu

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.