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:
91:ca5f829e6d27
Parent:
90:d113d71ae4f0
Child:
92:ce1ab76e8614
--- a/RA8875.cpp	Wed Jan 28 12:21:11 2015 +0000
+++ b/RA8875.cpp	Wed Jan 28 12:30:45 2015 +0000
@@ -61,6 +61,7 @@
     "Rectangle", "Rounded Rectangle",
     "Triangle", "Circle", "Ellipse"
 };
+uint16_t commandsUsed[256];  // track which commands are used with simple counter of number of hits.
 #else
 #define PERFORMANCE_RESET
 #define REGISTERPERFORMANCE(a)
@@ -403,6 +404,10 @@
         pc.printf("%10d uS %s\r\n", metrics[i], metricsName[i]);
     }
     pc.printf("%10d uS Idle time polling display for ready.\r\n", idletime_usec);
+    for (i=0; i<256; i++) {
+        if (commandsUsed[i])
+            pc.printf("Command %02X used %5d times.\r\n", i, commandsUsed[i])
+    }
 }
 #endif
 
@@ -428,6 +433,10 @@
 
 RetCode_t RA8875::WriteCommand(unsigned char command, unsigned int data)
 {
+#ifdef PERF_METRICS
+    if (commandsUsed[command] <= 65535)
+        commandsUsed[command]++;
+#endif
     _select(true);
     _spiwrite(0x80);            // RS:1 (Cmd/Status), RW:0 (Write)
     _spiwrite(command);