Struct grand_central_m4::rtc::Rtc [−][src]
pub struct Rtc<Mode> where
Mode: RtcMode, { /* fields omitted */ }
Expand description
Rtc represents the RTC peripheral for either clock/calendar or timer mode.
Implementations
Reonfigures the peripheral for 32bit counter mode.
Reconfigures the peripheral for clock/calendar mode. Requires the source clock to be running at 1024 Hz.
Configures the RTC in 32-bit counter mode with no prescaler (default state after reset) and the counter initialized to zero.
Sets the internal counter value.
pub fn reset_and_compute_prescaler<T>(
&mut self,
timeout: T
) -> &Rtc<Count32Mode> where
T: Into<<Rtc<Count32Mode> as CountDown>::Time>,
pub fn reset_and_compute_prescaler<T>(
&mut self,
timeout: T
) -> &Rtc<Count32Mode> where
T: Into<<Rtc<Count32Mode> as CountDown>::Time>,
This resets the internal counter and sets the prescaler to match the provided timeout. You should configure the prescaler using the longest timeout you plan to measure.
Trait Implementations
Enable the interrupt generation for this hardware timer. This method only sets the clock configuration to trigger the interrupt; it does not configure the interrupt controller or define an interrupt handler.
Disables interrupt generation for this hardware timer. This method only sets the clock configuration to prevent triggering the interrupt; it does not configure the interrupt controller.