Expand description

Interface to the Real-time clock (RTC) peripheral.

The real-time clock (RTC) is an independent BCD timer/counter. The RTC provides a time- of-day clock/calendar with programmable alarm interrupts.

Date Types

The date/time types (NaiveDate, NaiveTime and NaiveDateTime), are re-exported from rtcc, which in turn re-exports them from chrono.

To use methods like .year() or .hour(), you may need to import the Datelike or Timelike traits.

Valid Date Range

The RTC only supports two-digit years (00-99). The value 00 corresponds to the year 2000 (not 1970!). Additionally, the year 00 cannot be used because this value is the RTC domain reset default value. This means that dates in the range 2001-01-01 to 2099-12-31 can be represented.

More Information

See STM32L0x2 reference manual, chapter 26 or STM32L0x1 reference manual, chapter 22 for more details.

Re-exports

pub use rtcc::Datelike;
pub use rtcc::NaiveDate;
pub use rtcc::NaiveDateTime;
pub use rtcc::NaiveTime;
pub use rtcc::Timelike;

Structs

Flags to enable/disable RTC interrupts.

Entry point to the RTC API.

The RTC wakeup timer

Enums

Errors that can occur when dealing with the RTC.