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:
32:0e4f2ae512e2
Parent:
31:c72e12cd5c67
Child:
37:f19b7e7449dc
--- a/DisplayDefs.h	Mon Jan 20 19:19:48 2014 +0000
+++ b/DisplayDefs.h	Tue Jan 21 03:28:36 2014 +0000
@@ -1,6 +1,8 @@
 #ifndef DISPLAYDEFS_H
 #define DISPLAYDEFS_H
 
+#define RGB(r,g,b) ( ((r<<8)&0xF800) | ((g<<3)&0x07E0) | (b>>3) )
+
 typedef uint16_t color_t;
 
 /// return values from functions
@@ -15,4 +17,29 @@
     not_enough_ram,         ///< could not allocate ram for scanline
 } RetCode_t;
 
+/// type that manages x,y pairs
+typedef struct
+{
+    uint16_t x;             ///< x value in the point
+    uint16_t y;             ///< y value in the point
+} point_t;
+
+/// color type definition to let the compiler help keep us honest.
+/// 
+/// colors can be defined with the RGB(r,g,b) macro, and there
+/// are a number of predefined colors:
+/// - Black,    Blue,       Green,       Cyan,
+/// - Red,      Magenta,    Brown,       Gray,
+/// - Charcoal, BrightBlue, BrightGreen, BrightCyan,
+/// - Orange,   Pink,       Yellow,      White
+///
+typedef uint16_t color_t;   
+
+/// background fill info for drawing Text, Rectangles, RoundedRectanges, Circles, Ellipses and Triangles.
+typedef enum
+{
+    NOFILL,     ///< do not fill the object with the background color
+    FILL        ///< fill the object space with the background color
+} fill_t;
+
 #endif // DISPLAYDEFS_H