Closed dholth closed 8 years ago
There you have it, my attempt at battery-persistent RTC for f0, f1, f4. Tested on f0. Reviewed the f1 stdlib example to find its backup function, but it has no use for the _hourFormat flag. At least the f1discovery comes with a populated LSE.
Usage:: Rtc<RtcLseClockFeature> rtc(RTC_HourFormat_24, 0xdeadbeef);
Rtc<RtcLseClockFeature> rtc(RTC_HourFormat_24, 0xdeadbeef);
(change backup value if you want to force a reset of the backup domain and reinitialize the LSE)
There you have it, my attempt at battery-persistent RTC for f0, f1, f4. Tested on f0. Reviewed the f1 stdlib example to find its backup function, but it has no use for the _hourFormat flag. At least the f1discovery comes with a populated LSE.
Usage::
Rtc<RtcLseClockFeature> rtc(RTC_HourFormat_24, 0xdeadbeef);
(change backup value if you want to force a reset of the backup domain and reinitialize the LSE)