Digi XBee(R) ANSI C Host Library
|
Files | |
file | user_data.h |
file | xbee_user_data.c |
Data Structures | |
struct | xbee_header_user_data_tx_t |
Header of XBee API frame type 0x2D (XBEE_FRAME_USER_DATA_TX); sent from host to XBee. More... | |
struct | xbee_frame_user_data_rx_t |
Format of XBee API frame type 0xAD (XBEE_FRAME_USER_DATA_RX); received from XBee by host. More... | |
Macros | |
#define | XBEE_FRAME_USER_DATA_TX 0x2D |
Frame Type: Send data to MicroPython or BLE interface. | |
#define | XBEE_FRAME_USER_DATA_RX 0xAD |
Frame Type: Data received from MicroPython or BLE interface. | |
#define | XBEE_USER_DATA_IF_SERIAL 0x00 |
SPI/UART when in API mode. | |
#define | XBEE_USER_DATA_IF_BLE 0x01 |
Bluetooth. | |
#define | XBEE_USER_DATA_IF_MICROPYTHON 0x02 |
XBee-hosted MicroPython. | |
Functions | |
int | xbee_user_data_relay_tx (xbee_dev_t *xbee, uint8_t dest, const void *payload, uint16_t length) |
Send a User Data Relay frame (XBEE_FRAME_USER_DATA_TX, type 0x2D). More... | |
const char * | xbee_user_data_interface (uint8_t iface) |
Return a string description for an XBEE_USER_DATA_IF_xxx value. More... | |
const char * xbee_user_data_interface | ( | uint8_t | iface | ) |
Return a string description for an XBEE_USER_DATA_IF_xxx value.
[in] | iface | A valid User Data Relay frame interface. |
A | string description for that interface or "[invalid]". |
References XBEE_USER_DATA_IF_BLE, XBEE_USER_DATA_IF_MICROPYTHON, and XBEE_USER_DATA_IF_SERIAL.
int xbee_user_data_relay_tx | ( | xbee_dev_t * | xbee, |
uint8_t | dest, | ||
const void * | payload, | ||
uint16_t | length | ||
) |
Send a User Data Relay frame (XBEE_FRAME_USER_DATA_TX, type 0x2D).
[in] | xbee | XBee device to receive the frame. |
[in] | dest | One of the XBEE_USER_DATA_IF_xxx macros. |
[in] | payload | Payload to send. |
[in] | length | Length of payload. |
>0 | Frame ID of User Data Relay frame sent to xbee. Used to match up an XBEE_FRAME_TX_STATUS response. |
-EINVAL | xbee is NULL or invalid flags passed |
-EBUSY | Transmit serial buffer is full, or XBee is not accepting serial data (deasserting /CTS signal). |
-EMSGSIZE | Serial buffer can't ever send a frame this large. |
References XBEE_FRAME_USER_DATA_TX, xbee_frame_write(), and xbee_next_frame_id().