xbee 2.1.0.0
xbee.h File Reference

This file contains API for XBEE Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  xbee_t
 XBEE Click context object. More...
 
struct  xbee_cfg_t
 XBEE Click configuration object. More...
 

Macros

#define XBEE_ENTER_CMD_MODE   "+++"
 XBEE list of AT commands.
 
#define XBEE_EXIT_CMD_MODE   "CN"
 
#define XBEE_FACTORY_RESET   "RE"
 
#define XBEE_SET_NODE_IDENTIFIER   "NI"
 
#define XBEE_GET_SERIAL_NUMBER   "SH,SL"
 
#define XBEE_SET_DEST_ADDR_HIGH   "DH"
 
#define XBEE_SET_DEST_ADDR_LOW   "DL"
 
#define XBEE_APPLY_CHANGES   "AC"
 
#define XBEE_API_MODE   "AP"
 
#define XBEE_SAVE_CHANGES   "WR"
 
#define XBEE_CMD_AT   "AT"
 
#define XBEE_DELIMITER   ","
 
#define XBEE_CARRIAGE_RETURN   "\r"
 
#define XBEE_MODE_TRANSPARENT   0
 XBEE mode settings.
 
#define XBEE_MODE_API_WITHOUT_ESC   1
 
#define XBEE_MODE_API_WITH_ESC   2
 
#define XBEE_BROADCAST_DEST_ADDRESS_HIGH   "00000000"
 XBEE destination address settings.
 
#define XBEE_BROADCAST_DEST_ADDRESS_LOW   "0000FFFF"
 
#define XBEE_RSP_OK   "OK"
 XBEE device response for AT commands.
 
#define XBEE_RSP_ERROR   "ERROR"
 
#define XBEE_DRV_BUFFER_SIZE   200
 XBEE driver buffer size.
 
#define XBEE_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  xbee_return_value_t { XBEE_OK = 0 , XBEE_ERROR = -1 }
 XBEE Click return value data. More...
 

Functions

void xbee_cfg_setup (xbee_cfg_t *cfg)
 XBEE configuration object setup function.
 
err_t xbee_init (xbee_t *ctx, xbee_cfg_t *cfg)
 XBEE initialization function.
 
err_t xbee_generic_write (xbee_t *ctx, char *data_in, uint16_t len)
 XBEE data writing function.
 
err_t xbee_generic_read (xbee_t *ctx, char *data_out, uint16_t len)
 XBEE data reading function.
 
void xbee_set_rts_pin (xbee_t *ctx, uint8_t state)
 XBEE set rts pin function.
 
void xbee_set_rst_pin (xbee_t *ctx, uint8_t state)
 XBEE set rst pin function.
 
void xbee_set_cs_pin (xbee_t *ctx, uint8_t state)
 XBEE set cs pin function.
 
uint8_t xbee_get_cts_pin (xbee_t *ctx)
 XBEE get cts pin function.
 
uint8_t xbee_get_att_dtr_pin (xbee_t *ctx)
 XBEE get att_dtr pin function.
 
err_t xbee_write_command (xbee_t *ctx, char *data_buf)
 XBEE write command function.
 
void xbee_hw_reset (xbee_t *ctx)
 XBEE hw reset function.
 
err_t xbee_enter_command_mode (xbee_t *ctx)
 XBEE enter command mode function.
 
err_t xbee_exit_command_mode (xbee_t *ctx)
 XBEE exit command mode function.
 
err_t xbee_factory_reset (xbee_t *ctx)
 XBEE factory reset function.
 
err_t xbee_get_serial_number (xbee_t *ctx)
 XBEE get serial number function.
 
err_t xbee_set_device_name (xbee_t *ctx, char *dev_name)
 XBEE set device name function.
 
err_t xbee_set_destination_address (xbee_t *ctx, char *dest_addr_high, char *dest_addr_low)
 XBEE set destination address function.
 
err_t xbee_set_api_mode (xbee_t *ctx, uint8_t api_mode)
 XBEE set api mode function.
 
err_t xbee_apply_changes (xbee_t *ctx)
 XBEE apply changes function.
 
err_t xbee_save_changes (xbee_t *ctx)
 XBEE save changes function.
 

Detailed Description

This file contains API for XBEE Click Driver.

Enumeration Type Documentation

◆ xbee_return_value_t

XBEE Click return value data.

Predefined enum values for driver return values.

Enumerator
XBEE_OK 
XBEE_ERROR