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:
4:7f473b6b37c3
Parent:
3:ea71f57ca5f8
--- a/main.cpp	Sun Jul 28 03:40:30 2019 +0000
+++ b/main.cpp	Sun Jan 05 18:36:39 2020 +0000
@@ -16,8 +16,8 @@
 ///
 /// @author David Smart, Smartware Computing
 //
-#include "mbed.h"       // Last tested: v5.11.4
-#include "RA8875.h"     // Last tested: v164
+#include "mbed.h"       // Last Working: v128 (OS2)
+#include "RA8875.h"     // Last Working: v190
 
 
 #ifndef MBED_MAJOR_VERSION
@@ -34,10 +34,10 @@
 
 // ############# CRITICAL - Set the display resolution ###############
 // Define BIG_SCREEN for 800x480 panel, undefine for 480x272
-#define BIG_SCREEN
+//#define BIG_SCREEN
 
 // Define this for Cap touch panel, undefine for resistive
-#define CAP_TOUCH
+//#define CAP_TOUCH
 
 #ifdef CAP_TOUCH
 //
@@ -65,7 +65,7 @@
 // LCD[ SPI:{MOSI,MISO,SCK}, /ChipSelect, /reset], 
 // name
 //
-RA8875 lcd(p5, p6, p7, p12, NC, "tft");
+RA8875 lcd(p5,p6,p7,p12,NC, "tft");
 
 void InitTS(void);                                  // Needed for Resistive Touch
 void CalibrateTS(void);                             // Needed for Resistive Touch