Digi XBee(R) ANSI C Host Library
|
Code for decoding headers from Ember firmware images (.EBL files). More...
#include "xbee/platform.h"
Go to the source code of this file.
Data Structures | |
struct | em3xx_header_t |
Header for EM3XX-based firmware images. More... | |
struct | em2xx_header_t |
Header for EM2XX-based firmware images. More... | |
union | ebl_file_header_t |
Union of header formats for all Ember firmware images. More... | |
struct | micro_info_t |
Structure used to hold table of micro_info values from EM3XX header. More... | |
struct | platform_info_t |
Structure used to hold table of plat_info values from EM3XX header. More... | |
Macros | |
#define | IMAGE_INFO_MAXLEN 32 |
#define | EBLTAG_HEADER 0x0000 |
#define | IMAGE_SIGNATURE_EM250 0xE250 |
signature_be field for EM250 firmware images | |
#define | IMAGE_SIGNATURE_EM260 0xE260 |
signature_be field for EM260 firmware images | |
#define | IMAGE_SIGNATURE_EM350 0xE350 |
signature_be field for EM351/EM357 firmware images | |
#define | MICRO_INFO_END { 0xFF, NULL } |
#define | PLATFORM_INFO_END { 0xFF, NULL } |
#define | EBL_HEADER_DUMP_TARGET_DESC (1<<0) |
#define | EBL_HEADER_DUMP_PHY_DESC (1<<1) |
#define | EBL_HEADER_DUMP_EMBER_VER (1<<2) |
#define | EBL_HEADER_DUMP_TIMESTAMP (1<<3) |
#define | EBL_HEADER_DUMP_IMAGE_INFO (1<<4) |
#define | EBL_HEADER_DUMP_EVERYTHING 0xFFFF |
Functions | |
const char * | ebl_target_desc (uint8_t plat_info, uint8_t micro_info) |
Returns a description of the platform based on the plat_info and micro_info fields in the em3xx_header_t structure. More... | |
const char * | ebl_phy_desc (uint8_t phy_info) |
Returns a description of the PHY based on the phy_info field in the em3xx_header_t structure. More... | |
int | ebl_header_dump (const void *buffer, uint16_t flags) |
Prints a description of the .EBL file header. More... | |
Variables | |
const platform_info_t | platform_info [] |
Table of tables used to decode plat_info and micro_info fields from .EBL file header. More... | |
Code for decoding headers from Ember firmware images (.EBL files).
int ebl_header_dump | ( | const void * | buffer, |
uint16_t | flags | ||
) |
Prints a description of the .EBL file header.
[in] | buffer | buffer with first 128 bytes of .EBL file |
[in] | flags | combination of the following macros:
|
-EINVAL | invalid parameter passed to function |
-EILSEQ | not a valid EBL file header |
0 | parsed header and printed info |
References be16toh, ebl_file_header_t::common, ebl_file_header_t::ebltag_be, EILSEQ, EINVAL, IMAGE_SIGNATURE_EM250, IMAGE_SIGNATURE_EM260, IMAGE_SIGNATURE_EM350, and ebl_file_header_t::signature_be.
const char* ebl_phy_desc | ( | uint8_t | phy_info | ) |
Returns a description of the PHY based on the phy_info field in the em3xx_header_t structure.
[in] | phy_info | phy_info field from EM3xx file header |
References be32toh, ebl_target_desc(), em3xx_header_t::image_info, em2xx_header_t::image_info, le32toh, em3xx_header_t::micro_info, em3xx_header_t::phy_info, em3xx_header_t::plat_info, em2xx_header_t::timestamp_be, em3xx_header_t::timestamp_le, ZCL_TIME_EPOCH_DELTA_1970, em3xx_header_t::znet_build, and em3xx_header_t::znet_release.
Returns a description of the platform based on the plat_info and micro_info fields in the em3xx_header_t structure.
[in] | plat_info | plat_info field from EM3xx file header |
[in] | micro_info | micro_info field from EM3xx file header |
Referenced by ebl_phy_desc().
const platform_info_t platform_info[] |
Table of tables used to decode plat_info and micro_info fields from .EBL file header.