Skip to content

Commit b2f6c10

Browse files
committed
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 <[email protected]>
1 parent dc394f3 commit b2f6c10

File tree

4 files changed

+275
-298
lines changed

4 files changed

+275
-298
lines changed

0 commit comments

Comments
 (0)