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:
33:b6b710758ab3
Parent:
32:0e4f2ae512e2
Child:
34:c99ec28fac66
--- a/GraphicsDisplay.cpp	Tue Jan 21 03:28:36 2014 +0000
+++ b/GraphicsDisplay.cpp	Wed Jan 22 03:50:55 2014 +0000
@@ -211,10 +211,10 @@
     window(0,0, width(),height());
 }
 
-RetCode_t GraphicsDisplay::putp(color_t colour)
+RetCode_t GraphicsDisplay::putp(color_t color)
 {
     // put pixel at current pixel location
-    pixel(_x, _y, colour);
+    pixel(_x, _y, color);
     // update pixel location based on window settings
     _x++;
     if(_x > _x2) {
@@ -227,14 +227,14 @@
     return noerror;
 }
 
-void GraphicsDisplay::fill(int x, int y, int w, int h, color_t colour)
+void GraphicsDisplay::fill(int x, int y, int w, int h, color_t color)
 {
     #ifdef USE_HW
-    fillrect(x,y, x+w, y+h, colour);
+    fillrect(x,y, x+w, y+h, color);
     #else
     window(x, y, w, h);
     for(int i=0; i<w*h; i++) {
-        putp(colour);
+        putp(color);
     }
     #endif
 }
@@ -245,25 +245,25 @@
     return noerror;
 }
 
-void GraphicsDisplay::blit(int x, int y, int w, int h, const int * colour)
+void GraphicsDisplay::blit(int x, int y, int w, int h, const int * color)
 {
     window(x, y, w, h);
     for (int i=0; i<w*h; i++) {
-        putp(colour[i]);
+        putp(color[i]);
     }
 }
 
-int GraphicsDisplay::blitbit(int x, int y, int w, int h, const char * colour)
+int GraphicsDisplay::blitbit(int x, int y, int w, int h, const char * color)
 {
     _foreground = 0xFFFF;
-    INFO("blitbit(%d,%d, %d,%d, %02X) [%04X,%04X]", x,y, w,h, *colour, _foreground, _background);
+    INFO("blitbit(%d,%d, %d,%d, %02X) [%04X,%04X]", x,y, w,h, *color, _foreground, _background);
     INFO("%lu  %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X",
-        colour,
-        colour[0], colour[1], colour[2], colour[3], colour[4], colour[5], colour[6], colour[7], 
-        colour[8], colour[9], colour[10], colour[11], colour[12], colour[13], colour[14], colour[15]);
+        color,
+        color[0], color[1], color[2], color[3], color[4], color[5], color[6], color[7], 
+        color[8], color[9], color[10], color[11], color[12], color[13], color[14], color[15]);
     window(x, y, w, h);
     for (int i = 0; i < w*h; i++) {
-        char byte = colour[i >> 3];
+        char byte = color[i >> 3];
         int offset = i & 0x7;
         if (offset == 0)
             INFO(" %2d = %02X", i>>3, byte);