pub struct RtcConfig {
    pub clock_source: RtcClockSource,
    pub async_prescaler: u8,
    pub sync_prescaler: u16,
    pub bypass_lse_output: bool,
}
Expand description

Configuration data for the RTC.

Fields

clock_source: RtcClockSource

RTC clock source. Defaults to LSI (Low speed internal oscillator)

async_prescaler: u8

Asynchronous prescaler factor This is the asynchronous division factor: ck_apre frequency = RTCCLK frequency/(PREDIV_A+1) ck_apre drives the subsecond register. Defaults to 127.

sync_prescaler: u16

Synchronous prescaler factor This is the synchronous division factor: ck_spre frequency = ck_apre frequency/(PREDIV_S+1) ck_spre must be 1Hz. Defaults to 255.

bypass_lse_output: bool

Bypass LSE output - eg if you’re using a self-powered external oscillator. This saves power, and lets you use the LSE output pin as a GPIO.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

LSI with prescalers assuming 32.768 kHz. Raw sub-seconds in 1/256.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

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.