Fork of Ds3231 library that replaces inheritance of I2C class with a private member var of type I2C *
Dependents: ard2pmod DS3231_Alarm_Demo MAXREFDES130_131_Demo MAXREFDES130_Demo
Fork of ds3231 by
Diff: ds3231.h
- Revision:
- 5:61dfe2690360
- Parent:
- 4:0beb5e9ac927
- Child:
- 8:c7484a65fcea
diff -r 0beb5e9ac927 -r 61dfe2690360 ds3231.h --- 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*/