How to use EEPROM in TG-LPC11U35-501

Dependencies:   AQM0802 EEPROM mbed

Revision:
0:8dfee9f6df54
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AQM0802.h	Sun Jun 22 09:57:23 2014 +0000
@@ -0,0 +1,42 @@
+//**********************
+// AQM0802.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef AQM0802_H_
+#define AQM0802_H_
+
+#define AQM0802_ADDR    0x7c
+#define CMD 0x00
+#define DAT 0x40
+
+#include "mbed.h"
+
+//class AQM0802: public Stream{
+class AQM0802{
+public:
+    AQM0802 (PinName sda, PinName scl);
+    AQM0802 (I2C& p_i2c);
+    void init();
+
+    void put(unsigned char a, unsigned char b);
+    void get(unsigned char a);
+    void cls();
+    void locate (int x, int y);
+    void print (const char* a);
+
+protected:
+    
+    I2C _i2c;
+//    virtual int _putc(int value);
+//    virtual int _getc();
+
+    char buf[2];
+
+};
+
+
+#endif /* AQM0802_H_ */
+