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

Files at this revision

API Documentation at this revision

Comitter:
embeddedartists
Date:
Wed Sep 10 12:47:47 2014 +0000
Parent:
10:d263094e666d
Child:
12:eb97ccfe7c3f
Commit message:
Updated documentation

Changed in this revision

DmTftBase.cpp Show annotated file Show diff for this revision Revisions of this file
DmTouch.cpp Show annotated file Show diff for this revision Revisions of this file
dm_platform.h Show annotated file Show diff for this revision Revisions of this file
--- a/DmTftBase.cpp	Wed Jul 09 08:31:34 2014 +0000
+++ b/DmTftBase.cpp	Wed Sep 10 12:47:47 2014 +0000
@@ -33,13 +33,11 @@
 void DmTftBase::setPixel(uint16_t x, uint16_t y, uint16_t color) {
   cbi(_pinCS, _bitmaskCS);
 
-  if ((x >= _width) || (y >= _height)) {
-    return;
+  if ((x < _width) && (y < _height)) {
+    setAddress(x, y, x, y);
+    sendData(color);
   }
 
-  setAddress(x, y, x, y);
-
-  sendData(color);
   sbi(_pinCS, _bitmaskCS);
 }
 
--- a/DmTouch.cpp	Wed Jul 09 08:31:34 2014 +0000
+++ b/DmTouch.cpp	Wed Sep 10 12:47:47 2014 +0000
@@ -249,7 +249,9 @@
 
 void DmTouch::readTouchData(uint16_t& posX, uint16_t& posY, bool& touching) {  
   uint16_t touchX, touchY;
-  getMiddleXY(touchX,touchY);
+  if (!getMiddleXY(touchX,touchY)) {
+  	touching = false;
+  }
 
   posX = getDisplayCoordinateX(touchX, touchY);
   posY = getDisplayCoordinateY(touchX, touchY);
--- a/dm_platform.h	Wed Jul 09 08:31:34 2014 +0000
+++ b/dm_platform.h	Wed Sep 10 12:47:47 2014 +0000
@@ -65,6 +65,18 @@
   #define constrain(amt,low,high) ((amt)<=(low)?(low):((amt)>(high)?(high):(amt)))
   #define delay(ms) wait_ms(ms)
 
+  // Change pinning for LPC4088 Experiment Base Board as it is different compared
+  // to the LPC4088 QSB Base Board (i.e. D2<->D8  and  D5<->D9)
+  #undef  D2
+  #define D2 p8
+  #undef  D5
+  #define D5 p39
+  #undef  D8
+  #define D8 p31
+  #undef  D9
+  #define D9 p37
+  
+
   // On Arduino no extra delay is needed, but on faster platforms the simulated
   // SPI bus may get a too high frequency so a delay here will lower it. This
   // delay should ideally be configurable per platform but for now it will have
@@ -75,6 +87,7 @@
       volatile unsigned _xyz = 10; \
       for (; _xyz > 0; _xyz--); \
     } while(0)
+    //#define slow_pulse_delay()
   #else
     #define slow_pulse_delay()
   #endif