Struct Syscon

Source
pub struct Syscon { /* private fields */ }

Implementations§

Source§

impl Syscon

Source

pub unsafe fn steal() -> Self

§Safety

Must only be called once for the entire duration of the program

Source

pub fn release(self) -> SYSCON

Source§

impl Syscon

Source

pub fn rev_id(&self) -> u8

Source

pub fn mco_num_in_die_id(&self) -> u32

Source§

impl Syscon

The main API for the SYSCON peripheral

Source

pub fn enable_clock<P: ClockControl>(&mut self, peripheral: &mut P)

Enables the clock for a peripheral or other hardware component

Source

pub fn disable_clock<P: ClockControl>(&mut self, peripheral: &mut P)

Disable peripheral clock

Source

pub fn is_clock_enabled<P: ClockControl>(&self, peripheral: &P) -> bool

Check if peripheral clock is enabled

Source

pub fn reset<P: ResetControl>(&mut self, peripheral: &mut P)

Reset a peripheral

Source

pub unsafe fn reset_all_noncritical_peripherals() -> Syscon

Steals syscon and asserts reset to all peripherals that won’t immediately cause a crash. Flash, Fmc, and AnalogCtrl are not reset.

§Safety

Steals the syscon, must not be called if Syscon is owned

Source§

impl Syscon

This impl block contains no items.

TODO: do this systematically By default, fro_12m is enabled in MAINCLKSELA

Trait Implementations§

Source§

impl From<SYSCON> for Syscon

Source§

fn from(raw: SYSCON) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Syscon

§

impl RefUnwindSafe for Syscon

§

impl Send for Syscon

§

impl !Sync for Syscon

§

impl Unpin for Syscon

§

impl UnwindSafe for Syscon

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.