OTA Storage Simple EEPROM#
API and Callbacks for the OTA Storage Simple EEPROM Component.
This is a driver for the Over-the-Air simple storage module component. It uses an EEPROM as the underlying storage device. It provides a means to record data being read or written, as well as metadata with information about how far along a client download is. It can be used either by an OTA Client or an OTA Server. Note that this component assumes that the flash storage does not have read-modify-write support. Users should ensure this value matches the flash storage device used by the application. A mismatch between the project-configured value and the actual flash storage support value will result in an application that asserts upon startup.
API#
Returns the OTA Storage EEPROM starting address. This is determined by either ::SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_START or the slot start address, if using slots.
Returns the OTA Storage EEPROM end address. This is determined by either ::SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END or the slot end address, if using slots.
Returns the OTA Storage EEPROM image information start address.
Callbacks#
Function callback after an EEPROM erase operation completes.
Macros#
This is configured by SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_SOC_BOOTLOADING_SUPPORT in ota-storage-simple-eeprom-config.h.
SOC Read-Modify-Write Support which is configured by: SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_READ_MODIFY_WRITE_SUPPORT in ota-storage-simple-eeprom-config.h.
The begining of the OTA Storage slot.
This is the last offset for where the OTA image may be stored in the EEPROM.
Frequency for Saving Download Offset to EEPROM in bytes.
The SLOT_STRATEGY defines if the Gecko Bootloader Storage Support.
Magic number to indicate that the stored download meta-data is valid.
Version number information:
0x00000001 - Addition of the Page-erase required support
0x00000002 - Support for 2-byte word sizes (previously-previously 1-byte was assumed)
0X00000003 - Support for 4-byte word sizes (previously 2-byte was assumed)
We changed the size of the bytemask to 512 to support Local Storage which means bumping the version number.
The Offset within the OTA file (relative to offset 0) where the GBL data starts.
The last recorded offset we downloaded.
Limits the maximum size of the download image because it determines how many pages we can record as "fully downloaded".
The OTA header index.
The maximum image information and OTA header size.
The minimum offset we will write that determines if we store the current download offset persistently.
API Documentation#
otaStorageEepromGetStorageStartAddress#
uint32_t otaStorageEepromGetStorageStartAddress ()
Returns the OTA Storage EEPROM starting address. This is determined by either ::SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_START or the slot start address, if using slots.
Returns
A ::uint32_t value indicating the starting address
otaStorageEepromGetStorageEndAddress#
uint32_t otaStorageEepromGetStorageEndAddress ()
Returns the OTA Storage EEPROM end address. This is determined by either ::SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END or the slot end address, if using slots.
Returns
A ::uint32_t value indicating the end address.
otaStorageEepromGetImageInfoStartAddress#
uint32_t otaStorageEepromGetImageInfoStartAddress ()
Returns the OTA Storage EEPROM image information start address.
Returns
A ::uint32_t value indicating the image information start address
Callbacks Documentation#
sl_zigbee_af_ota_storage_simple_eeprom_erase_complete_cb#
void sl_zigbee_af_ota_storage_simple_eeprom_erase_complete_cb (bool success)
Function callback after an EEPROM erase operation completes.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | [out] | success | The result of the erase operation. Ver.: always |
The input parameter will be set to true if the EEPROM erase returned :EEPROM_SUCCESS.