Shows how to use a display and the touch controller. Will display the X and Y coordinates of the current touch event.

Dependencies:   DmTftLibrary mbed

Revision:
5:cf0097e3a18c
Parent:
2:c8e477ca4276
Child:
6:d28b8be6e90a
--- a/main.cpp	Mon Sep 01 11:09:15 2014 +0000
+++ b/main.cpp	Wed Jan 21 13:57:06 2015 +0000
@@ -21,6 +21,7 @@
 #include "DmTftIli9325.h"
 #include "DmTftIli9341.h"
 #include "DmTftSsd2119.h"
+#include "DmTftRa8875.h"
 #include "DmTouch.h"
 
 /******************************************************************************
@@ -60,14 +61,17 @@
 
 //DmTftIli9325 tft;  /* DM_TFT28_103 and DM_TFT24_104 */
 //DmTftIli9341 tft;  /* DM_TFT28_105 */
-DmTftSsd2119 tft;   /* DM_TFT35_107 */
+//DmTftSsd2119 tft;   /* DM_TFT35_107 */
+DmTftRa8875  tft;  /* DM_TFT43_108 and DM_TFT50_111 */  
 
 //DmTouch touch(DmTouch::DM_TFT28_103, DmTouch::Software); /* For LPC4088 QuickStart Board */
 //DmTouch touch(DmTouch::DM_TFT28_103);
 //DmTouch touch(DmTouch::DM_TFT24_104, DmTouch::Software); /* For LPC4088 QuickStart Board */
 //DmTouch touch(DmTouch::DM_TFT24_104);
 //DmTouch touch(DmTouch::DM_TFT28_105);
-DmTouch touch(DmTouch::DM_TFT35_107);
+//DmTouch touch(DmTouch::DM_TFT35_107);
+//DmTouch touch(DmTouch::DM_TFT43_108);  // For DmTftRa8875 driver, The panel resolution should be config in DmTftRa8875::init() function on the DmTftRa8875.cpp file.
+DmTouch touch(DmTouch::DM_TFT50_111);
 
 DigitalInOut csTouch(DM_PIN_CS_TOUCH, PIN_OUTPUT, PullUp, 1);
 DigitalInOut csDisplay(DM_PIN_CS_TFT, PIN_OUTPUT, PullUp, 1);
@@ -92,7 +96,7 @@
 int main() {
   log("init tft \r\n");
   tft.init();
-
+  
   uint16_t x = 0;
   uint16_t y = 0;
   uint16_t w = tft.width();