Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed EthernetInterface
Diff: xbee.h
- Revision:
- 1:d5fc0c731f5d
- Parent:
- 0:671a7b7e4673
- Child:
- 2:ff0b74e5e62c
diff -r 671a7b7e4673 -r d5fc0c731f5d xbee.h --- a/xbee.h Sun Feb 12 16:07:11 2017 +0000 +++ b/xbee.h Sun Feb 12 17:00:40 2017 +0000 @@ -25,6 +25,7 @@ #define API_ID_MODEM_STATUS 0x8A #define API_ID_TRANSMIT_STATUS 0x8B #define API_ID_RECEIVED_PACKET 0x90 +#define API_ID_REMOTE_CMD_RSP 0x97 // Présent dans la majorité des frames #define FRAME_ID_IDX 4 @@ -110,6 +111,23 @@ #define RECEIVED_PACKET_DATA_IDX 15 #define RECEIVED_PACKET_MIN_SIZE 12 +// +#define REMOTE_CMD_RSP_64BIT_MSB_IDX 5 +#define REMOTE_CMD_RSP_64BIT_LSB_IDX 12 +#define REMOTE_CMD_RSP_16BIT_MSB_IDX 13 +#define REMOTE_CMD_RSP_16BIT_LSB_IDX 14 +#define REMOTE_CMD_RSP_AT_IDX 15 +#define REMOTE_CMD_RSP_STATUS_IDX 17 +#define REMOTE_CMD_RSP_DATA_IDX 18 +#define REMOTE_CMD_RSP_MIN_SIZE 14 + +// Les status pour la AT Command Response +#define REMOTE_AT_CMD_RSP_STATUS_OK 0x00 +#define REMOTE_AT_CMD_RSP_STATUS_ERROR 0x01 +#define REMOTE_AT_CMD_RSP_STATUS_INVALID_CMD 0x02 +#define REMOTE_AT_CMD_RSP_STATUS_INVALID_PARAM 0x03 +#define REMOTE_AT_CMD_RSP_STATUS_TX_FAILURE 0x04 + inline uint16_t GetFrameLength(char * buffer){ return (((uint16_t)buffer[LENGTH_MSB_IDX]) << 8) + buffer[LENGTH_LSB_IDX]; }