AIROC™ BTSDK v4.8 - Documentation | ||||
Data Structures | |
struct | wiced_fw_upgrade_nv_loc_len_t |
struct | wiced_bt_application_id_t |
Macros | |
#define | OTA_FW_UPGRADE_CHUNK_SIZE_TO_COMMIT 512 |
Functions | |
wiced_bool_t | wiced_firmware_upgrade_init (wiced_fw_upgrade_nv_loc_len_t *p_sflash_nv_loc_len, uint32_t sflash_size) |
Initializes the AIROC Firmware Upgrade module. More... | |
uint32_t | wiced_firmware_upgrade_init_nv_locations (void) |
Initializes NV locations. More... | |
uint32_t | wiced_firmware_upgrade_store_to_nv (uint32_t offset, uint8_t *data, uint32_t len) |
Stores a memory chunk to memory. More... | |
uint32_t | wiced_firmware_upgrade_retrieve_from_nv (uint32_t offset, uint8_t *data, uint32_t len) |
Retrieves a memory chunk from memory. More... | |
void | wiced_firmware_upgrade_finish (void) |
Retrieves a memory chunk from memory. More... | |
wiced_bool_t | wiced_get_current_app_id_and_version (wiced_bt_application_id_t *app_id_and_version) |
Retrieves application version information from nvram. More... | |
void wiced_firmware_upgrade_finish | ( | void | ) |
Retrieves a memory chunk from memory.
The application calls this function after download is completed and verified, to switch active partitions with the one that received a new image.
wiced_bool_t wiced_firmware_upgrade_init | ( | wiced_fw_upgrade_nv_loc_len_t * | p_sflash_nv_loc_len, |
uint32_t | sflash_size | ||
) |
Initializes the AIROC Firmware Upgrade module.
Called by the application during initialization to initialize the upgrade module with serial flash offsets.
p_sflash_nv_loc_len | Offsets of different sections present in serial flash. |
sflash_size | Serial flash size present on the tag board (default size 4MB ). |
uint32_t wiced_firmware_upgrade_init_nv_locations | ( | void | ) |
Initializes NV locations.
The application calls this function during a start of firmware download to set up memory locations depending on which partition is being used.
uint32_t wiced_firmware_upgrade_retrieve_from_nv | ( | uint32_t | offset, |
uint8_t * | data, | ||
uint32_t | len | ||
) |
Retrieves a memory chunk from memory.
The application calls this function when an upgrade process is completed to verify data was successfully stored. The application does not need to know which type of memory is used or which partition is being upgraded.
offset | Offset in the memory to retrieve data from. |
data | The pointer to the location to retrieve data. |
len | The size of a memory chunk to retrieve. |
uint32_t wiced_firmware_upgrade_store_to_nv | ( | uint32_t | offset, |
uint8_t * | data, | ||
uint32_t | len | ||
) |
Stores a memory chunk to memory.
The application can call this function to store a next memory chunk in none-volatile memory. The application does not need to know which type of memory is used or which partition is being upgraded.
offset | Offset in the memory to store data. |
data | The pointer to a chunk of data to store. |
len | The size of a memory chunk to store. |
wiced_bool_t wiced_get_current_app_id_and_version | ( | wiced_bt_application_id_t * | app_id_and_version | ) |
Retrieves application version information from nvram.
The application calls this function to retrieve the appplication id and version to compare with the downloaded image.