Project

General

Profile

Revision 1587

wireless: core send function and ack function done

View differences:

xbee.h
54 54
 * @{
55 55
 **/
56 56
 
57
 /**@defgroup xbee_const xbee constants 
58
  * @brief These are constants used for the xbee module.
59
  * @{ **/
57 60
 
61
// TODO: move constants to xbee.h so they can be used publicly
62

  
63
/**@brief The port to use the XBee from on the computer. **/
64
#ifndef ROBOT
65
#define XBEE_PORT_DEFAULT "/dev/ttyUSB1"
66
#endif
67
 
68
/**@name xbee options
69
 * @{ **/
70
 
71
/**@brief Unset PAN, uses XBee default **/
72
#define XBEE_PAN_DEFAULT 0xFFFF
73
/**@brief Unset channel, uses XBee default **/
74
#define XBEE_CHANNEL_DEFAULT 0
75
/**@brief Broadcast to all robots in the PAN **/
76
#define XBEE_BROADCAST 0xFFFF
77
/**@brief No special options **/
78
#define XBEE_OPTIONS_NONE 0x00
79
/**@brief Do not receive a TX_STATUS message from this packet **/
80
#define XBEE_OPTIONS_DISABLE_RESPONSE 0x01
81
/**@brief Send the packet to all PANS **/
82
#define XBEE_OPTIONS_BROADCAST_ALL_PANS 0x04
83
/**@brief A transmit status packet **/
84
#define XBEE_TX_STATUS 0x89
85
/**@brief A packet received from another XBee **/
86
#define XBEE_RX 0x81
87

  
88
/**@}
89
 * @name xbee frame types
90
 * @{ **/
91

  
92
// TODO: add comments for all of these definitions
93
#define XBEE_FRAME_START 0x7E
94
#define XBEE_GET_PACKET_TIMEOUT 1000
95

  
96
/*Frame Types*/
97
#define XBEE_FRAME_STATUS 0x8A
98
#define XBEE_FRAME_AT_COMMAND 0x08
99
#define XBEE_FRAME_AT_COMMAND_RESPONSE 0x88
100
#define XBEE_FRAME_TX_REQUEST_64 0x00
101
#define XBEE_FRAME_TX_REQUEST_16 0x01
102
#define XBEE_FRAME_TX_STATUS XBEE_TX_STATUS
103
#define XBEE_FRAME_RX_64 0x80
104
#define XBEE_FRAME_RX_16 XBEE_RX
105

  
106
/** @} **/
107

  
108

  
109
// TODO: is this a good size?
110
/*Buffer sizes*/
111
#define XBEE_BUFFER_SIZE	128
112
#define PACKET_BUFFER_SIZE	108
113

  
114
/**@} **/ // end const group
115
 
116
/**
117
 * @defgroup xbee_funcs Xbee Functions
118
 * @brief These are the public xbee functions.
119
 * @{
120
 **/
121
  
58 122
// TODO: convert all int references to int16_t syntax (see stdint.h)
59 123

  
60 124
/**@brief Initialize the XBee library **/
......
80 144
/**@brief Reset XBee **/
81 145
int xbee_reset(void);
82 146

  
83
/**@}**/ //end defgroup
147
/**@} **/ //end xbee_funcs group
84 148

  
149
/**@} **/ //end defgroup
150

  
85 151
#endif

Also available in: Unified diff