Go to the source code of this file.
Macros | |
#define | FWUP_CRITICAL (unsigned char)0x46 |
#define | FWUP_CSERROR (unsigned char)0x45 |
#define | FWUP_DEFAULT_SLICE_SIZE (64) |
#define | FWUP_FINISHED (unsigned char)0x46 |
#define | FWUP_HEADER (unsigned char)0x53 |
#define | FWUP_OK (unsigned char)0x53 |
#define | FWUP_OTHER (unsigned char)0x4F |
#define | FWUP_PAGE (unsigned char)0x50 |
#define | FWUP_PAGESLICE (unsigned char)0x54 |
#define | FWUP_READY (unsigned char)0x52 |
Firmware updater commands. More... | |
#define | FWUP_STARTED (unsigned char)0x41 |
#define | LOG(...) |
#define | XMID_FIRMWARE_UPDATE (0xF2) |
Functions | |
const char * | ackToString (uint8_t command) |
Helper function for converting a firmware updater command acknowledge to a string. More... | |
const char * | commandToString (uint8_t command) |
Helper function for converting a firmware updater command to a string. More... | |
static void | enterNewSection (FwUpdate *thisPtr) |
Enter the next section of the xff file. More... | |
void | FwUpdate_handleXbus (FwUpdate *thisPtr, uint8_t const *xbusMessage) |
Handle xbus message coming from the module. More... | |
void | FwUpdate_init (FwUpdate *thisPtr) |
Initialize a FwUpdate instance. More... | |
void | FwUpdate_start (FwUpdate *thisPtr) |
Start a firmware update. More... | |
uint16_t | readUint16 (FwUpdate *thisPtr) |
Read a uint16_t from the current position in the xff. More... | |
uint32_t | readUint32 (FwUpdate *thisPtr) |
Read a uint32_t from the current position in the xff. More... | |
uint8_t | readUint8 (FwUpdate *thisPtr) |
Read a uint8_t from the current position in the xff. More... | |
static void | readXffHeader (FwUpdate *thisPtr) |
Read an Xff header from the current position in the xff. More... | |
static void | sendFinished (FwUpdate *thisPtr) |
Send a FWUP_FINISHED command. More... | |
static void | sendHeader (FwUpdate *thisPtr) |
Send a FWUP_HEADER command. More... | |
static void | sendOther (FwUpdate *thisPtr) |
Send a FWUP_OTHER command. More... | |
static void | sendReady (FwUpdate *thisPtr) |
Send a FWUP_READY command. More... | |
static void | sendSlice (FwUpdate *thisPtr) |
Send a page slice. More... | |
#define FWUP_CRITICAL (unsigned char)0x46 |
Definition at line 83 of file fwupdate.c.
#define FWUP_CSERROR (unsigned char)0x45 |
Definition at line 82 of file fwupdate.c.
#define FWUP_DEFAULT_SLICE_SIZE (64) |
Definition at line 75 of file fwupdate.c.
#define FWUP_FINISHED (unsigned char)0x46 |
Definition at line 84 of file fwupdate.c.
#define FWUP_HEADER (unsigned char)0x53 |
Definition at line 86 of file fwupdate.c.
#define FWUP_OK (unsigned char)0x53 |
Definition at line 81 of file fwupdate.c.
#define FWUP_OTHER (unsigned char)0x4F |
Definition at line 89 of file fwupdate.c.
#define FWUP_PAGE (unsigned char)0x50 |
Definition at line 85 of file fwupdate.c.
#define FWUP_PAGESLICE (unsigned char)0x54 |
Definition at line 87 of file fwupdate.c.
#define FWUP_READY (unsigned char)0x52 |
Firmware updater commands.
Definition at line 80 of file fwupdate.c.
#define FWUP_STARTED (unsigned char)0x41 |
Definition at line 88 of file fwupdate.c.
#define LOG | ( | ... | ) |
Definition at line 70 of file fwupdate.c.
#define XMID_FIRMWARE_UPDATE (0xF2) |
Definition at line 73 of file fwupdate.c.
const char* ackToString | ( | uint8_t | command | ) |
Helper function for converting a firmware updater command acknowledge to a string.
Definition at line 120 of file fwupdate.c.
const char* commandToString | ( | uint8_t | command | ) |
Helper function for converting a firmware updater command to a string.
Definition at line 94 of file fwupdate.c.
|
static |
Enter the next section of the xff file.
Definition at line 338 of file fwupdate.c.
void FwUpdate_handleXbus | ( | FwUpdate * | thisPtr, |
uint8_t const * | xbusMessage | ||
) |
Handle xbus message coming from the module.
xbusMessage | The xbus message from the module to be handled |
Definition at line 382 of file fwupdate.c.
void FwUpdate_init | ( | FwUpdate * | thisPtr | ) |
Initialize a FwUpdate instance.
Definition at line 352 of file fwupdate.c.
void FwUpdate_start | ( | FwUpdate * | thisPtr | ) |
Start a firmware update.
Definition at line 361 of file fwupdate.c.
uint16_t readUint16 | ( | FwUpdate * | thisPtr | ) |
Read a uint16_t from the current position in the xff.
Definition at line 167 of file fwupdate.c.
Read a uint32_t from the current position in the xff.
Definition at line 148 of file fwupdate.c.
uint8_t readUint8 | ( | FwUpdate * | thisPtr | ) |
Read a uint8_t from the current position in the xff.
Definition at line 186 of file fwupdate.c.
|
static |
Read an Xff header from the current position in the xff.
Definition at line 205 of file fwupdate.c.
|
static |
Send a FWUP_FINISHED command.
Definition at line 325 of file fwupdate.c.
|
static |
Send a FWUP_HEADER command.
Definition at line 268 of file fwupdate.c.
|
static |
Send a FWUP_OTHER command.
Definition at line 311 of file fwupdate.c.
|
static |
Send a FWUP_READY command.
Definition at line 257 of file fwupdate.c.
|
static |
Send a page slice.
Definition at line 289 of file fwupdate.c.