Digi XBee(R) ANSI C Host Library
Data Structures | Macros | Enumerations | Functions
bl_gen3.h File Reference

Code to interface with the "Gen3" XBee bootloader. More...

#include "xbee/device.h"
#include "wpan/types.h"

Go to the source code of this file.

Data Structures

struct  xbee_gen3_extended_ver_t
 
struct  xbee_gen3_update_t
 

Macros

#define XBEE_GEN3_UPLOAD_PAGE_SIZE   512
 
#define XBEE_GEN3_BL_FLAG_RETRY_MASK   (0xFF)
 count retries on upload
 
#define XBEE_GEN3_BL_FLAG_QUERY_ONLY   (1<<8)
 don't upload firmware
 
#define XBEE_GEN3_BL_FLAG_PROTO1   (1<<9)
 upload uses CRC16
 
#define XBEE_GEN3_BL_FLAG_EOF   (1<<10)
 reached end of fw image
 
#define XBEE_GEN3_FW_LOAD_TIMEOUT_MS   10000
 
#define XBEE_GEN3_STATUS_BUF_SIZE   60
 Minimum size of buffer passed to xbee_bl_gen3_install_status()
 

Enumerations

enum  xbee_gen3_state_t {
  XBEE_GEN3_STATE_INIT, XBEE_GEN3_STATE_ENTER_BOOTLOADER, XBEE_GEN3_STATE_GET_BL_VERSION, XBEE_GEN3_STATE_BL_VERSION,
  XBEE_GEN3_STATE_BL_PROTOCOL, XBEE_GEN3_STATE_BAUD_RATE, XBEE_GEN3_STATE_EXT_VERSION, XBEE_GEN3_STATE_START_TRANSFER,
  XBEE_GEN3_STATE_SEND_PAGE, XBEE_GEN3_STATE_LOAD_PAGE, XBEE_GEN3_STATE_VERIFY, XBEE_GEN3_STATE_SUCCESS,
  XBEE_GEN3_STATE_FAILURE
}
 

Functions

void xbee_gen3_dump_extended_ver (const xbee_gen3_extended_ver_t *ver)
 
int xbee_bl_gen3_install_init (xbee_dev_t *xbee, xbee_gen3_update_t *source)
 Prepare to install new firmware on an attached XBee module. More...
 
uint16_t xbee_bl_gen3_install_state (xbee_gen3_update_t *source)
 Return a unique value identifying the install state. More...
 
int xbee_bl_gen3_install_tick (xbee_gen3_update_t *source)
 Install the firmware image stored in source. More...
 
const char * xbee_bl_gen3_install_status (xbee_gen3_update_t *source, char buffer[XBEE_GEN3_STATUS_BUF_SIZE])
 Return a string describing the current state of the firmware update. More...
 

Detailed Description

Code to interface with the "Gen3" XBee bootloader.

See src/xbee/xbee_bl_gen3.c for additional documentation.