XBee Firmware Library  1.6.0
Typedefs | Enumerations | Functions | Variables
xbee_firmware.c File Reference

Typedefs

typedef PACKED_STRUCT _xbee_oem_header
 

Enumerations

enum  {
  XBEE_FW_STATE_INIT, XBEE_FW_STATE_RESET, XBEE_FW_STATE_TOGGLE, XBEE_FW_STATE_BREAK,
  XBEE_FW_STATE_PROMPT, XBEE_FW_STATE_XMODEM_WAIT, XBEE_FW_STATE_XMODEM_SEND, XBEE_FW_STATE_XMODEM_DONE,
  XBEE_FW_STATE_FINAL_PROMPT, XBEE_FW_STATE_CMD_PENDING, XBEE_FW_STATE_CMD, XBEE_FW_STATE_PARSE_RESPONSE,
  XBEE_FW_STATE_CMD_HV, XBEE_FW_STATE_CMD_COMPAT, XBEE_FW_STATE_CMD_VR, XBEE_FW_STATE_CMD_CF1,
  XBEE_FW_STATE_CMD_SL, XBEE_FW_STATE_CMD_PROG, XBEE_FW_STATE_CMD_FR, XBEE_FW_STATE_BOOTLOADER,
  XBEE_FW_STATE_TX_START, XBEE_FW_STATE_TX_BLOCK, XBEE_FW_STATE_SENDING, XBEE_FW_STATE_RX_BLOCK,
  XBEE_FW_STATE_RX_FAIL, XBEE_FW_STATE_DONE, XBEE_FW_STATE_FAILURE, XBEE_FW_STATE_SUCCESS
}
 

Functions

_xbee_firmware_debug int _xbee_fw_buffer_read (void FAR *context, void FAR *buffer, int16_t bytes)
 
_xbee_firmware_debug int _xbee_fw_buffer_seek (void FAR *context, uint32_t offset)
 
_xbee_firmware_debug int _xbee_fw_send_request (xbee_fw_source_t *source, const FAR char *request, int next_state)
 
_xbee_firmware_debug int _xbee_oem_verify (xbee_fw_source_t *source)
 
int xbee_fw_buffer_init (xbee_fw_buffer_t *fw, uint32_t length, const char FAR *address)
 Helper function for setting up an xbee_fw_buffer_t for use with a source firmware image held entirely in a buffer. More...
 
_xbee_firmware_debug uint16_t xbee_fw_hex2word (const char *pString)
 
unsigned int xbee_fw_install_ebl_state (xbee_fw_source_t *source)
 Returns a unique value indicating the state of the .EBL install process. More...
 
int xbee_fw_install_ebl_tick (xbee_fw_source_t *source)
 Drive the firmware update process for boards that use .EBL files to store their firmware. More...
 
int xbee_fw_install_hcs08_tick (xbee_fw_source_t *source)
 Drive the firmware update process for the HCS08 application on Programmable XBee modules. More...
 
int xbee_fw_install_init (xbee_dev_t *xbee, const wpan_address_t FAR *target, xbee_fw_source_t *source)
 Prepare to install new firmware on an attached XBee module. More...
 
int xbee_fw_install_oem_tick (xbee_fw_source_t *source)
 Install the firmware image stored in source. More...
 
_xbee_firmware_debug int xbee_fw_read_byte (xbee_fw_source_t *source)
 check return value of source->read here and in _uint16 and _uint32? More...
 
_xbee_firmware_debug uint16_t xbee_fw_read_uint16 (xbee_fw_source_t *source)
 
_xbee_firmware_debug uint32_t xbee_fw_read_uint32 (xbee_fw_source_t *source)
 
char FAR * xbee_fw_status_ebl (xbee_fw_source_t *source, char FAR *buffer)
 Update buffer with the current install status of source. Note that this string will only change if the return value of xbee_fw_install_ebl_state() has changed. More...
 
char FAR * xbee_fw_status_oem (xbee_fw_source_t *source, char FAR *buffer)
 Update buffer with the current install status of source. More...
 

Variables

uint16_t checksum
 
uint16_t header_len
 
uint32_t image_len
 
uint8_t module_id
 
uint8_t software_id
 
 xbee_oem_header_t
 

Detailed Description

API related to updating XBee firmware on the local XBee module. This could grow to support OTA (Over The Air) updates, via an expanded API.

Include helper API for initiating an update via firmware loaded to a far char buffer. An additional xbee_firmware_fat.lib could include helper functions for installing firmware from a file on the FAT filesystem.

Define XBEE_FIRMWARE_VERBOSE for debugging messages.

Define XBEE_FIRMWARE_DEBUG to make the functions in this file debuggable.