Fix RTC synchronization after sleep, add many more tests

There were two issues with the tests

1. Incorrect print formats causing incorrect output.

2. The RTC driver was not waiting for the shadow registers to be
updated after sleeping, their reset values to be read.
This commit is contained in:
2020-04-22 09:09:31 -07:00
parent 2fa4a5e658
commit f455ce9113
20 changed files with 700 additions and 94 deletions

View File

@@ -96,6 +96,16 @@ public:
, m_seconds(seconds)
{}
inline bool operator ==(const WallClockTime &t2) const {
return m_hours == t2.m_hours
&& m_minutes == t2.m_minutes
&& m_seconds == t2.m_seconds;
}
inline bool operator !=(const WallClockTime &t2) const {
return !operator==(t2);
}
static inline uint8_t hour24_to_hour12(uint8_t hour24) {
if (hour24 == 0) {
return 12;
@@ -220,4 +230,5 @@ private:
uint8_t m_minutes;
uint8_t m_seconds;
};
}