Local Library for DS3231 RTC

Fork of ds3231 by Maxim Integrated

Files at this revision

API Documentation at this revision

Comitter:
j3
Date:
Sat Nov 29 20:22:12 2014 +0000
Parent:
5:61dfe2690360
Child:
7:0551d7e7c13f
Commit message:
updated get_epoch fx to initialize time and calendar members to zero

Changed in this revision

ds3231.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ds3231.cpp	Fri Nov 28 02:36:26 2014 +0000
+++ b/ds3231.cpp	Sat Nov 29 20:22:12 2014 +0000
@@ -674,8 +674,8 @@
     struct tm sys_time;
     
     //RTC vars
-    ds3231_time_t rtc_time;
-    ds3231_calendar_t rtc_calendar;
+    ds3231_time_t rtc_time = {0,0,0,0,0};
+    ds3231_calendar_t rtc_calendar = {0,0,0,0};
     
     get_calendar(&rtc_calendar);
     get_time(&rtc_time);