Index: xbee_8h.html =================================================================== --- xbee_8h.html (revision 1822) +++ xbee_8h.html (revision 1823) @@ -1,15 +1,19 @@ - -
-
-#include <stdint.h>
+
Contains definitions for using the XBee. +More...
+#include <stdint.h>
Go to the source code of this file.
Functions | |
int | xbee_lib_init (void) |
Initialize the XBee library. | |
void | xbee_terminate (void) |
Uninitialize the XBee library. | |
int | xbee_get_packet (unsigned char *packet) |
Get a packet from the XBee. | |
int | xbee_send_packet (char *packet, int len, int dest, char options, char frame) |
Send a packet to the XBee. | |
int | xbee_set_pan_id (int id) |
Set the PAN ID for the XBee. | |
unsigned int | xbee_get_pan_id (void) |
Get the XBee's PAN ID. | |
int | xbee_set_channel (int channel) |
Set the channel the XBee is currently using. | |
int | xbee_get_channel (void) |
Get the channel the XBee is currently using. | |
unsigned int | xbee_get_address (void) |
Get the XBee's 16-bit address. | |
-void | xbee_set_com_port (char *port) |
Set the com port on a computer, undefined on the robot. | |
-int | xbee_reset (void) |
Reset XBee. | |
Defines | |
+#define | XBEE_BAUD 9600 |
The XBee baud rate. | |
xbee options | |
+#define | XBEE_PAN_DEFAULT 0xFFFF |
Unset PAN, uses XBee default. | |
+#define | XBEE_CHANNEL_DEFAULT 0 |
Unset channel, uses XBee default. | |
+#define | XBEE_BROADCAST 0xFFFF |
Broadcast to all robots in the PAN. | |
+#define | XBEE_OPTIONS_NONE 0x00 |
No special options. | |
+#define | XBEE_OPTIONS_DISABLE_RESPONSE 0x01 |
Do not receive a TX_STATUS message from this packet. | |
+#define | XBEE_OPTIONS_BROADCAST_ALL_PANS 0x04 |
Send the packet to all PANS. | |
+#define | XBEE_TX_STATUS 0x89 |
A transmit status packet. | |
+#define | XBEE_RX 0x81 |
A packet received from another XBee. | |
xbee frame types | |
+#define | XBEE_FRAME_START 0x7E |
+#define | XBEE_FRAME_STATUS 0x8A |
+#define | XBEE_FRAME_AT_COMMAND 0x08 |
+#define | XBEE_FRAME_AT_COMMAND_RESPONSE 0x88 |
+#define | XBEE_FRAME_TX_REQUEST_64 0x00 |
+#define | XBEE_FRAME_TX_REQUEST_16 0x01 |
+#define | XBEE_FRAME_TX_STATUS XBEE_TX_STATUS |
+#define | XBEE_FRAME_RX_64 0x80 |
+#define | XBEE_FRAME_RX_16 XBEE_RX |
Functions | |
int8_t | xbee_init (void) |
Initialize the XBee library. | |
int8_t | xbee_terminate (void) |
Uninitialize the XBee library. | |
int8_t | xbee_send (uint8_t *buf, uint16_t size) |
Send an array of bytes to the xbee in API mode. | |
int8_t | xbee_sendc (uint8_t byte) |
Send byte to the xbee in API mode. | |
int8_t | xbee_checksum_add (uint8_t *buf, uint8_t len, uint8_t *sum) |
Add a buffer to the checksum value. | |
int8_t | xbee_send_header (uint16_t len) |
Send a frame header to the xbee. | |
int8_t | xbee_send_packet (uint8_t *packet, uint8_t len, uint16_t dest, uint8_t options, uint8_t frame) |
Send a packet to the XBee. | |
int8_t | xbee_set_pan (uint16_t id) |
Set the PAN ID for the XBee. | |
uint16_t | xbee_get_pan (void) |
Get the XBee's PAN ID. | |
int8_t | xbee_set_channel (uint8_t channel) |
Set the channel the XBee is currently using. | |
int8_t | xbee_get_channel (void) |
Get the channel the XBee is currently using. | |
uint16_t | xbee_get_address (void) |
Get the XBee's 16-bit address. | |
+int8_t | xbee_reset (void) |
Reset XBee. |
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-Contains definitions for interfacing with the XBee module, from either a robot or a computer. To use a robot, define ROBOT in wl_defs.h, and to use a computer, don't define ROBOT.
-
+Contains definitions for using the XBee.
+Copyright (c) 2009 Colony Project
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Contains definitions for interfacing with the XBee module, from either a robot or a computer. To use a robot, define ROBOT in wl_defs.h, and to use a computer, don't define ROBOT.
+