High-level driver for the XBee S1 802.15.4 modem. More...
High-level driver for the XBee S1 802.15.4 modem.
Definition in file xbee.h.
#include <stdint.h>#include "mutex.h"#include "periph/uart.h"#include "periph/gpio.h"#include "net/netdev.h"#include "net/ieee802154.h"#include "net/gnrc/nettype.h"
Include dependency graph for xbee.h:Go to the source code of this file.
Data Structures | |
| struct | xbee_params_t |
| Configuration parameters for XBee devices. More... | |
| struct | xbee_t |
| XBee device descriptor. More... | |
| struct | xbee_l2hdr_t |
| Data structure for extraction L2 information of received packets. More... | |
Macros | |
| #define | XBEE_MAX_PAYLOAD_LENGTH (100U) |
| Maximum payload length that can be send. | |
| #define | XBEE_MAX_PKT_LENGTH (115U) |
| Maximum packet length, including XBee API frame overhead. | |
| #define | XBEE_MAX_RESP_LENGTH (16U) |
| Maximum length of a command response. | |
| #define | XBEE_MAX_TXHDR_LENGTH (14U) |
| Maximal possible size of a TX header. | |
| #define | XBEE_DEFAULT_PROTOCOL (GNRC_NETTYPE_SIXLOWPAN) |
| Default protocol for data that is coming in. | |
| #define | XBEE_DEFAULT_PANID (CONFIG_IEEE802154_DEFAULT_PANID) |
| Default PAN ID used after initialization. | |
| #define | XBEE_DEFAULT_CHANNEL (CONFIG_IEEE802154_DEFAULT_CHANNEL) |
| Default channel used after initialization. | |
Enumerations | |
| enum | xbee_rx_state_t { XBEE_INT_STATE_IDLE , XBEE_INT_STATE_SIZE1 , XBEE_INT_STATE_SIZE2 , XBEE_INT_STATE_TYPE , XBEE_INT_STATE_RESP , XBEE_INT_STATE_RX } |
| States of the internal FSM for handling incoming UART frames. More... | |
Functions | |
| void | xbee_setup (xbee_t *dev, const xbee_params_t *params) |
| Prepare the given Xbee device. More... | |
| int | xbee_build_hdr (xbee_t *dev, uint8_t *xhdr, size_t payload_len, void *dst_addr, size_t addr_len) |
| Put together the internal proprietary XBee header. More... | |
| int | xbee_parse_hdr (xbee_t *dev, const uint8_t *xhdr, xbee_l2hdr_t *l2hdr) |
| Extract IEEE802.15.4 L2 header information from the XBee header. More... | |
Variables | |
| const netdev_driver_t | xbee_driver |
| Reference to the XBee driver interface. | |
Address flags | |
| #define | XBEE_ADDR_FLAGS_LONG (0x80) |
| Use long addresses if not otherwise defined when set, use short addresses when unset. | |