projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oops - The DS1307 contains an unused "DayOfWeek" register that must be accounted...
[pub/USBasp.git]
/
Projects
/
TempDataLogger
/
Lib
/
DS1307.h
diff --git
a/Projects/TempDataLogger/Lib/DS1307.h
b/Projects/TempDataLogger/Lib/DS1307.h
index
212cdfe
..
6269bb2
100644
(file)
--- a/
Projects/TempDataLogger/Lib/DS1307.h
+++ b/
Projects/TempDataLogger/Lib/DS1307.h
@@
-62,10
+62,18
@@
uint8_t IntVal;
} Byte3;
uint8_t IntVal;
} Byte3;
- } DS1307_TimeRegs_t;
- typedef struct
- {
+ union
+ {
+ struct
+ {
+ unsigned int DayOfWeek : 3;
+ unsigned int Reserved : 5;
+ } Fields;
+
+ uint8_t IntVal;
+ } Byte4;
+
union
{
struct
union
{
struct
@@
-76,7
+84,7
@@
} Fields;
uint8_t IntVal;
} Fields;
uint8_t IntVal;
- } Byte
1
;
+ } Byte
5
;
union
{
union
{
@@
-88,7
+96,7
@@
} Fields;
uint8_t IntVal;
} Fields;
uint8_t IntVal;
- } Byte
2
;
+ } Byte
6
;
union
{
union
{
@@
-99,8
+107,8
@@
} Fields;
uint8_t IntVal;
} Fields;
uint8_t IntVal;
- } Byte
3
;
- } DS1307_DateRegs_t;
+ } Byte
7
;
+ } DS1307_Date
Time
Regs_t;
/* Macros: */
#define DS1307_ADDRESS_READ (0xD0 | TWI_ADDRESS_READ)
/* Macros: */
#define DS1307_ADDRESS_READ (0xD0 | TWI_ADDRESS_READ)