Modified version of the DmTftLibrary, optimized for the LPC4088 Experiment Base Board

Dependents:   lpc4088_ebb_dm_calc lpc4088_ebb_dm_bubbles

Fork of DmTftLibrary by Display Module

Revision:
10:d263094e666d
Parent:
9:bac5439e3c1c
Child:
11:8b441dd1d470
--- a/DmTouch.cpp	Mon Jul 07 13:30:33 2014 +0000
+++ b/DmTouch.cpp	Wed Jul 09 08:31:34 2014 +0000
@@ -28,6 +28,7 @@
 DmTouch::DmTouch(Display disp, SpiMode spiMode)
 #endif
 {
+  _disp = disp;
   switch (disp) {
     // Display with 40-pin connector on top of adapter board
     case DmTouch::DM_TFT28_103:
@@ -37,6 +38,8 @@
       _clk = A1;
       _mosi = A0;
       _miso = D9;
+      _width = 240;
+      _height = 320;
       _hardwareSpi = false;
       break;
 
@@ -46,6 +49,8 @@
       _clk = D13;
       _mosi = D11;
       _miso = D12;
+      _width = 240;
+      _height = 320;
       _hardwareSpi = true;
       break;
 
@@ -56,6 +61,8 @@
       _clk = D13;
       _mosi = D11;
       _miso = D12;
+      _width = 320;
+      _height = 240;
       _hardwareSpi = true;
       break;
   }
@@ -250,7 +257,7 @@
 #if defined (DM_TOOLCHAIN_ARDUINO)
   touching = isTouched();
 #elif defined (DM_TOOLCHAIN_MBED)
-  touching = (posX < 4096 && posY < 4096);
+  touching = (posX < _width && posY < _height);
 #endif
 }