From 0ca5c21e6b34119e607d908c3533ea91c1374694 Mon Sep 17 00:00:00 2001 From: "romolo.manfredini@gmail.com" Date: Mon, 1 Oct 2012 21:42:44 +0000 Subject: [PATCH] RTC Support (improved for V4) --- src/drivers.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/drivers.cpp b/src/drivers.cpp index 2fd1748d8..1fddca88f 100644 --- a/src/drivers.cpp +++ b/src/drivers.cpp @@ -164,11 +164,15 @@ void per10ms() #if defined(RTCLOCK) /* Update gloabal Date/Time every 100 per10ms cycles */ if (++g_ms100 == 100) { +#if defined(PCBARM) if (g_rtcTime!=0) { g_rtcTime++; // inc global unix timestamp one second } else { - rtc_init(); + rtc_init(); // try to get a valid time from the coprocessor } +#else + g_rtcTime++; // inc global unix timestamp one second +#endif g_ms100 = 0; } #endif