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:
105:4f116006ba1f
Parent:
103:7e0464ca6c5c
Child:
106:c80828f5dea4
--- a/RA8875.h	Mon Feb 08 01:47:56 2016 +0000
+++ b/RA8875.h	Sat Feb 27 18:40:35 2016 +0000
@@ -2039,6 +2039,20 @@
     ///
     int _external_getCharWidth(int c);
     
+    /// Convert a 16-bit color value to an 8-bit value
+    ///
+    /// @param[in] c16 is the 16-bit color value to convert.
+    /// @returns 8-bit color value.
+    ///
+    uint8_t _cvt16to8(color_t c16);
+
+    /// Convert an 8-bit color value to a 16-bit value
+    ///
+    /// @param[in] c8 is the 8-bit color value to convert.
+    /// @returns 16-bit color value.
+    ///
+    color_t _cvt8to16(uint8_t c8);
+    
     /// Select the peripheral to use it.
     ///
     /// @param[in] chipsel when true will select the peripheral, and when false
@@ -2103,6 +2117,8 @@
     DigitalOut cs;                  ///< chip select pin, assumed active low
     DigitalOut res;                 ///< reset pin, assumed active low
     
+    // display metrics to avoid lengthy spi read queries
+    uint8_t screenbpp;              ///< configured bits per pixel
     dim_t screenwidth;              ///< configured screen width
     dim_t screenheight;             ///< configured screen height
     bool portraitmode;              ///< set true when in portrait mode (w,h are reversed)