Simple RTC class based on DS1307. Emphasis on simple. Allows you to run at 100k or 400k Hz (for newer DS1307 capable devices). MapTime() allows you to set the time() service to the same as the RTC. Uses struct tm throughout so you can use traditional time functions for manipulation.
Diff: RTclock.h
- Revision:
- 6:984fd3ba519a
- Parent:
- 5:d71d6e5a7eee
- Child:
- 7:3621025e7949
--- a/RTclock.h Sat Aug 09 17:02:40 2014 +0000 +++ b/RTclock.h Sat Aug 09 17:05:44 2014 +0000 @@ -27,7 +27,7 @@ ); virtual ~RTclock(); - bool IsTwelveHour(); // true if set to a 12hr clock + bool IsTwelveHour(); // true if set to a 12hr clock (adjust tm.tm_hour as appropraite) virtual bool MapTime(); // Maps RTC chip to C time.h time system virtual bool GetTime(tm & out_sTM); // Get a TM structure directly static const char * GetWeekday(int in_nWeekDay);