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:
123:2f45e80fec5f
Parent:
111:efe436c43aba
Child:
124:1690a7ae871c
--- a/RA8875.cpp	Tue May 17 22:33:06 2016 +0000
+++ b/RA8875.cpp	Mon Jul 25 10:55:58 2016 +0000
@@ -100,6 +100,7 @@
     c_callback = NULL;
     obj_callback = NULL;
     method_callback = NULL;
+    idle_callback = NULL;
 }
 
 //RA8875::~RA8875()
@@ -324,10 +325,15 @@
     static uint8_t count = 0;
     uint8_t col, row;
     uint8_t key;
-
+    
     while (!readable()) {
         wait_us(POLLWAITuSec);
         // COUNTIDLETIME(POLLWAITuSec);     // As it is voluntary to call the getc and pend. Don't tally it.
+        if (idle_callback) {
+            if (external_abort == (*idle_callback)(getc_wait)) {
+                return 0;
+            }
+        }
     }
     // read the key press number
     uint8_t keyNumReg = ReadCommand(0xC1) & 0x03;
@@ -544,6 +550,11 @@
     while (i-- && ReadStatus() & mask) {
         wait_us(POLLWAITuSec);
         COUNTIDLETIME(POLLWAITuSec);
+        if (idle_callback) {
+            if (external_abort == (*idle_callback)(status_wait)) {
+                return false;
+            }
+        }
     }
     if (i)
         return true;
@@ -561,6 +572,11 @@
     while (i-- && ReadCommand(reg) & mask) {
         wait_us(POLLWAITuSec);
         COUNTIDLETIME(POLLWAITuSec);
+        if (idle_callback) {
+            if (external_abort == (*idle_callback)(command_wait)) {
+                return false;
+            }
+        }
     }
     if (i)
         return true;