A Touchscreen example program showing the RA8875 driver library. This is easily configured for either the Resistive touch panel or the Capacitive touch panel.

Dependencies:   mbed RA8875

Revision:
2:1d3c502e7f23
Parent:
1:140215c838ce
Child:
3:ea71f57ca5f8
--- a/main.cpp	Sat Feb 23 16:23:33 2019 +0000
+++ b/main.cpp	Sat Mar 02 12:43:41 2019 +0000
@@ -5,7 +5,7 @@
 /// (using the FT5206 controller). When used with the capacitive touch
 /// it tracks 5 fingers simultaneously, and only 1 for the resistive panel.
 ///
-/// @note Copyright © 2016 by Smartware Computing, all rights reserved.
+/// @note Copyright © 2016 - 2019 by Smartware Computing, all rights reserved.
 ///     Individuals may use this application for evaluation or non-commercial
 ///     purposes. Within this restriction, changes may be made to this application
 ///     as long as this copyright notice is retained. The user shall make
@@ -34,9 +34,33 @@
 #define CAP_TOUCH
 
 #ifdef CAP_TOUCH
-RA8875 lcd(p5, p6, p7, p12, NC, p9,p10,p13, "tft"); // SPI:{MOSI,MISO,SCK,/ChipSelect,/reset}, I2C:{SDA,SCL,/IRQ}, name
+//
+// Constructor when using the display that has a FT5206 Touch Controller
+//
+// LCD[ SPI:{MOSI,MISO,SCK}, /ChipSelect, /reset], 
+// Touch[ I2C:{SDA,SCL}, /IRQ], 
+// name
+//
+RA8875 lcd(p5,p6,p7,p12,NC, p9,p10,p13, "tft");
+
+//
+// Constructor when using the display that has a GSL1680 Touch Controller
+//
+// LCD[ SPI:{MOSI,MISO,SCK}, /ChipSelect, /reset], 
+// Touch[ I2C:{SDA,SCL}, Wake, /IRQ], 
+// name
+//
+//RA8875 lcd(p5,p6,p7,p12,NC, p9,p10,p14,p13, "tft");
+//
 #else
-RA8875 lcd(p5, p6, p7, p12, NC, "tft");             // SPI:{MOSI,MISO,SCK,/ChipSelect,/reset}, name
+//
+// Constructor when using the basic display with integrated Resistive Touch Controller
+//
+// LCD[ SPI:{MOSI,MISO,SCK}, /ChipSelect, /reset], 
+// name
+//
+RA8875 lcd(p5, p6, p7, p12, NC, "tft");
+
 void InitTS(void);                                  // Needed for Resistive Touch
 void CalibrateTS(void);                             // Needed for Resistive Touch
 const char * TS_Config = "/local/tpcal.cfg";        // Path and file for storing touch config