-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathXBeeAPIPackets.h
48 lines (35 loc) · 1.08 KB
/
XBeeAPIPackets.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// XBeeAPIPackets.h
//
// Copyright (C) 2014 by Eric Dey. All rights reserved.
//
//
#ifndef XBEEAPIPACKETS_H
#define XBEEAPIPACKETS_H
#ifdef __cplusplus
extern "C" {
#endif
#define XBEEAPIPACKETS_SEND_QUEUE_DEPTH 2 // Must be >= 2
#define XBEEAPIPACKETS_RECV_QUEUE_DEPTH 2 // Must be >= 2
#define XBEEAPIPACKETS_DATA_BUFFER_MAX_SIZE 256
//typedef enum {
// AT_COMMAND_REQUEST = 0x08,
// TRANSMIT_DATA_PACKET = 0x10,
// TRANSMIT_DATA_PACKET_EXPLICIT = 0x11,
// AT_COMMAND_RESPONSE = 0x88,
// MODEM_STATUS = 0x8a,
// TRANSMIT_STATUS = 0x8b,
// RECEIVE_DATA_PACKET = 0x90,
// RECEIVE_DATA_PACKET_EXPLICIT = 0x91,
// REMOTE_COMMAND_RESPONSE = 0x97
//} XBeeFrameType;
typedef struct {
int length;
uint8_t data[XBEEAPIPACKETS_DATA_BUFFER_MAX_SIZE+1];
} XBeeAPIPacket;
int XBeePacket_APISendData(unsigned long dest64hi, unsigned long dest64lo, unsigned short dest16, unsigned int dataLength, uint8_t *data);
int XBeePacket_APISendATCommand(char *inputStr, char *outputStr);
#ifdef __cplusplus
}
#endif
#endif /* XBEEAPIPACKETS_H */