Fork of Kojto's library with bugfixes: * added PTC2/TSI0_CH15 pinmapping for KL25 and KL46 MCUs * Fixed readDistance() function
Fork of tsi_sensor by
Fork of Kojto's library with bugfixes
- added PTC2/TSI0_CH15 pinmapping for KL25 and KL46 MCUs
- Fixed readDistance() function
Diff: tsi_sensor.h
- Revision:
- 7:f4bb237d08ca
- Parent:
- 6:f269379b60c5
- Parent:
- 5:14f1557e02a0
- Child:
- 9:ef4781f21ea3
--- a/tsi_sensor.h Thu Mar 26 20:41:18 2015 +0000 +++ b/tsi_sensor.h Wed Apr 15 08:21:46 2015 +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) || defined (TARGET_KL05Z) +#if defined(TARGET_KL25Z) || defined(TARGET_KL46Z) || defined (TARGET_KL05Z) switch(pin) { //these are case PTA0: return 1; @@ -128,10 +128,10 @@ case PTB17: return 10; case PTB18: return 11; case PTB19: return 12; - #ifdef TARGET_KL25Z +#if defined(TARGET_KL25Z) || defined(TARGET_KL46Z) case PTC0: return 13; case PTC1: return 14; - #endif +#endif default: error("PinName provided to TSIElectrode::getTSIChannel() does not correspond to any known TSI channel."); } # else