rtc_read_once

Function rtc_read_once 

Source
pub async fn rtc_read_once<R, P, D>(
    uart: R,
    power: &mut P,
    delay: D,
) -> Option<DateTime>
where R: Read, P: Power, D: DelayNs,
Expand description

Power the receiver just long enough to read the time out of it, then return it to its off state.

For boards where the receiver’s own real-time-clock domain is the only clock that survives a power cycle. The domain cannot speak a UART on its own, so reading it mechanically requires bringing the main domain up — but what is being read is a clock, and everything positional seen along the way is discarded.

Returns the first instant the receiver reports, or None if it reports none within RTC_READ_TIMEOUT_MS — which is what a receiver that lost its backup power looks like.

The caller decides whether to believe the answer: this is governed by PROP_GNSS_TIME_TRUST, not by PROP_GNSS_ENABLED.