Library to control a QVGA TFT connected to SPI. You can use printf to print text The lib can handle different fonts, draw lines, circles, rect and bmp

Files at this revision

API Documentation at this revision

Comitter:
dreschpe
Date:
Mon Dec 12 23:07:26 2011 +0000
Parent:
7:4781bb8eed45
Child:
9:9dc5dfdda734
Commit message:
fix pixel funcion

Changed in this revision

SPI_TFT.cpp Show annotated file Show diff for this revision Revisions of this file
SPI_TFT.h Show annotated file Show diff for this revision Revisions of this file
--- a/SPI_TFT.cpp	Sun Sep 04 21:24:35 2011 +0000
+++ b/SPI_TFT.cpp	Mon Dec 12 23:07:26 2011 +0000
@@ -240,6 +240,10 @@
     wr_reg(0x02, (x >> 8));
     wr_reg(0x07, (y >> 0));
     wr_reg(0x06, (y >> 8));
+    wr_reg(0x05, (x+1 >> 0));
+    wr_reg(0x04, (x+1 >> 8));
+    wr_reg(0x09, (y+1 >> 0));
+    wr_reg(0x08, (y+1 >> 8));
     wr_cmd(0x22);
     wr_dat(color);
 }
--- a/SPI_TFT.h	Sun Sep 04 21:24:35 2011 +0000
+++ b/SPI_TFT.h	Mon Dec 12 23:07:26 2011 +0000
@@ -283,9 +283,18 @@
   DigitalOut _cs;
   DigitalOut _reset;
   unsigned char* font;
+  
+  
+  
    
 protected:
 
+  /** Set draw window region to whole screen
+   *
+   */  
+  void WindowMax (void);
+
+
   /** draw a horizontal line
    *
    * @param x0 horizontal start
@@ -314,10 +323,7 @@
    */    
   void window (unsigned int x, unsigned int y, unsigned int w, unsigned int h);
     
-  /** Set draw window region to whole screen
-   *
-   */  
-  void WindowMax (void);
+ 
     
   /** Init the HX8347D controller 
    *