projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter...
[pub/USBasp.git]
/
Projects
/
TempDataLogger
/
Lib
/
DS1307.h
diff --git
a/Projects/TempDataLogger/Lib/DS1307.h
b/Projects/TempDataLogger/Lib/DS1307.h
index
c9fe43c
..
6cc65ad
100644
(file)
--- a/
Projects/TempDataLogger/Lib/DS1307.h
+++ b/
Projects/TempDataLogger/Lib/DS1307.h
@@
-1,8
+1,8
@@
/*
/*
- Copyright (C) Dean Camera, 201
0
.
-
+ Copyright (C) Dean Camera, 201
1
.
+
dean [at] fourwalledcubicle [dot] com
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
#ifndef _DS1307_H_
*/
#ifndef _DS1307_H_
@@
-24,10
+24,10
@@
unsigned int TenSec : 3;
unsigned int CH : 1;
} Fields;
unsigned int TenSec : 3;
unsigned int CH : 1;
} Fields;
-
+
uint8_t IntVal;
} Byte1;
uint8_t IntVal;
} Byte1;
-
+
union
{
struct
union
{
struct
@@
-36,10
+36,10
@@
unsigned int TenMin : 3;
unsigned int Reserved : 1;
} Fields;
unsigned int TenMin : 3;
unsigned int Reserved : 1;
} Fields;
-
+
uint8_t IntVal;
} Byte2;
uint8_t IntVal;
} Byte2;
-
+
union
{
struct
union
{
struct
@@
-49,7
+49,7
@@
unsigned int TwelveHourMode : 1;
unsigned int Reserved : 1;
} Fields;
unsigned int TwelveHourMode : 1;
unsigned int Reserved : 1;
} Fields;
-
+
uint8_t IntVal;
} Byte3;
} DS1307_TimeRegs_t;
uint8_t IntVal;
} Byte3;
} DS1307_TimeRegs_t;
@@
-64,7
+64,7
@@
unsigned int TenDay : 2;
unsigned int Reserved : 2;
} Fields;
unsigned int TenDay : 2;
unsigned int Reserved : 2;
} Fields;
-
+
uint8_t IntVal;
} Byte1;
uint8_t IntVal;
} Byte1;
@@
-76,10
+76,10
@@
unsigned int TenMonth : 1;
unsigned int Reserved : 3;
} Fields;
unsigned int TenMonth : 1;
unsigned int Reserved : 3;
} Fields;
-
+
uint8_t IntVal;
} Byte2;
uint8_t IntVal;
} Byte2;
-
+
union
{
struct
union
{
struct
@@
-87,7
+87,7
@@
unsigned int Year : 4;
unsigned int TenYear : 4;
} Fields;
unsigned int Year : 4;
unsigned int TenYear : 4;
} Fields;
-
+
uint8_t IntVal;
} Byte3;
} DS1307_DateRegs_t;
uint8_t IntVal;
} Byte3;
} DS1307_DateRegs_t;
@@
-95,9
+95,9
@@
/* Macros: */
#define DS1307_TIMEREG_START 0x00
#define DS1307_DATEREG_START 0x04
/* Macros: */
#define DS1307_TIMEREG_START 0x00
#define DS1307_DATEREG_START 0x04
-
- #define DS1307_ADDRESS_READ
0b11010001
- #define DS1307_ADDRESS_WRITE
0b11010000
+
+ #define DS1307_ADDRESS_READ
(0xD0 | TWI_ADDRESS_READ)
+ #define DS1307_ADDRESS_WRITE
(0xD0 | TWI_ADDRESS_WRITE)
/* Function Prototypes: */
void DS1307_SetDate(const uint8_t Day,
/* Function Prototypes: */
void DS1307_SetDate(const uint8_t Day,
@@
-114,3
+114,4
@@
uint8_t* const Second);
#endif
uint8_t* const Second);
#endif
+