Etienne Beauregard
/
APP3_Capteur_V2
lalallaa
xbee_tx.h@1:6738a65b699f, 2017-10-03 (annotated)
- Committer:
- EtienneB
- Date:
- Tue Oct 03 01:28:03 2017 +0000
- Revision:
- 1:6738a65b699f
- Parent:
- 0:4a3d5d86258c
Version semi-finale et commentee de la version a valider
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
EtienneB | 0:4a3d5d86258c | 1 | #ifndef MBED_XBEE_TX_H |
EtienneB | 0:4a3d5d86258c | 2 | #define MBED_XBEE_TX_H |
EtienneB | 0:4a3d5d86258c | 3 | |
EtienneB | 0:4a3d5d86258c | 4 | // API Frame Names API ID |
EtienneB | 0:4a3d5d86258c | 5 | #define AT_CMD 0x08 |
EtienneB | 0:4a3d5d86258c | 6 | #define AT_CMD_QUEUE 0x09 |
EtienneB | 0:4a3d5d86258c | 7 | #define ZBEE_TX_RQST 0x10 |
EtienneB | 0:4a3d5d86258c | 8 | #define RMT_CMD_RQST 0x17 |
EtienneB | 0:4a3d5d86258c | 9 | #define CREATE_SRC_R 0x21 |
EtienneB | 0:4a3d5d86258c | 10 | #define AT_CMD_RSPNS 0x88 |
EtienneB | 0:4a3d5d86258c | 11 | #define MODEM_STATUS 0x8A |
EtienneB | 0:4a3d5d86258c | 12 | #define ZBEE_TX_STATUS 0x8B |
EtienneB | 0:4a3d5d86258c | 13 | #define RMT_CMD_RSPNS 0x97 |
EtienneB | 0:4a3d5d86258c | 14 | |
EtienneB | 0:4a3d5d86258c | 15 | #define START 0x7E |
EtienneB | 0:4a3d5d86258c | 16 | #define CMD_AT 0x08 |
EtienneB | 0:4a3d5d86258c | 17 | #define CMD_TX_RQST 0X10 |
EtienneB | 0:4a3d5d86258c | 18 | #define RMT_CMD_RQST 0X17 |
EtienneB | 0:4a3d5d86258c | 19 | #define PLUS 0x2B |
EtienneB | 0:4a3d5d86258c | 20 | #define FRM_ID_01 0x01 |
EtienneB | 0:4a3d5d86258c | 21 | #define MODEM_STATUS 0x01 |
EtienneB | 0:4a3d5d86258c | 22 | |
EtienneB | 0:4a3d5d86258c | 23 | uint16_t PAN_ID = 0; |
EtienneB | 0:4a3d5d86258c | 24 | uint16_t FREQ_LECTURE_CAPTEURS = 0; |
EtienneB | 0:4a3d5d86258c | 25 | |
EtienneB | 0:4a3d5d86258c | 26 | // Fonctions communication entre LPC1768 et XBee |
EtienneB | 0:4a3d5d86258c | 27 | bool send_char_2Xbee(uint8_t caratere); |
EtienneB | 0:4a3d5d86258c | 28 | bool send_2Xbee(uint8_t *message_2_send, uint16_t nbr_char); |
EtienneB | 0:4a3d5d86258c | 29 | bool receive_Xbee(); |
EtienneB | 0:4a3d5d86258c | 30 | void init_xbee(uint16_t pan_id); |
EtienneB | 0:4a3d5d86258c | 31 | uint8_t checksum_calc(uint8_t cmdID, uint8_t frameID, uint8_t *data, uint16_t nbr_char); |
EtienneB | 0:4a3d5d86258c | 32 | bool send_frame_2Xbee(uint8_t cmdID, uint8_t frameID, uint8_t *data_2_send, uint16_t nbr_char); |
EtienneB | 0:4a3d5d86258c | 33 | bool get_coord_ID(); |
EtienneB | 0:4a3d5d86258c | 34 | uint8_t get_MSB(uint16_t length); |
EtienneB | 0:4a3d5d86258c | 35 | uint8_t get_LSB(uint16_t length); |
EtienneB | 0:4a3d5d86258c | 36 | |
EtienneB | 0:4a3d5d86258c | 37 | #endif |