| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,31 @@ |
| 1 |
+/* |
|
| 2 |
+ * Author: Pawel Jablonski |
|
| 3 |
+ * E-mail: pj@xirx.net |
|
| 4 |
+ * WWW: xirx.net |
|
| 5 |
+ * GIT: git.xirx.net |
|
| 6 |
+ * |
|
| 7 |
+ * License: You can use this code however you like |
|
| 8 |
+ * but leave information about the original author. |
|
| 9 |
+ * Code is free for non-commercial and commercial use. |
|
| 10 |
+ */ |
|
| 11 |
+ |
|
| 12 |
+#ifndef _RTC_H |
|
| 13 |
+#define _RTC_H |
|
| 14 |
+ |
|
| 15 |
+//! Fields used by RTC to describe date and time |
|
| 16 |
+struct RTCDateTime |
|
| 17 |
+{
|
|
| 18 |
+ unsigned char year; //!< year |
|
| 19 |
+ unsigned char month; //!< month |
|
| 20 |
+ unsigned char day; //!< day |
|
| 21 |
+ unsigned char hour; //!< hour |
|
| 22 |
+ unsigned char minute; //!< minute |
|
| 23 |
+ unsigned char second; //!< second |
|
| 24 |
+}; |
|
| 25 |
+ |
|
| 26 |
+void rtcInit(void); |
|
| 27 |
+ |
|
| 28 |
+void rtcSetDateTime(struct RTCDateTime dateTime); |
|
| 29 |
+struct RTCDateTime rtcGetDateTime(void); |
|
| 30 |
+ |
|
| 31 |
+#endif |