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.
Request/PinConfigurationRequest.h@6:5f31ddc17239, 2015-11-14 (annotated)
- Committer:
- yangcq88517
- Date:
- Sat Nov 14 16:42:36 2015 +0000
- Revision:
- 6:5f31ddc17239
- Parent:
- 0:837e6c48e90d
change to unsigned char array
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yangcq88517 | 0:837e6c48e90d | 1 | #ifndef UK_AC_HERTS_SMARTLAB_XBEE_PinConfigurationRequest |
yangcq88517 | 0:837e6c48e90d | 2 | #define UK_AC_HERTS_SMARTLAB_XBEE_PinConfigurationRequest |
yangcq88517 | 0:837e6c48e90d | 3 | |
yangcq88517 | 0:837e6c48e90d | 4 | #include "Pin.h" |
yangcq88517 | 0:837e6c48e90d | 5 | #include "ATCommands.h" |
yangcq88517 | 0:837e6c48e90d | 6 | #include "ATCommandRequest.h" |
yangcq88517 | 0:837e6c48e90d | 7 | |
yangcq88517 | 0:837e6c48e90d | 8 | class PinConfigurationRequest : public ATCommandRequest |
yangcq88517 | 0:837e6c48e90d | 9 | { |
yangcq88517 | 0:837e6c48e90d | 10 | public: |
yangcq88517 | 0:837e6c48e90d | 11 | /** |
yangcq88517 | 0:837e6c48e90d | 12 | * @param function |
yangcq88517 | 0:837e6c48e90d | 13 | *DISABLED = 0x00, |
yangcq88517 | 0:837e6c48e90d | 14 | *RESERVED_FOR_PIN_SPECIFIC_ALTERNATE_FUNCTIONALITIES = 0x01, |
yangcq88517 | 0:837e6c48e90d | 15 | *ANALOG_INPUT_SINGLE_ENDED = 0x02, |
yangcq88517 | 0:837e6c48e90d | 16 | *DIGITAL_INPUT_MONITORED = 0x03, |
yangcq88517 | 0:837e6c48e90d | 17 | *DIGITAL_OUTPUT_DEFAULT_LOW = 0x04, |
yangcq88517 | 0:837e6c48e90d | 18 | *DIGITAL_OUTPUT_DEFAULT_HIGH = 0x05, |
yangcq88517 | 0:837e6c48e90d | 19 | *ALTERNATE_FUNCTIONALITIES_WHERE_APPLICABLE = 0x06//0x06~0x09 |
yangcq88517 | 0:837e6c48e90d | 20 | */ |
yangcq88517 | 6:5f31ddc17239 | 21 | PinConfigurationRequest(unsigned char frameID, Pin * pin, unsigned char function) |
yangcq88517 | 0:837e6c48e90d | 22 | : ATCommandRequest(frameID, pin->getCommand(), &function, 0, 1) |
yangcq88517 | 0:837e6c48e90d | 23 | { } |
yangcq88517 | 0:837e6c48e90d | 24 | |
yangcq88517 | 0:837e6c48e90d | 25 | /** |
yangcq88517 | 0:837e6c48e90d | 26 | * @param function |
yangcq88517 | 0:837e6c48e90d | 27 | *DISABLED = 0x00, |
yangcq88517 | 0:837e6c48e90d | 28 | *RESERVED_FOR_PIN_SPECIFIC_ALTERNATE_FUNCTIONALITIES = 0x01, |
yangcq88517 | 0:837e6c48e90d | 29 | *ANALOG_INPUT_SINGLE_ENDED = 0x02, |
yangcq88517 | 0:837e6c48e90d | 30 | *DIGITAL_INPUT_MONITORED = 0x03, |
yangcq88517 | 0:837e6c48e90d | 31 | *DIGITAL_OUTPUT_DEFAULT_LOW = 0x04, |
yangcq88517 | 0:837e6c48e90d | 32 | *DIGITAL_OUTPUT_DEFAULT_HIGH = 0x05, |
yangcq88517 | 0:837e6c48e90d | 33 | *ALTERNATE_FUNCTIONALITIES_WHERE_APPLICABLE = 0x06//0x06~0x09 |
yangcq88517 | 0:837e6c48e90d | 34 | */ |
yangcq88517 | 6:5f31ddc17239 | 35 | void setPinFunction(unsigned char function) { data[4] = function; } |
yangcq88517 | 0:837e6c48e90d | 36 | |
yangcq88517 | 0:837e6c48e90d | 37 | }; |
yangcq88517 | 0:837e6c48e90d | 38 | |
yangcq88517 | 0:837e6c48e90d | 39 | #endif |