Struct imxrt_hal::srtc::Unclocked [−][src]
pub struct Unclocked { /* fields omitted */ }
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
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.
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
.
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.