Debug modifications for monitoring internals parameters

Fork of tsi_sensor by neil hancock

Files at this revision

API Documentation at this revision

Comitter:
neilh20
Date:
Tue May 19 16:01:02 2015 +0000
Parent:
5:37ae0d169e13
Commit message:
Can't remember what these changes are.

Changed in this revision

tsi_sensor.cpp Show annotated file Show diff for this revision Revisions of this file
tsi_sensor.h Show annotated file Show diff for this revision Revisions of this file
--- a/tsi_sensor.cpp	Tue Nov 11 22:18:10 2014 +0000
+++ b/tsi_sensor.cpp	Tue May 19 16:01:02 2015 +0000
@@ -17,7 +17,7 @@
  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-
+#if !defined(TARGET_K20D50M)
 #include "mbed.h"
 #include "tsi_sensor.h"
 
@@ -156,3 +156,4 @@
     TSI0->GENCS |= TSI_GENCS_EOSF_MASK; // Clear End of Scan Flag
     changeElectrode(analog_slider);
 }
+#endif // !define(TARGET_K20D50M)
\ No newline at end of file
--- a/tsi_sensor.h	Tue Nov 11 22:18:10 2014 +0000
+++ b/tsi_sensor.h	Tue May 19 16:01:02 2015 +0000
@@ -132,6 +132,26 @@
             case PTC1: return 14;
             default: error("PinName provided to TSIElectrode::getTSIChannel() does not correspond to any known TSI channel.");
         }
+#elif   defined (TARGET_K20D50M)
+        switch(pin) { //Need to do for K20
+            //these are 
+            case PTA0: return 1;
+            case PTA1: return 2;
+            case PTA2: return 3;
+            case PTA3: return 4;
+            case PTA4: return 5;
+            case PTB0: return 0;
+            case PTB1: return 6;
+            case PTB2: return 7;
+            case PTB3: return 8;
+            case PTB16: return 9;
+            case PTB17: return 10;
+            case PTB18: return 11;
+            case PTB19: return 12;
+            case PTC0: return 13;
+            case PTC1: return 14;
+            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."
 # endif