pub struct RawDateTime {
pub year: u16,
pub month: u8,
pub day: u8,
pub day_of_week: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}Expand description
Raw contents of the RTC calendar registers.
This is a dumb container for the values in the RTC registers. It does no validation
whatsoever: it can hold dates that do not exist (February 30, month 0, hour 61…), and
Rtc::set_raw writes whatever it holds to the hardware. Out-of-range
values are truncated to the width of the register fields.
It is meant for code that cares about the last few hundred bytes of flash, or that needs the
hardware day of week. For anything else, enable the jiff feature and use Rtc::read and
Rtc::set, which work with validated jiff::civil::DateTime values.
Fields§
§year: u16Year, 0..=4095.
month: u8Month, 1..=12, 1 is January.
day: u8Day of the month, 1..=31.
day_of_week: u8Day of the week, 0..=6, 0 is Sunday.
The RTC does not check it against the date, it only increments it every day.
hour: u8Hour, 0..=23.
minute: u8Minute, 0..=59.
second: u8Second, 0..=59.