Struct imxrt_hal::srtc::Unclocked[][src]

pub struct Unclocked { /* fields omitted */ }

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

impl Unclocked[src]

pub fn enable_and_set(self, ccm: &mut Handle, time: u32, ticks: u16) -> SRTC[src]

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.

pub fn enable(self, ccm: &mut Handle) -> SRTC[src]

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.

pub fn try_enable(
    self,
    ccm: &mut Handle,
    seconds: u32,
    ticks: u16
) -> EnabledState
[src]

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

impl Send for Unclocked

impl !Sync for Unclocked

impl Unpin for Unclocked

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.