KSM edits to RA8875

Dependents:   Liz_Test_Code

Revision:
150:35a4db3081c1
Parent:
149:c62c4b2d6a15
Child:
154:ad2450fc3dc3
--- a/RA8875_Touch.cpp	Sun Aug 06 17:05:54 2017 +0000
+++ b/RA8875_Touch.cpp	Sun Sep 24 02:09:57 2017 +0000
@@ -35,7 +35,13 @@
         WriteCommand(INTC2, RA8875_INT_TP);                            // reg INTC2: Clear any TP interrupt flag
         touchSample = 0;
         touchState = no_cal;
+        //touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
+        #if MBED_LIBRARY_VERSION > 122   // Is this the right version?
         touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
+        #else
+        touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS);
+        #endif
+        
         touchTimer.start();
         touchTimer.reset();
     }
@@ -67,7 +73,13 @@
         touchSample = 0;
         touchState = no_cal;
         if (bTpEnable == TP_ENABLE) {
+            //touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
+            #if MBED_LIBRARY_VERSION > 122   // Is this the right version?
             touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
+            #else
+            touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS);
+            #endif
+
             touchTimer.start();
             touchTimer.reset();
         } else {