Example for updating the MTi-1's firmware. Uses a platform independent, retargetable pure C implementation of the firmware updater protocol.

Dependencies:   mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

FwUpdate Struct Reference

FwUpdate Struct Reference

FwUpdate object definition. More...

#include <fwupdate.h>

Data Fields

int(* m_readXffData )(uint8_t *buffer, int offset, int length)
 Callback function by which FwUpdate requests for xff data.
void(* m_sendXbusMessage )(struct XbusMessage const *xbusMessage)
 Callback function via which FwUpdate can send xbus messages to the module.
void(* m_readyHandler )(FWU_Result result)
 Callback function by which FwUpdate notifies the host that a firmware update has finished.
uint8_t * m_txBuffer
 Memory needed by the FwUpdate. Host must allocate a block of memory of size FWU_REQUIRED_TXBUFFER_SIZE.

Detailed Description

FwUpdate object definition.

Definition at line 70 of file fwupdate.h.


Field Documentation

int(* m_readXffData)(uint8_t *buffer, int offset, int length)

Callback function by which FwUpdate requests for xff data.

Parameters:
bufferTarget buffer in which the xff data should be written by the host
offsetOffset in the xff file where reading should start
lengthNumber of bytes which is requested
Returns:
Number of bytes which is actually written to the buffer

Definition at line 80 of file fwupdate.h.

void(* m_readyHandler)(FWU_Result result)

Callback function by which FwUpdate notifies the host that a firmware update has finished.

Parameters:
resultFWU_Success or FWU_Failed

Definition at line 90 of file fwupdate.h.

void(* m_sendXbusMessage)(struct XbusMessage const *xbusMessage)

Callback function via which FwUpdate can send xbus messages to the module.

Parameters:
xbusMessageXbus message that should be send to the module

Definition at line 85 of file fwupdate.h.

uint8_t* m_txBuffer

Memory needed by the FwUpdate. Host must allocate a block of memory of size FWU_REQUIRED_TXBUFFER_SIZE.

Definition at line 95 of file fwupdate.h.