2
DS1307.h - library for DS1307 rtc
5
// ensure this library description is only included once
9
// include types & constants of core API
12
// include types & constants of Wire ic2 lib
23
#define DS1307_BASE_YR 2000
25
#define DS1307_CTRL_ID B1101000 //DS1307
27
// Define register bit masks
28
#define DS1307_CLOCKHALT B10000000
30
#define DS1307_LO_BCD B00001111
31
#define DS1307_HI_BCD B11110000
33
#define DS1307_HI_SEC B01110000
34
#define DS1307_HI_MIN B01110000
35
#define DS1307_HI_HR B00110000
36
#define DS1307_LO_DOW B00000111
37
#define DS1307_HI_DAY B00110000
38
#define DS1307_HI_MTH B00110000
39
#define DS1307_HI_YR B11110000
41
// library interface description
46
void get(int *, boolean);
47
int get(int, boolean);
53
// used prior to read/set ds1307 registers;