Struct atsamd_hal::rtc::Rtc
source · [−]pub struct Rtc<Mode: RtcMode> { /* private fields */ }
Expand description
Rtc represents the RTC peripheral for either clock/calendar or timer mode.
Implementations
sourceimpl<Mode: RtcMode> Rtc<Mode>
impl<Mode: RtcMode> Rtc<Mode>
sourcepub fn into_count32_mode(self) -> Rtc<Count32Mode>
pub fn into_count32_mode(self) -> Rtc<Count32Mode>
Reonfigures the peripheral for 32bit counter mode.
sourcepub fn into_clock_mode(self) -> Rtc<ClockMode>
pub fn into_clock_mode(self) -> Rtc<ClockMode>
Reconfigures the peripheral for clock/calendar mode. Requires the source clock to be running at 1024 Hz.
sourceimpl Rtc<Count32Mode>
impl Rtc<Count32Mode>
sourcepub fn count32_mode(rtc: RTC, rtc_clock_freq: Hertz, pm: &mut PM) -> Self
pub fn count32_mode(rtc: RTC, rtc_clock_freq: Hertz, pm: &mut PM) -> Self
Configures the RTC in 32-bit counter mode with no prescaler (default state after reset) and the counter initialized to zero.
sourcepub fn set_count32(&mut self, count: u32)
pub fn set_count32(&mut self, count: u32)
Sets the internal counter value.
Trait Implementations
sourceimpl CountDown for Rtc<Count32Mode>
impl CountDown for Rtc<Count32Mode>
sourceimpl InterruptDrivenTimer for Rtc<Count32Mode>
impl InterruptDrivenTimer for Rtc<Count32Mode>
sourcefn enable_interrupt(&mut self)
fn enable_interrupt(&mut self)
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.
sourcefn disable_interrupt(&mut self)
fn disable_interrupt(&mut self)
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.