Mike R / FastAnalogIn

Dependents:   Pinscape_Controller

Fork of FastAnalogIn by Erik -

Files at this revision

API Documentation at this revision

Comitter:
mjr
Date:
Sat Dec 19 06:36:25 2015 +0000
Parent:
10:afc3b84dbbd6
Commit message:
Minor changes

Changed in this revision

FastAnalogIn_KLXX_K20D50M.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r afc3b84dbbd6 -r 234c5cd2b8de FastAnalogIn_KLXX_K20D50M.cpp
--- a/FastAnalogIn_KLXX_K20D50M.cpp	Tue Nov 04 17:53:25 2014 +0000
+++ b/FastAnalogIn_KLXX_K20D50M.cpp	Sat Dec 19 06:36:25 2015 +0000
@@ -24,6 +24,9 @@
 
 FastAnalogIn::FastAnalogIn(PinName pin, bool enabled)
 {
+    if (pin == NC)
+        return;
+    
     ADCnumber = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
     if (ADCnumber == (ADCName)NC) {
         error("ADC pin mapping failed");