Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more

Fork of SPI_TFT by Peter Drescher

See Components - RA8875 Based Display

Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.

Offline Help Manual (Windows chm)

/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)

Revision:
125:7a0b70f56550
Parent:
122:79e431f98fa9
Child:
126:c91bd2e500b9
--- a/GraphicsDisplay.h	Sun Jul 31 20:59:01 2016 +0000
+++ b/GraphicsDisplay.h	Mon Aug 01 22:31:42 2016 +0000
@@ -62,7 +62,7 @@
     ///
     /// @param[in] x is the horizontal offset to this pixel.
     /// @param[in] y is the vertical offset to this pixel.
-    /// @returns the pixel. see @color_t
+    /// @returns the pixel. @see color_t
     ///
     virtual color_t getPixel(loc_t x, loc_t y) = 0;
 
@@ -132,8 +132,23 @@
     virtual RetCode_t fillrect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, 
         color_t color, fill_t fillit = FILL) = 0;
 
-
+    /// a function to write the command and data to the RA8875 chip.
+    ///
+    /// @param command is the RA8875 instruction to perform
+    /// @param data is the optional data to the instruction.
+    /// @returns success/failure code. @see RetCode_t.
+    ///
     virtual RetCode_t WriteCommand(unsigned char command, unsigned int data = 0xFFFF) = 0;
+    
+    
+    /// a function to write the data to the RA8875 chip.
+    ///
+    /// This is typically used after a command has been initiated, and where
+    /// there may be a data stream to follow.
+    ///
+    /// @param data is the optional data to the instruction.
+    /// @returns success/failure code. @see RetCode_t.
+    ///
     virtual RetCode_t WriteData(unsigned char data) = 0;
 
     /// Set the window, which controls where items are written to the screen.
@@ -195,17 +210,30 @@
 
     /// method to fill a region.
     ///
-    /// This method fills a region with the specified color.
+    /// This method fills a region with the specified color. It essentially
+    /// is an alias for fillrect, however this uses width and height rather
+    /// than a second x,y pair.
     ///
     /// @param[in] x is the left-edge of the region.
     /// @param[in] y is the top-edge of the region.
     /// @param[in] w specifies the width of the region.
     /// @param[in] h specifies the height of the region.
+    /// @param[in] color is the color value to use to fill the region
     /// @returns success/failure code. @see RetCode_t.
     /// 
     virtual RetCode_t fill(loc_t x, loc_t y, dim_t w, dim_t h, color_t color);
     
-    
+    /// method to stream bitmap data to the display
+    ///
+    /// This method fills a region from a stream of color data.
+    ///
+    /// @param[in] x is the left-edge of the region.
+    /// @param[in] y is the top-edge of the region.
+    /// @param[in] w specifies the width of the region.
+    /// @param[in] h specifies the height of the region.
+    /// @param[in] color is a pointer to a color stream with w x h values.
+    /// @returns success/failure code. @see RetCode_t.
+    /// 
     virtual RetCode_t blit(loc_t x, loc_t y, dim_t w, dim_t h, const int * color);    
     
     /// This method returns the width in pixels of the chosen character
@@ -423,8 +451,6 @@
     ///
     /// @param[in] x is the horizontal pixel coordinate
     /// @param[in] y is the vertical pixel coordinate
-    /// @param[in] w is the image width restriction, or zero to permit full image width.
-    /// @param[in] h is the image height restriction, or zero to permit full image height.
     /// @param[in] fileOffset is the offset into the file where the image data starts
     /// @param[in] Image is the filename stream already opened for the data.
     /// @returns success or error code.
@@ -507,8 +533,8 @@
     const unsigned char * font;     ///< reference to an external font somewhere in memory
     
     // pixel location
-    short _x;
-    short _y;
+    short _x;                       ///< keeps track of current X location
+    short _y;                       ///< keeps track of current Y location
     
     rect_t windowrect;              ///< window commands are held here for speed of access 
 };