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:
0:837e6c48e90d
Child:
6:5f31ddc17239
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Request/PinConfigurationRequest.h	Thu Oct 22 12:28:26 2015 +0000
@@ -0,0 +1,39 @@
+#ifndef UK_AC_HERTS_SMARTLAB_XBEE_PinConfigurationRequest
+#define UK_AC_HERTS_SMARTLAB_XBEE_PinConfigurationRequest
+
+#include "Pin.h"
+#include "ATCommands.h"
+#include "ATCommandRequest.h"
+
+class PinConfigurationRequest : public ATCommandRequest
+{
+public:
+    /**
+    * @param function
+    *DISABLED = 0x00,
+    *RESERVED_FOR_PIN_SPECIFIC_ALTERNATE_FUNCTIONALITIES = 0x01,
+    *ANALOG_INPUT_SINGLE_ENDED = 0x02,
+    *DIGITAL_INPUT_MONITORED = 0x03,
+    *DIGITAL_OUTPUT_DEFAULT_LOW = 0x04,
+    *DIGITAL_OUTPUT_DEFAULT_HIGH = 0x05,
+    *ALTERNATE_FUNCTIONALITIES_WHERE_APPLICABLE = 0x06//0x06~0x09
+    */
+    PinConfigurationRequest(char frameID, Pin * pin, char function)
+        : ATCommandRequest(frameID, pin->getCommand(), &function, 0, 1)
+    { }
+    
+    /**
+    * @param function
+    *DISABLED = 0x00,
+    *RESERVED_FOR_PIN_SPECIFIC_ALTERNATE_FUNCTIONALITIES = 0x01,
+    *ANALOG_INPUT_SINGLE_ENDED = 0x02,
+    *DIGITAL_INPUT_MONITORED = 0x03,
+    *DIGITAL_OUTPUT_DEFAULT_LOW = 0x04,
+    *DIGITAL_OUTPUT_DEFAULT_HIGH = 0x05,
+    *ALTERNATE_FUNCTIONALITIES_WHERE_APPLICABLE = 0x06//0x06~0x09
+    */
+    void setPinFunction(char function) { data[4] = function; }
+    
+};
+
+#endif
\ No newline at end of file