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:
101:e0aad446094a
Parent:
100:0b084475d5a9
Child:
102:fc60bfa0199f
--- a/RA8875.h	Sat Dec 19 15:55:09 2015 +0000
+++ b/RA8875.h	Sun Jan 17 22:16:37 2016 +0000
@@ -8,8 +8,13 @@
 /// It includes graphics acceleration capabilities for drawing primitives, 
 /// such as line, rectangle, circles, and more.
 ///
+/// It is not a display for super-fast animations, video, picture frames and so forth,
+/// at least when using the SPI ports. Performance has not been evaluated with one
+/// of the parallel port options.
+///
 /// The controller additionally supports backlight control (via PWM), keypad scanning
-/// (for a 4 x 5 matrix) and resistive touch-panel support. 
+/// (for a 4 x 5 matrix) and resistive touch-panel support. Others have provides
+/// support for a capacitive touch screen.
 ///
 /// @section Display_Config Display Configuration
 ///
@@ -53,6 +58,13 @@
 /// The keypad has a default keypad mapping, but there is an API that permits
 /// installing a custom keymap.
 ///
+/// @todo Add APIs for the 2nd PWM channel, which might be quite useful as a simple
+///     beeper.
+/// @todo Figure out how to "init()" in the constructor. I ran into some issues if
+///     the display was instantiated before main(), and the code would not run,
+///     thus the exposure and activation of the init() function. If the constructor
+///     was within main(), then it seemed to work as expected.
+///
 #ifndef RA8875_H
 #define RA8875_H
 #include <mbed.h>
@@ -1994,18 +2006,25 @@
 
     /// Internal function to put a character using the built-in (internal) font engine
     ///
-    /// @param[in] is the character to put to the screen.
+    /// @param[in] c is the character to put to the screen.
     /// @returns the character put.
     ///
     int _internal_putc(int c);
     
     /// Internal function to put a character using the external font engine
     ///
-    /// @param[in] is the character to put to the screen.
+    /// @param[in] c is the character to put to the screen.
     /// @returns the character put.
     ///
     int _external_putc(int c);
     
+    /// Internal function to get the actual width of a character when using the external font engine
+    ///
+    /// @param[in] c is the character to get the width.
+    /// @returns the width in pixels of the character. zero if not found.
+    ///
+    int _external_getCharWidth(int c);
+    
     /// Select the peripheral to use it.
     ///
     /// @param[in] chipsel when true will select the peripheral, and when false
@@ -2171,6 +2190,7 @@
 //     pc.printf("\r\nRA8875 Test - Build " __DATE__ " " __TIME__ "\r\n");
 // 
 //     pc.printf("Turning on display\r\n");
+//     lcd.init();
 //     lcd.Reset();
 //     lcd.Power(true);  // display power is on, but the backlight is independent
 //     lcd.Backlight(0.5);