Struct stm32_hal2::rtc::Rtc[][src]

pub struct Rtc { /* fields omitted */ }
Expand description

Represents a Real Time Clock (RTC) peripheral.

Implementations

Initialize the RTC, including configuration register writes.

Sets calendar clock to 24 hr format

Sets calendar clock to 12 hr format

Reads current hour format selection

Setup periodic auto-wakeup interrupts. See ST AN4759, Table 11, and more broadly, section 2.4.1. See also reference manual, section 27.5. In addition to running this function, set up the interrupt handling function by adding the line make_rtc_interrupt_handler!(RTC_WKUP); somewhere in the body of your program. sleep_time is in ms.

Enable the wakeup timer.

Disable the wakeup timer.

Change the sleep time for the auto wakeup, after it’s been set up. Sleep time is in MS. Major DRY from set_wakeup.

Clears the wakeup flag. Must be cleared manually after every RTC wakeup. Alternatively, you could call this in the RTC wakeup interrupt handler.

set time using NaiveTime (ISO 8601 time without timezone) Hour format is 24h

Set the seconds component of the RTC’s current time.

Set the minutes component of the RTC’s current time.

Set the hours component of the RTC’s current time.

Set the weekday component of the RTC’s current date.

Set the day component of the RTC’s current date.

Set the month component of the RTC’s current date.

Set the year component of the RTC’s current date.

Set the date using NaiveDate (ISO 8601 calendar date without timezone). WeekDay is set using the set_weekday method

Set the current datetime.

Get the seconds component of the current time.

Get the minutes component of the current time.

Get the hours component of the current time.

Get the current time.

Get the weekday component of the current date.

Get the day component of the current date.

Get the month component of the current date.

Get the year component of the current date.

Get the current date.

Get the current datetime.

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

Performs the conversion.

Performs the conversion.

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.