Forked para SNOCC

Dependencies:   GPS

Dependents:   SNOCC_V1 SNOCC_V2

Fork of RA8875 by SNOCC

Revision:
44:207594dece70
Parent:
43:3becae133285
Child:
45:679c2fb8480c
diff -r 3becae133285 -r 207594dece70 RA8875.h
--- 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.