Revision:
0:ed1f619f1794
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RTC8564.h	Wed Jun 20 04:09:39 2012 +0000
@@ -0,0 +1,32 @@
+#define RTC8564NB_ADR 0xA2
+
+#define CONTROL1 0x00
+#define CONTROL2 0x01
+#define SECONDS 0x02
+#define MINUTES 0x03
+#define HOURS 0x04
+#define DAYS 0x05
+#define WEEKDAYS 0x06
+#define MONTHS 0x07
+#define YEARS 0x08
+#define MINUTE_ALARM 0x09
+#define HOUR_ALARM 0x0A
+#define DAY_ALARM 0x0B
+#define WEEKDAY_ALARM 0x0C
+#define CLOCKOUT_FREQ 0x0D
+#define TIMER_CONTROL 0x0E
+#define TIMER 0x0F
+#define _READ 0x01
+#include "mbed.h"
+
+class RTC8564{
+public:
+    RTC8564(PinName sda = p9, PinName scl = p10) : i2c(sda, scl) {
+    }
+    void write(char address, char value);
+    char read(char address);
+    void time_just();
+    void setdaytime(char y[3], char m[3], char d[3], char h[3], char min[3], char s[3], char week_val[2]);
+private:
+    I2C i2c;
+};
\ No newline at end of file