AD-128160-UART制御用のライブラリ http://www.aitendo.co.jp/product/3119 gingaxさんのプログラムを参考に作らせてもらっています。 http://mbed.org/users/akira/libraries/AD128160/m159hi

Dependents:   AD128160_HelloWorld

Revision:
3:d15cda2a5e91
Parent:
2:6f2db745808e
--- a/AD128160.h	Mon Dec 12 02:38:49 2011 +0000
+++ b/AD128160.h	Tue Dec 13 15:37:06 2011 +0000
@@ -3,8 +3,8 @@
 
 #include "mbed.h"
 
-#define LCD_ROWS 10
-#define LCD_COLS 16
+//#define LCD_ROWS 10
+//#define LCD_COLS 16
 #define LCD_WIDTH 128
 #define LCD_HEIGHT 160
 /** An interface for the AD128160 LCD display
@@ -15,7 +15,7 @@
 public:
     /** Create and AD128160 interface, using a tx and one DigitalOut interfaces
      *
-     * @param A serialport
+     * @param tx A serialport(tx)
      * @param reset A DigitalOut
      */
     AD128160(PinName tx,PinName reset);
@@ -70,16 +70,17 @@
 
     /** Set a color
     *
-    * @param color 2byte colour in format RGB:56
+    * @param rgb 2byte colour in format RGB:56
     */
     void color(int rgb);
 
-    /** Set a Text'd back ground olor
+    /** Setting a text back ground
     *
-    * @param color 2byte colour in format RGB:56
+    * @param mode   If mode is true,text'backgroud is on.
+    * @param rgb  2byte colour in format RGB:565
     */
-    void backgroudColor(int rgb);
-
+    void textBackground(bool mode,int rgb);
+    
     /** Configure of the LCD speed
     *
     * @param baud baudrate of the LCD
@@ -96,7 +97,14 @@
      *
      * @param s The string to write to the display
      */
-    void puts(char s[98]);
+    void puts(char* s);
+    
+    /** Setting a text size and color.If this function, column and row is 0,0.
+     * 
+     * @param size text size(0:6x10 1:7x13 2:8x16 3:10x20 4:16x32)
+     * @param rgb  2byte colour in format RGB:565
+     */
+    void textSetting(int size,int rgb);
     
 #if DOXYGEN_ONLY
     /** Write a character to the LCD
@@ -124,13 +132,13 @@
     */
     int height();
     
-    /** get of the LCD width
+    /** get of the LCD colums
     *
     * @return LCD colums
     */
     int columns();
     
-    /** get of the LCD width
+    /** get of the LCD rows
     *
     * @return LCD rows
     */
@@ -139,17 +147,19 @@
     void bmp(int x0,int y0,int bmp_n);
     
 protected:
-    void init();
-    void newline(void);
+void init();
+    void newline();
+    void cwrite(int command,unsigned char* data,int length);
     virtual int _putc(int c);
     virtual int _getc() {
         return 0;
     }
 
-    Serial _device;  // tx, rx  LCD
+    Serial _device;  // tx
     DigitalOut _rst;     // LCD  RST  (Reset)
-
-    int _row, _column;
+    int _row, _column;//now row and col
+    int _font_x,_font_y;//font size
+    int _max_columns,_max_rows;//max row and col
 
 };