Commit cfd98df
refactor: Improve reliability and simplify implementation
* call HAL_RTC_Init() only when needed to avoid losing hundreds
of milliseconds on RTC counter
* remove useless check of _configured at the beginning of
STM32RTC class methods
* Use flag "INITS" to detect whether RTC calendar is initialized
(except for F1 which doesn't have this flag)
This prevent the use of year 2000 which is the default hardware
reset value and doesn't trigger INITS flag
* Use Backup registers only for F1, and no more for other series
* Simplify class state management:
- remove _configured and _reset, _alarmEnabled
- add _timeSet
fixes #66
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>1 parent 518f12c commit cfd98df
4 files changed
+276
-299
lines changed
0 commit comments