DS3231 & PCF8563 working WatchyRTC.

pull/131/head
GuruSR 2021-12-27 00:26:38 -05:00 committed by GitHub
parent 1bfbc55f4a
commit 0c275c5e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -8,8 +8,11 @@
#define PCF8563 1
#define RTC_DS_ADDR 0x68
#define RTC_PCF_ADDR 0x51
#define YEAR_OFFSET_DS 1970
#define YEAR_OFFSET_PCF 2000
#define RTC_YEAR_OFFSET 1900 // Use for calculation to display year properly.
#define RTC_CENTURY_OFFSET 100 // Short Year offset.
#define RTC_1900TO1970 2208988800UL // Subtract from NTP to get Epoch.
#define RTC_1970TO2000 946684800UL // Subtract from Epoch to get Y2k.
#define RTC_1900TO2000 (RTC_1900TO1970 + RTC_1970TO2000) // Subtract from NTP to get Y2k.
class WatchyRTC {
public:
@ -31,4 +34,4 @@ class WatchyRTC {
String _getValue(String data, char separator, int index);
};
#endif
#endif