83680c41db
Store the RTC value in the .uninitialized section, but make sure to flank it with some known values. That way we can determine if the RTC value has been initialized, or if it's random uninitialized garbage. As part of this, add a `common_hal_rtc_init()` routine to determine if the value is correct, or reset it to 0 if it is not valid. Signed-off-by: Sean Cross <sean@xobs.io> |
||
---|---|---|
.. | ||
RTC.c | ||
RTC.h | ||
__init__.c |