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:
76:c981284eb513
Parent:
73:f22a18707b5e
Child:
79:544eb4964795
--- a/GraphicsDisplay.h	Fri Nov 28 22:37:53 2014 +0000
+++ b/GraphicsDisplay.h	Fri Nov 28 22:53:35 2014 +0000
@@ -41,9 +41,9 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param x is the horizontal offset to this pixel.
-    /// @param y is the vertical offset to this pixel.
-    /// @param color defines the color for the pixel.
+    /// @param[in] x is the horizontal offset to this pixel.
+    /// @param[in] y is the vertical offset to this pixel.
+    /// @param[in] color defines the color for the pixel.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t pixel(loc_t x, loc_t y, color_t color) = 0;
@@ -52,10 +52,10 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param p is a pointer to a color_t array to write.
-    /// @param count is the number of pixels to write.
-    /// @param x is the horizontal position on the display.
-    /// @param y is the vertical position on the display.
+    /// @param[in] p is a pointer to a color_t array to write.
+    /// @param[in] count is the number of pixels to write.
+    /// @param[in] x is the horizontal position on the display.
+    /// @param[in] y is the vertical position on the display.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t pixelStream(color_t * p, uint32_t count, loc_t x, loc_t y) = 0;
@@ -64,8 +64,8 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param x is the horizontal offset to this pixel.
-    /// @param y is the vertical offset to this pixel.
+    /// @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
     ///
     virtual color_t getPixel(loc_t x, loc_t y) = 0;
@@ -74,10 +74,10 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param p is a pointer to a color_t array to accept the stream.
-    /// @param count is the number of pixels to read.
-    /// @param x is the horizontal offset to this pixel.
-    /// @param y is the vertical offset to this pixel.
+    /// @param[out] p is a pointer to a color_t array to accept the stream.
+    /// @param[in] count is the number of pixels to read.
+    /// @param[in] x is the horizontal offset to this pixel.
+    /// @param[in] y is the vertical offset to this pixel.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t getPixelStream(color_t * p, uint32_t count, loc_t x, loc_t y) = 0;
@@ -103,8 +103,8 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param x is the horizontal position in pixels (from the left edge)
-    /// @param y is the vertical position in pixels (from the top edge)
+    /// @param[in] x is the horizontal position in pixels (from the left edge)
+    /// @param[in] y is the vertical position in pixels (from the top edge)
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t SetGraphicsCursor(loc_t x, loc_t y) = 0;
@@ -112,8 +112,8 @@
     /// Prepare the controller to read binary data from the screen by positioning
     /// the memory read cursor.
     ///
-    /// @param x is the horizontal position in pixels (from the left edge)
-    /// @param y is the vertical position in pixels (from the top edge)
+    /// @param[in] x is the horizontal position in pixels (from the left edge)
+    /// @param[in] y is the vertical position in pixels (from the top edge)
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t SetGraphicsCursorRead(loc_t x, loc_t y) = 0;
@@ -125,12 +125,12 @@
     ///
     /// @note this method must be supported in the derived class.
     ///
-    /// @param x1 is the horizontal start of the line.
-    /// @param y1 is the vertical start of the line.
-    /// @param x2 is the horizontal end of the line.
-    /// @param y2 is the vertical end of the line.
-    /// @param color defines the foreground color.
-    /// @param fillit is optional to NOFILL the rectangle. default is FILL.
+    /// @param[in] x1 is the horizontal start of the line.
+    /// @param[in] y1 is the vertical start of the line.
+    /// @param[in] x2 is the horizontal end of the line.
+    /// @param[in] y2 is the vertical end of the line.
+    /// @param[in] color defines the foreground color.
+    /// @param[in] fillit is optional to NOFILL the rectangle. default is FILL.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t fillrect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, 
@@ -146,10 +146,10 @@
     /// and down a row. If the initial write is outside the window, it will
     /// be captured into the window when it crosses a boundary.
     ///
-    /// @param x is the left edge in pixels.
-    /// @param y is the top edge in pixels.
-    /// @param w is the window width in pixels.
-    /// @param h is the window height in pixels.
+    /// @param[in] x is the left edge in pixels.
+    /// @param[in] y is the top edge in pixels.
+    /// @param[in] w is the window width in pixels.
+    /// @param[in] h is the window height in pixels.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t window(loc_t x, loc_t y, dim_t w, dim_t h);
@@ -158,13 +158,17 @@
     ///
     /// The behavior is to clear the whole screen.
     ///
-    /// @param layers is ignored, but supports maintaining the same 
+    /// @param[in] layers is ignored, but supports maintaining the same 
     ///     API for the graphics layer.
     /// @returns success/failure code. @see RetCode_t.
     ///
     virtual RetCode_t cls(uint16_t layers = 0);
     
-
+    /// method to set the window region to the full screen.
+    ///
+    /// This restores the 'window' to the full screen, so that 
+    /// other operations (@see cls) would clear the whole screen.
+    ///
     virtual void WindowMax(void);
     
     /// method to put a single color pixel to the screen.
@@ -173,12 +177,12 @@
     /// @see _StartGraphicsStream() is called, and it should be followed 
     /// by _EndGraphicsStream.
     ///
-    /// @param pixel is a color value to be put on the screen.
+    /// @param[in] pixel is a color value to be put on the screen.
     /// @returns error code.
     ///
     virtual RetCode_t _putp(color_t pixel);
 
-            
+    
     virtual void fill(int x, int y, int w, int h, color_t color);
     virtual void blit(int x, int y, int w, int h, const int * color);    
     
@@ -189,10 +193,10 @@
     ///         the mikroe font creator. \\
     ///         See http://www.mikroe.com/glcd-font-creator/
     ///
-    /// @param x is the horizontal pixel coordinate
-    /// @param y is the vertical pixel coordinate
-    /// @param fontTable is the base of the table which has the metrics
-    /// @param fontChar is the start of that record in the table for the char (e.g. 'A' - 'Z')
+    /// @param[in] x is the horizontal pixel coordinate
+    /// @param[in] y is the vertical pixel coordinate
+    /// @param[in] fontTable is the base of the table which has the metrics
+    /// @param[in] fontChar is the start of that record in the table for the char (e.g. 'A' - 'Z')
     /// @returns how far the cursor should advance to the right in pixels
     ///
     virtual int fontblit(int x, int y, const unsigned char * fontTable, const unsigned char * fontChar);
@@ -207,15 +211,15 @@
     /// @note This method probably has very little value outside of
     ///         the internal methods for reading BMP files.
     ///
-    /// @param colorPaletteArray is the handle to the color palette array to use.
-    /// @param index is the index into the color palette.
+    /// @param[in] colorPaletteArray is the handle to the color palette array to use.
+    /// @param[in] index is the index into the color palette.
     /// @returns the color in color_t format.
     ///
     color_t RGBQuadToRGB16(RGBQUAD * colorPaletteArray, uint16_t index);
     
     /// This method converts a 16-bit color value into a 24-bit RGB Quad.
     ///
-    /// @param c is the 16-bit color. @see color_t
+    /// @param[in] c is the 16-bit color. @see color_t.
     /// @returns an RGBQUAD value. @see RGBQUAD
     ///
     RGBQUAD RGB16ToRGBQuad(color_t c);
@@ -234,9 +238,9 @@
     /// @note The file extension is tested, and if it ends in a supported
     ///     format, the appropriate handler is called to render that image.
     ///
-    /// @param x is the horizontal pixel coordinate
-    /// @param y is the vertical pixel coordinate
-    /// @param FileName refers to the fully qualified path and file on 
+    /// @param[in] x is the horizontal pixel coordinate
+    /// @param[in] y is the vertical pixel coordinate
+    /// @param[in] FileName refers to the fully qualified path and file on 
     ///     a mounted file system.
     /// @returns success or error code.
     ///
@@ -274,9 +278,9 @@
     /// \li 9 seconds, LocalFileSystem, Hardware Rending for RA8875
     /// \li 3 seconds, MSCFileSystem, Hardware Rendering for RA8875
     /// 
-    /// @param x is the horizontal pixel coordinate
-    /// @param y is the vertical pixel coordinate
-    /// @param Name_BMP is the filename on the mounted file system.
+    /// @param[in] x is the horizontal pixel coordinate
+    /// @param[in] y is the vertical pixel coordinate
+    /// @param[in] Name_BMP is the filename on the mounted file system.
     /// @returns success or error code.
     ///
     RetCode_t RenderBitmapFile(loc_t x, loc_t y, const char *Name_BMP);
@@ -291,9 +295,9 @@
     /// @note An Icon file can have more than one icon in it. This
     ///     implementation only processes the first image in the file.
     ///
-    /// @param x is the horizontal pixel coordinate
-    /// @param y is the vertical pixel coordinate
-    /// @param Name_ICO is the filename on the mounted file system.
+    /// @param[in] x is the horizontal pixel coordinate
+    /// @param[in] y is the vertical pixel coordinate
+    /// @param[in] Name_ICO is the filename on the mounted file system.
     /// @returns success or error code.
     ///
     RetCode_t RenderIconFile(loc_t x, loc_t y, const char *Name_ICO);
@@ -303,9 +307,9 @@
     ///
     /// This will print the character at the specified pixel coordinates.
     ///
-    /// @param x is the horizontal offset in pixels.
-    /// @param y is the vertical offset in pixels.
-    /// @param value is the character to print.
+    /// @param[in] x is the horizontal offset in pixels.
+    /// @param[in] y is the vertical offset in pixels.
+    /// @param[in] value is the character to print.
     /// @returns number of pixels to index to the right if a character was printed, 0 otherwise.
     ///
     virtual int character(int x, int y, int value);
@@ -341,7 +345,7 @@
     ///   \li the number of bytes per vertical line (width of the array)
     ///   \li the subsequent records are the font information.
     ///
-    /// @param font is a pointer to a specially formed font array. 
+    /// @param[in] font is a pointer to a specially formed font array. 
     ///     NULL, or the omission of this parameter will restore the default
     ///     font capability, which may use the display controllers hardware
     ///     font (if available), or no font.
@@ -380,12 +384,12 @@
     /// Protected method to render an image given a file handle and 
     /// coordinates.
     ///
-    /// @param x is the horizontal pixel coordinate
-    /// @param y is the vertical pixel coordinate
-    /// @param w is the image width restriction, or zero to permit full image width.
-    /// @param h is the image height restriction, or zero to permit full image height.
-    /// @param fileOffset is the offset into the file where the image data starts
-    /// @param Image is the filename stream already opened for the data.
+    /// @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.
     ///
     RetCode_t _RenderBitmap(loc_t x, loc_t y, uint32_t fileOffset, FILE * Image);