Landtiger (LPC1768) graphics LCD demo.

Dependencies:   mbed

Revision:
4:cdeea87f25d8
Parent:
3:2dccfa0121de
--- a/GLCD.h	Fri Oct 30 01:26:40 2015 +0000
+++ b/GLCD.h	Tue Nov 24 22:33:20 2015 +0000
@@ -67,8 +67,8 @@
       
     // Stream implementation - provides printf() interface
     // You would otherwise be forced to use writeChar()
-    virtual int _putc(int value) { writeChar(value); return 1;};
-    virtual int _getc() { return -1; };    
+    virtual int _putc(int value);
+    virtual int _getc();  
        
     void setWindowMax   (void);
     void setWindow      (int x1, int y1, int x2, int y2);    
@@ -81,18 +81,46 @@
     void setBackColor   (uint16_t color);
     void setBackColor   (uint8_t r, uint8_t g, uint8_t b);     
 
-    void clearScreen    (uint16_t color);
-
+    void cls            (uint16_t color);    
+    void locate         (int16_t ln, uint16_t col) {
+      _ln  = ln;
+      _col = col;  
+    };
 
 /** @brief Write single character to the display using the 8x8 fontable
  *  @brief Start at current cursor location
  *  @param char chr character to write
 */     
     void writeChar      (uint8_t chr);
+    
+/*******************************************************************************
+* Draw character on given screen position                                      *
+*   Parameter:      x:        horizontal position                              *
+*                   y:        vertical position                                *
+*                   c:        pointer to character bitmap                      *
+*   Return:                                                                    *
+*******************************************************************************/   
     void DrawChar       (unsigned int x, unsigned int y, uint16_t *c);
+
+/*******************************************************************************
+* Display character on given line                                              *
+*   Parameter:      ln:       line number                                      *
+*                   col:      column number                                    *
+*                   c:        ascii character                                  *
+*   Return:                                                                    *
+*******************************************************************************/   
     void DisplayChar    (uint16_t ln, uint16_t col, uint8_t  c);
+
+/*******************************************************************************
+* Disply string on given line                                                  *
+*   Parameter:      ln:       line number                                      *
+*                   col:      column number                                    *
+*                   s:        pointer to string                                *
+*   Return:                                                                    *
+*******************************************************************************/
     void DisplayString  (uint16_t ln, uint16_t col, uint8_t *s);
     void ClearLn        (uint16_t ln);
+    
     void Bargraph       (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int val);
     void Bitmap         (unsigned int x, unsigned int y, unsigned int w, unsigned int h, uint8_t *bitmap);
     void Bmp            (unsigned int x, unsigned int y, unsigned int w, unsigned int h, uint8_t *bmp);
@@ -114,6 +142,9 @@
     
     int getDisplayXSize();
     int getDisplayYSize();
+    int getRows();
+    int getCols();
+    
     uint16_t getDriverCode ();
 
   private: