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:
179:c7fb7a4fb42f
Parent:
167:8aa3fb2a5a31
Child:
180:d8abf2e70b88
--- a/DisplayDefs.h	Sun Jul 28 01:33:02 2019 +0000
+++ b/DisplayDefs.h	Sun Jul 28 02:14:09 2019 +0000
@@ -71,22 +71,38 @@
 
 /// type that manages x,y pairs
 ///
-typedef struct
+struct point_t
 {
     loc_t x;             ///< x value in the point
     loc_t y;             ///< y value in the point
-} point_t;
+    
+    // constructors:
+    point_t(loc_t arg_x, loc_t arg_y) : 
+    x(arg_x), y(arg_y) {}   
+    point_t() :
+    x(0), y(0){};          
+};
 
 /// Data type that manages rectangles, which are pairs of points. 
 ///
 /// @note It is recommended that p1 contains the top-left point and p2 contains 
 /// the bottom-right point, even though it should not matter.
 ///
-typedef struct
+struct rect_t
 {
     point_t p1;         ///< p1 defines one point on the rectangle
     point_t p2;         ///< p2 defines the opposite point on the rectangle
-} rect_t;
+    
+    // constructors:
+    rect_t(point_t arg_p1, point_t arg_p2) :
+    p1(arg_p1), p2(arg_p2) {};
+    
+    rect_t(loc_t arg_p1_x, loc_t arg_p1_y, loc_t arg_p2_x, loc_t arg_p2_y) :
+    p1(point_t(arg_p1_x, arg_p1_y)), p2(point_t(arg_p2_x, arg_p2_y)){};
+    
+    rect_t() :
+    p1(point_t()), p2(point_t()) {};
+};
 
 /// Data type that manages the calibration matrix for the resistive touch panel.
 ///