DS3231 driver with timestamp string function

Dependents:   swimate_v2

Fork of DS3231 by Robert Fischer

Revision:
4:b5736355af3a
Parent:
3:f56cd929da3f
Child:
5:71aad49938bc
--- a/DS3231.h	Mon May 12 20:58:55 2014 +0000
+++ b/DS3231.h	Tue May 27 23:53:24 2014 +0000
@@ -210,6 +210,18 @@
      */
      bool OSF();
      
+     /** returns a c-string timestamp
+     * @return character pointer
+     */
+     char* getTimestamp();
+     
+     /**
+     *  Tells if the RTC has lost power recently.
+     *  @return False if battery power has been lost
+     *  @return True if battery power has been maintained.
+     */
+     bool checkClockIntegrity();
+     
      bool error;
      
      private :
@@ -218,6 +230,7 @@
      int dec2bcd(int k); // decimal to bcd conversion
      void decodeTime(int regHours, int regMinutes, int regSeconds,int *Hours, int *Minutes, int *Seconds);
      void decodeDate(int regDate,int regMonth, int regYear, int *date, int *month, int *year);
+     char charbuf[20];
     };