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:
44:207594dece70
Parent:
43:3becae133285
Child:
45:679c2fb8480c
--- a/RA8875.h	Sun Mar 09 23:45:23 2014 +0000
+++ b/RA8875.h	Mon Mar 10 11:40:56 2014 +0000
@@ -8,7 +8,7 @@
 
 // Define this to enable code that monitors the performance of various
 // graphics commands.
-//#define PERF_METRICS
+#define PERF_METRICS
 
 // What better place for some test code than in here and the companion
 // .cpp file. See also the bottom of this file.
@@ -46,14 +46,6 @@
     BLOCK       ///< Block cursor
 } cursor_t;
 
-// return values from functions moved into TextDisplay.h
-//typedef enum
-//{
-//    noerror,
-//    bad_parameter
-//} RetCode_t;
-
-
 /// This is a graphics library for the Raio RA8875 Display Controller chip
 /// attached to a 4-wire SPI interface.
 ///
@@ -68,13 +60,14 @@
 /// on the font size), and other text APIs permit pixel level positioning.
 ///
 /// @todo Add Scroll support for text.
-/// @todo Add 2-Layer support.
 /// @todo Improve sync between internal and external font support - cursor, window, scroll.
 /// @todo Find out why it can't shift frequency after constructor runs.
 /// @todo Add Hardware reset signal.
 /// @todo Add Touch Screen support.
 /// @todo Add Keypad Support.
-/// @todo Add high level objects - x-y graph, meter, others...
+/// @todo Add high level objects - x-y graph, meter, others... but these will
+///     probably be best served in another class, since they may not
+///     be needed for many uses.
 /// 
 class RA8875 : public GraphicsDisplay
 {
@@ -153,6 +146,30 @@
     ///
     RetCode_t SelectLayer(uint16_t layer);
     
+    /// Set the Layer presentation mode.
+    ///
+    /// This sets the presentation mode for layers, and permits showing
+    /// a single layer, or applying a mode where the two layers
+    /// are combined using one of the hardware methods.
+    ///
+    /// @param mode sets the mode in the Layer Transparency Register.
+    /// @returns success/failure code. @see RetCode_t.
+    ///
+    RetCode_t SetLayerMode(uint8_t mode);
+    
+    
+    /// Set the layer transparency for each layer.
+    ///
+    /// Set the transparency, where the range of values is
+    /// from zero (fully visible) to eight (fully transparent).
+    /// The input value is automatically limited to this range.
+    ///
+    /// @param layer1 sets the layer 1 transparency.
+    /// @param layer2 sets the layer 2 transparency.
+    /// @returns success/failure code. @see RetCode_t.
+    /// 
+    RetCode_t SetLayerTransparency(uint8_t layer1, uint8_t layer2);
+    
     /// Write a command to the display with a word of data.
     ///
     /// This is a high level command, and may invoke several primitives.