summaryrefslogtreecommitdiff
path: root/include/rtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rtc.h')
-rw-r--r--include/rtc.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/rtc.h b/include/rtc.h
index d11aa8b..54e361e 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -51,6 +51,38 @@ unsigned long mktime (unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int);
/**
+ * rtc_read8() - Read an 8-bit register
+ *
+ * @reg: Register to read
+ * @return value read
+ */
+int rtc_read8(int reg);
+
+/**
+ * rtc_write8() - Write an 8-bit register
+ *
+ * @reg: Register to write
+ * @value: Value to write
+ */
+void rtc_write8(int reg, uchar val);
+
+/**
+ * rtc_read32() - Read a 32-bit value from the RTC
+ *
+ * @reg: Offset to start reading from
+ * @return value read
+ */
+u32 rtc_read32(int reg);
+
+/**
+ * rtc_write32() - Write a 32-bit value to the RTC
+ *
+ * @reg: Register to start writing to
+ * @value: Value to write
+ */
+void rtc_write32(int reg, u32 value);
+
+/**
* rtc_init() - Set up the real time clock ready for use
*/
void rtc_init(void);