Forked from Peter Drescher lib, using always 16bit spi, init values for chinese red pcb, added read cmds and some mess here and there

Fork of SPI_TFT_ILI9341 by Peter Drescher

Revision:
11:365aa15eaa0f
Parent:
8:a9d849c3dad0
--- a/SPI_TFT_ILI9341.h	Sun Aug 31 19:25:33 2014 +0000
+++ b/SPI_TFT_ILI9341.h	Thu Sep 04 22:17:14 2014 +0000
@@ -114,7 +114,15 @@
    * @param color 16 bit pixel color
    */    
   virtual void pixel(int x, int y,int colour);
-    
+
+  /** Return color at pixel x,y 
+   *  
+   * @param x horizontal position
+   * @param y vertical position
+   * @returns 16 bit color
+   */  
+  unsigned short pixelread(int x, int y);
+  
   /** draw a circle
    *
    * @param x0,y0 center
@@ -389,19 +397,19 @@
    */    
   //void wr_dat_only(unsigned short dat);
     
-  /** Read byte from the LCD controller
+  /** Read 8,16,24,32 bits from the LCD controller
    *
    * @param cmd comand to controller
    * @returns data from LCD controller
    *  
    */    
-   char wr_cmd_rd8(unsigned char cmd);
-    
-  int wr_cmd_rd24(unsigned char cmd);
-  int wr_cmd_rd32(unsigned char cmd);  
+  unsigned char wr_cmd_rd8(unsigned char cmd);
+  unsigned int wr_cmd_rd24(unsigned char cmd);
+  unsigned int wr_cmd_rd32(unsigned char cmd);
+  unsigned int wr_cmd_rd32_dbyte(unsigned char cmd);  
   
   // vendor custom cmd to access registers?!?!?
-  char Read_Register(char Addr, char xParameter);
+  unsigned char Read_Register(char Addr, char xParameter);
     
     
   /** Write a value to the to a LCD register