j

Dependents:   LPC-SD-35

Fork of ds3231 by Maxim Integrated

Revision:
5:61dfe2690360
Parent:
4:0beb5e9ac927
Child:
8:c7484a65fcea
--- a/ds3231.h	Thu Nov 20 22:16:15 2014 +0000
+++ b/ds3231.h	Fri Nov 28 02:36:26 2014 +0000
@@ -454,5 +454,30 @@
         **************************************************************/
         uint16_t get_temperature(void);
         
+        
+        /**********************************************************//**
+        * Get epoch time based on current RTC time and date.  
+        * DS3231 must be configured and running before this fx is 
+        * called
+        *
+        * On Entry:
+        *
+        * On Exit:
+        *     @return return value = epoch time
+        *
+        * Example:
+        * @code
+        * 
+        * //instantiate rtc object
+        * Ds3231 rtc(D14, D15); 
+        * 
+        * time_t epoch_time; 
+        *
+        * epoch_time = rtc.get_epoch();
+        *
+        * @endcode
+        **************************************************************/
+        time_t get_epoch(void);
+        
 };
 #endif /* DS3231_H*/