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:
95:ef538bd687c0
Parent:
94:203729061e48
Child:
96:40b74dd3695b
--- a/RA8875.cpp	Wed Mar 04 23:52:29 2015 +0000
+++ b/RA8875.cpp	Tue Jul 07 17:05:59 2015 +0000
@@ -1675,21 +1675,21 @@
 
         // Be optimistic - don't check for errors.
         HexDump("BMP_Header", (uint8_t *)&BMP_Header, sizeof(BMP_Header));
-        size_t r = fwrite(&BMP_Header, sizeof(char), sizeof(BMP_Header), Image);
+        fwrite(&BMP_Header, sizeof(char), sizeof(BMP_Header), Image);
 
         HexDump("BMP_Info", (uint8_t *)&BMP_Info, sizeof(BMP_Info));
-        r = fwrite(&BMP_Info, sizeof(char), sizeof(BMP_Info), Image);
+        fwrite(&BMP_Info, sizeof(char), sizeof(BMP_Info), Image);
 
-        color_t transparency = GetBackgroundTransparencyColor();
-        unsigned char ltpr0 = ReadCommand(0x52) & 0x7;
+        //color_t transparency = GetBackgroundTransparencyColor();
+        LayerMode_T ltpr0 = GetLayerMode();
 
         uint16_t prevLayer = GetDrawingLayer();
         // If only one of the layers is visible, select that layer
         switch(ltpr0) {
-            case 0:
+            case ShowLayer0:
                 SelectDrawingLayer(0);
                 break;
-            case 1:
+            case ShowLayer1:
                 SelectDrawingLayer(1);
                 break;
             default:
@@ -1741,8 +1741,9 @@
                         break;
                 }
             }
-            if (j == h - 1)
+            if (j == h - 1) {
                 HexDump("Line", lineBuffer, lineBufSize);
+            }
             // Write to disk
             fwrite(lineBuffer, sizeof(char), lb, Image);
         }