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:
191:0fad2e45e196
Parent:
190:3132b7dfad82
Child:
194:53c18f0e7922
--- a/RA8875.cpp	Sat Sep 21 17:30:00 2019 +0000
+++ b/RA8875.cpp	Fri Oct 11 20:53:08 2019 +0000
@@ -1161,6 +1161,23 @@
     }
 }
 
+RA8875::orientation_t RA8875::GetOrientation()
+{
+    uint8_t dpcrVal = ReadCommand(0x20);
+
+    dpcrVal &= 0x0C;       // keep the scan direction bits
+    switch (dpcrVal) {
+        default:
+        case 0x00:
+            return rotate_0;
+        case 0x08:
+            return rotate_90;
+        case 0x0C:
+            return rotate_180;
+        case 0x04:
+            return rotate_270;
+    }
+}
 
 RetCode_t RA8875::SetOrientation(RA8875::orientation_t angle)
 {