mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
note RTC todo's
This commit is contained in:
parent
0487d5a2a3
commit
3427c4965e
1 changed files with 6 additions and 0 deletions
|
|
@ -37,6 +37,9 @@ fn rtc_service() -> ! {
|
|||
|
||||
let mut rtc_rollovers: u32 = 0; // gives us up to 168 years
|
||||
let mut last_rtc_val = rtc.r(DR); // use this to detect rollovers
|
||||
// TODO:
|
||||
// - check backup register: is the RTC synchronized to the value on disk?
|
||||
// - if yes, read the value and use it to initialize the time offset, instead of using 0.
|
||||
let mut utc_offset_ms = 0;
|
||||
let mut tz_offset_ms = 0;
|
||||
|
||||
|
|
@ -103,6 +106,9 @@ fn rtc_service() -> ! {
|
|||
log::info!("rtc_secs: {}", rtc_offset_ms / 1000);
|
||||
let offset = utc_time_ms - rtc_offset_ms;
|
||||
utc_offset_ms = offset;
|
||||
// TODO:
|
||||
// - commit the UTC offset to disk
|
||||
// - set the flag on the backup register for time sync to `true`
|
||||
}
|
||||
}
|
||||
Some(TimeOp::SetTzOffsetMs) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue