aboutsummaryrefslogtreecommitdiff
path: root/lib/lufa/Projects/TempDataLogger/Lib/RTC.h
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-08-02 14:02:40 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitcf4575b94a3c65e6535a159fc71fc885aebc2620 (patch)
tree2354f2b7a200e02246a564afefedc32357e62b8e /lib/lufa/Projects/TempDataLogger/Lib/RTC.h
parent75ee8df19e0f14ba466f41ab673dde2fe2fdae9c (diff)
downloadqmk_firmware-cf4575b94a3c65e6535a159fc71fc885aebc2620.tar.gz
qmk_firmware-cf4575b94a3c65e6535a159fc71fc885aebc2620.zip
Fix the LUFA lib to use a submodule instead of just files (#6245)
* Remove LUFA files * Update descriptions for newer version of LUFA * Create PR6245.md * Fix CDC(Serial) type errors * Fix missed merge conflict for AUDIO_DTYPE_CSInterface
Diffstat (limited to 'lib/lufa/Projects/TempDataLogger/Lib/RTC.h')
-rw-r--r--lib/lufa/Projects/TempDataLogger/Lib/RTC.h126
1 files changed, 0 insertions, 126 deletions
diff --git a/lib/lufa/Projects/TempDataLogger/Lib/RTC.h b/lib/lufa/Projects/TempDataLogger/Lib/RTC.h
deleted file mode 100644
index f35b8ff1e..000000000
--- a/lib/lufa/Projects/TempDataLogger/Lib/RTC.h
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 Copyright (C) Dean Camera, 2017.
3
4 dean [at] fourwalledcubicle [dot] com
5 www.lufa-lib.org
6*/
7
8#ifndef _RTC_H_
9#define _RTC_H_
10
11 /* Includes: */
12 #include <avr/io.h>
13
14 #include <LUFA/Drivers/Peripheral/TWI.h>
15
16 #include "Config/AppConfig.h"
17
18 /* Type Defines: */
19 typedef struct
20 {
21 uint8_t Hour;
22 uint8_t Minute;
23 uint8_t Second;
24 uint8_t Day;
25 uint8_t Month;
26 uint8_t Year;
27 } TimeDate_t;
28
29 typedef struct
30 {
31 union
32 {
33 struct
34 {
35 unsigned Sec : 4;
36 unsigned TenSec : 3;
37 unsigned CH : 1;
38 } Fields;
39
40 uint8_t IntVal;
41 } Byte1;
42
43 union
44 {
45 struct
46 {
47 unsigned Min : 4;
48 unsigned TenMin : 3;
49 unsigned Reserved : 1;
50 } Fields;
51
52 uint8_t IntVal;
53 } Byte2;
54
55 union
56 {
57 struct
58 {
59 unsigned Hour : 4;
60 unsigned TenHour : 2;
61 unsigned TwelveHourMode : 1;
62 unsigned Reserved : 1;
63 } Fields;
64
65 uint8_t IntVal;
66 } Byte3;
67
68 union
69 {
70 struct
71 {
72 unsigned DayOfWeek : 3;
73 unsigned Reserved : 5;
74 } Fields;
75
76 uint8_t IntVal;
77 } Byte4;
78
79 union
80 {
81 struct
82 {
83 unsigned Day : 4;
84 unsigned TenDay : 2;
85 unsigned Reserved : 2;
86 } Fields;
87
88 uint8_t IntVal;
89 } Byte5;
90
91 union
92 {
93 struct
94 {
95 unsigned Month : 4;
96 unsigned TenMonth : 1;
97 unsigned Reserved : 3;
98 } Fields;
99
100 uint8_t IntVal;
101 } Byte6;
102
103 union
104 {
105 struct
106 {
107 unsigned Year : 4;
108 unsigned TenYear : 4;
109 } Fields;
110
111 uint8_t IntVal;
112 } Byte7;
113 } DS1307_DateTimeRegs_t;
114
115 /* Macros: */
116 /** TWI address of the DS1307 device on the bus. */
117 #define DS1307_ADDRESS 0xD0
118
119 /* Function Prototypes: */
120 void RTC_Init(void);
121 void RTC_Tick500ms(void);
122 bool RTC_SetTimeDate(const TimeDate_t* NewTimeDate);
123 bool RTC_GetTimeDate(TimeDate_t* const TimeDate);
124
125#endif
126