XBee and XBee-PRO ZigBee RF modules provide cost-effective wireless connectivity to electronic devices. They are interoperable with other ZigBee PRO feature set devices, including devices from other vendors.

Dependencies:   BufferedArray

Dependents:   MBEDminiproject

Revision:
2:700dc65ca3b1
Parent:
0:837e6c48e90d
Child:
6:5f31ddc17239
--- a/Type/IOSamples.cpp	Thu Oct 22 20:02:11 2015 +0000
+++ b/Type/IOSamples.cpp	Thu Oct 22 22:22:12 2015 +0000
@@ -1,26 +1,26 @@
 #include "IOSamples.h"
 
-map<Pin, int> * IOSamples::getAnalogs()
+map<Pin *, int> * IOSamples::getAnalogs()
 {
     return &analog;
 }
 
 int IOSamples::getAnalog(Pin * pin)
 {
-    if (analog.count(*pin))
-        return analog[*pin];
+    if (analog.count(pin))
+        return analog[pin];
     else return -1;
 }
 
-map<Pin, int> * IOSamples::getDigitals()
+map<Pin *, int> * IOSamples::getDigitals()
 {
     return &digital;
 }
 
 int IOSamples::getDigital(Pin * pin)
 {
-    if (digital.count(*pin))
-        return digital[*pin];
+    if (digital.count(pin))
+        return digital[pin];
     else return 2;
 }
 
@@ -32,4 +32,10 @@
 void IOSamples::setSupplyVoltage(int voltage)
 {
     SUPPLY_VOLTAGE =  voltage;
+}
+
+void IOSamples::clear()
+{
+    analog.clear();
+    digital.clear();
 }
\ No newline at end of file