aboutsummaryrefslogtreecommitdiff
path: root/src/Clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Clock.cpp')
-rwxr-xr-xsrc/Clock.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Clock.cpp b/src/Clock.cpp
index c2618cb..fff797f 100755
--- a/src/Clock.cpp
+++ b/src/Clock.cpp
@@ -59,9 +59,9 @@
/* Create an rtc object mebby should be private to the class JOE?? */
// add preprocessor code here for non M0 systems.
-#ifdef ARDUINO_SAMD_ZERO
-RTCZero rtc;
-#endif
+//#ifdef ARDUINO_SAMD_ZERO
+//RTCZero rtc;
+//#endif
/* calculate build date and time (this should be referenceable from monitor for SWV ... */
const byte build_seconds = ((__TIME__[6] - '0') * 10 + __TIME__[7] - '0');
const byte build_minutes = ((__TIME__[3] - '0') * 10 + __TIME__[4] - '0');
@@ -114,7 +114,11 @@ void Clock::init()
// bracket with pre-processor defs ....
bool Clock::RTCIsRunning(void) {
+ #if defined(RTC_MODE2_CTRL_ENABLE)
return (RTC->MODE2.CTRL.reg & RTC_MODE2_CTRL_ENABLE);
+ #else
+ return true;
+ #endif
}
const uint8_t daysInMonth [] { 31,28,31,30,31,30,31,31,30,31,30,31 };