2 Copyright (C) Dean Camera, 2010.
4 dean [at] fourwalledcubicle [dot] com
5 www.fourwalledcubicle.com
14 #include <LUFA/Drivers/Peripheral/TWI.h>
24 unsigned int TenSec
: 3;
36 unsigned int TenMin
: 3;
37 unsigned int _RESERVED
: 1;
47 unsigned int Hour
: 4;
48 unsigned int TenHour
: 2;
49 unsigned int TwelveHourMode
: 1;
50 unsigned int _RESERVED
: 1;
64 unsigned int TenDay
: 2;
65 unsigned int _RESERVED
: 2;
75 unsigned int Month
: 4;
76 unsigned int TenMonth
: 1;
77 unsigned int _RESERVED
: 3;
87 unsigned int Year
: 4;
88 unsigned int TenYear
: 4;
96 #define DS1307_TIMEREG_START 0x00
97 #define DS1307_DATEREG_START 0x04
99 #define DS1307_ADDRESS_READ 0b11010001
100 #define DS1307_ADDRESS_WRITE 0b11010000
102 /* Function Prototypes: */
103 void DS1307_SetDate(const uint8_t Day
,
106 void DS1307_SetTime(const uint8_t Hour
,
107 const uint8_t Minute
,
108 const uint8_t Second
);
109 void DS1307_GetDate(uint8_t* const Day
,
110 uint8_t* const Month
,
111 uint8_t* const Year
);
112 void DS1307_GetTime(uint8_t* const Hour
,
113 uint8_t* const Minute
,
114 uint8_t* const Second
);