Fork of tsi_sensor library that allows object construction with pin names instead of TSI channels

Fork of tsi_sensor by Martin Kojtal

Revision:
5:6b2d75d82058
Parent:
4:f64097679f27
--- a/tsi_sensor.h	Mon Aug 04 07:43:15 2014 +0000
+++ b/tsi_sensor.h	Wed Aug 06 08:33:46 2014 +0000
@@ -112,7 +112,7 @@
      * @throws compile-time error if target is not supported, or runtime error if pin does not match any channel.
      */
     static uint8_t getTSIChannel(PinName pin) {
-#if   defined (TARGET_KL25Z)        
+#if   defined (TARGET_KL25Z) || defined (TARGET_KL46Z)        
         switch(pin) {
             //these are 
             case PTA0: return 1;
@@ -133,7 +133,7 @@
             default: error("PinName provided to TSIElectrode::getTSIChannel() does not correspond to any known TSI channel.");
         }
 # else
-    #error "Unknown target for TSIElectrode::getTSIChannel() - only supports KL25Z so far."
+        error("Unknown target for TSIElectrode::getTSIChannel() - only supports KL25Z and KL46Z so far.");
 # endif   
         return 0xFF; //should never get here
     }