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:
19:3f82c1161fd2
Parent:
0:de9d1462a835
Child:
29:422616aa04bd
--- a/TextDisplay.h	Tue Oct 22 20:17:29 2013 +0000
+++ b/TextDisplay.h	Sun Jan 12 17:40:32 2014 +0000
@@ -9,7 +9,7 @@
  * Everything else (locate, printf, putc, cls) will come for free
  *
  * The model is the display will wrap at the right and bottom, so you can
- * keep writing and will always get valid characters. The location is 
+ * keep writing and will always get valid characters. The location is
  * maintained internally to the class to make this easy
  */
 
@@ -18,14 +18,24 @@
 
 #include "mbed.h"
 
-class TextDisplay : public Stream {
+typedef uint16_t color_t;
+
+/// return values from functions
+typedef enum
+{
+    noerror,
+    bad_parameter
+} RetCode_t;
+
+class TextDisplay : public Stream
+{
 public:
 
-  // functions needing implementation in derived implementation class
-  /** Create a TextDisplay interface
-     *
-     * @param name The name used in the path to access the strean through the filesystem
-     */
+    // functions needing implementation in derived implementation class
+    /** Create a TextDisplay interface
+    *
+    * @param name The name used in the path to access the strean through the filesystem
+    */
     TextDisplay(const char *name = NULL);
 
     /** output a character at the given position
@@ -45,7 +55,7 @@
     * @result number of rows
     */
     virtual int columns() = 0;
-    
+
     // functions that come for free, but can be overwritten
 
     /** redirect output from a stream (stoud, sterr) to  display
@@ -55,15 +65,14 @@
 
     /** clear screen
     */
-    virtual void cls();
-    virtual void locate(int column, int row);
-    virtual void foreground(uint16_t colour);
-    virtual void background(uint16_t colour);
+    virtual RetCode_t cls();
+    virtual RetCode_t locate(unsigned int column, unsigned int row) = 0;
+    virtual RetCode_t foreground(uint16_t colour) = 0;
+    virtual RetCode_t background(uint16_t colour) = 0;
     // putc (from Stream)
     // printf (from Stream)
-    
-protected:
 
+protected:    
     virtual int _putc(int value);
     virtual int _getc();