pub struct Rtc<Mode: RtcMode> { /* private fields */ }
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.

Releases the RTC resource

Configures the RTC in 32-bit counter mode with no prescaler (default state after reset) and the counter initialized to zero.

Returns the internal counter value.

Sets the internal counter value.

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.

Returns the current clock/calendar value.

Updates the current clock/calendar value.

Trait Implementations

The unit of time used by this timer
Starts a new count down
Non-blockingly “waits” until the count down finishes Read more

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.