LowPowerClock

Struct LowPowerClock 

Source
pub struct LowPowerClock<State = Enabled> { /* private fields */ }
Expand description

The 10 kHz low-power clock

This is one of the clocks that can be used to run the self-wake-up timer (WKT). See user manual, section 18.5.1.

Implementations§

Source§

impl LowPowerClock<Disabled>

Source

pub fn enable(self, pmu: &mut Handle) -> LowPowerClock<Enabled>

Enable the low-power clock

This method is only available, if LowPowerClock is in the Disabled state. Code that attempts to call this method when the clock is already enabled will not compile.

Consumes this instance of LowPowerClock and returns another instance that has its State type parameter set to Enabled. That new instance implements clock::Enabled, which might be required by APIs that need an enabled clock.

Source§

impl LowPowerClock<Enabled>

Source

pub fn disable(self, pmu: &mut Handle) -> LowPowerClock<Disabled>

Disable the low-power clock

This method is only available, if LowPowerClock is in the Enabled state. Code that attempts to call this method when the clock is already disabled will not compile.

Consumes this instance of LowPowerClock and returns another instance that has its State type parameter set to Disabled.

Trait Implementations§

Source§

impl<State> Clock for LowPowerClock<State>

Source§

fn select(w: &mut W)

Internal method to select the clock as the clock source for the WKT Read more
Source§

impl<State> Frequency for LowPowerClock<State>

Source§

fn hz(&self) -> u32

The frequency of the clock in Hz Read more
Source§

impl Enabled for LowPowerClock<Enabled>

Auto Trait Implementations§

§

impl<State> Freeze for LowPowerClock<State>
where State: Freeze,

§

impl<State> RefUnwindSafe for LowPowerClock<State>
where State: RefUnwindSafe,

§

impl<State> Send for LowPowerClock<State>
where State: Send,

§

impl<State> Sync for LowPowerClock<State>
where State: Sync,

§

impl<State> Unpin for LowPowerClock<State>
where State: Unpin,

§

impl<State> UnwindSafe for LowPowerClock<State>
where State: UnwindSafe,

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 = 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.