A library for AQM0802A I2C connecting LCD module.

Revision:
0:414db8b8aaad
Child:
1:39cf7f91a7ba
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/KuAQM0802A.h	Sun Jul 20 14:28:45 2014 +0000
@@ -0,0 +1,56 @@
+#ifndef AQM0802A_H
+#define AQM0802A_H
+ 
+#include "mbed.h"
+
+/**
+ * A library for AQM0802A I2C connecting LCD.
+ */
+class KuAQM0802A {
+private:
+    I2C &i2c;
+
+public:
+ 
+    /**
+     * Constractor of AQM0802A driver. 
+     * @param i2c I2C object
+     */
+    explicit KuAQM0802A(I2C &i2c);
+ 
+    /**
+     * Destractor
+     */
+    ~KuAQM0802A();
+ 
+    /**
+     * Reset target device
+     */
+    void reset();
+
+    /**
+     * Locate cursor
+     * @param x Position X
+     * @param y Position Y
+     */
+    void locate(unsigned int x, unsigned int y);
+
+    /**
+     * Print a string
+     * @param str A character string to print
+     */
+    void print(const char *str);
+
+    /**
+     * Change LCD contrast
+     * @param contrast LCD contrast (0-63)
+     */
+    void set_contrast(unsigned int contrast);
+
+private:
+    void send_cmd(char cmd);
+
+    void send(bool CO, bool RS, char code);
+};
+ 
+#endif
\ No newline at end of file