Struct imxrt_hal::snvs::srtc::Disabled

source ·
pub struct Disabled { /* private fields */ }
Expand description

The SRTC, disabled.

Note: The SRTC may actually be enabled, as (unless disabled) it stays enabled across reboots as long as it has power.

Implementations§

source§

impl Disabled

source

pub fn enable_and_set(self, core: &mut Core, time: u32, ticks: u16) -> Srtc

Enable the Secure Real-Time Clock and set it to the provided time. The time provided is a count of seconds since some epoch and the sub-second 32768Hz ticks.

Usually that epoch is the Unix epoch, but as an example setting 0 would create a simple ‘seconds since SRTC enabled’ clock.

source

pub fn enable(self, core: &mut Core) -> Srtc

Enable the Secure Real-Time Clock without setting the time. The SRTC keeps track of time as long as it is enabled and has power, so this function will avoid overwriting the old time.

If no time had previously been set, the RTC will start counting from 0.

source

pub fn try_enable( self, core: &mut Core, seconds: u32, ticks: u16 ) -> EnabledState

Enable the SRTC.

If the SRTC isn’t already running, try_enable uses seconds and ticks as the starting count for the RTC. If the SRTC is currently running, the return indicates the current RTC time.

Auto Trait Implementations§

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>,

§

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>,

§

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.