XBee Firmware Library  1.6.0
Data Structures | Typedefs | Enumerations | Functions

Data Structures

struct  xbee_xmodem_state_t
 

Typedefs

typedef int(* xbee_xmodem_read_fn) (void FAR *context, void FAR *buffer, int16_t bytes)
 Function to assign to file.read or stream.read member of an xbee_xmodem_state_t object. More...
 
typedef struct xbee_xmodem_state_t xbee_xmodem_state_t
 
typedef int(* xbee_xmodem_write_fn) (void FAR *context, const void FAR *buffer, int16_t bytes)
 Function to assign to stream.write member of an xbee_xmodem_state_t object. More...
 

Enumerations

enum  xbee_xmodem_state {
  XBEE_XMODEM_STATE_FLUSH, XBEE_XMODEM_STATE_START, XBEE_XMODEM_STATE_SEND, XBEE_XMODEM_STATE_RESEND,
  XBEE_XMODEM_STATE_SENDING, XBEE_XMODEM_STATE_WAIT_ACK, XBEE_XMODEM_STATE_EOF, XBEE_XMODEM_STATE_FINAL_ACK,
  XBEE_XMODEM_STATE_SUCCESS, XBEE_XMODEM_STATE_FAILURE
}
 

Functions

int xbee_xmodem_set_source (xbee_xmodem_state_t *xbxm, void FAR *buffer, xbee_xmodem_read_fn read, const void FAR *context)
 Configure the data source for the Xmodem send. More...
 
int xbee_xmodem_set_stream (xbee_xmodem_state_t *xbxm, xbee_xmodem_read_fn read, xbee_xmodem_write_fn write, const void FAR *context)
 Configure the stream used to communicate with the target. More...
 
int xbee_xmodem_tx_init (xbee_xmodem_state_t *xbxm, uint16_t flags)
 Initialize state structure for use with xbee_xmodem_tx_tick() to send a file via Xmodem. More...
 
int xbee_xmodem_tx_tick (xbee_xmodem_state_t *xbxm)
 Function to drive the Xmodem send state machine. Call until it returns a non-zero result. More...
 
int xbee_xmodem_use_serport (xbee_xmodem_state_t *xbxm, xbee_serial_t *serport)
 Used for xmodem transfers over a simple serial port. More...
 

Detailed Description

Xmodem API used with firmware updates.

Makes use of xbee/serial.h API for sending and receiving serial data.