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.

Callbacks#

Functions#

void
sli_zigbee_af_ota_storage_write_int32u_to_eeprom(uint32_t value, uint32_t realOffset)
void
sli_zigbee_af_storage_eeprom_update_download_offset(uint32_t offset, bool finalOffset)
bool
sli_zigbee_af_ota_storage_driver_get_real_offset(uint32_t *offset, uint32_t *length)

Macros#

#define
EEPROM_START SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_START
#define
EEPROM_END SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END
#define
SAVE_RATE SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_DOWNLOAD_OFFSET_SAVE_RATE
#define
#define
#define
SLOT_STRATEGY SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_GECKO_BOOTLOADER_STORAGE_SUPPORT
#define
#define
VERSION_NUMBER_INDEX (MAGIC_NUMBER_INDEX + MAGIC_NUMBER_SIZE)
#define
MAGIC_NUMBER 0x01, 0x09, 0x05, 0x01, 0x00, 0x02, 0x00, 0x00
#define
VERSION_NUMBER 0x00, 0x00, 0x00, 0x03
#define
EBL_START_OFFSET_INDEX (VERSION_NUMBER_INDEX + VERSION_NUMBER_SIZE)
#define
SAVED_DOWNLOAD_OFFSET_INDEX (EBL_START_OFFSET_INDEX + EBL_START_OFFSET_SIZE)
#define
OTA_HEADER_INDEX (SAVED_DOWNLOAD_OFFSET_INDEX + MAX_BYTEMASK_LENGTH)
#define
MAX_IMAGE_INFO_AND_OTA_HEADER_SIZE (MAX_BYTEMASK_LENGTH + 1024)
#define
MINIMUM_FILE_SIZE_TO_STORE_OFFSET (OTA_MINIMUM_HEADER_LENGTH)

API Documentation#

otaStorageEepromGetStorageStartAddress#

uint32_t otaStorageEepromGetStorageStartAddress ()

Definition at line 250 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

otaStorageEepromGetStorageEndAddress#

uint32_t otaStorageEepromGetStorageEndAddress ()

Definition at line 251 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

otaStorageEepromGetImageInfoStartAddress#

uint32_t otaStorageEepromGetImageInfoStartAddress ()

Definition at line 252 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

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)

Erase complete.

Parameters
N/Asuccess

The result of the erase operation. Ver.: always

Called when an EEPROM erase operation has completed.


Definition at line 273 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

Function Documentation#

sli_zigbee_af_ota_storage_write_int32u_to_eeprom#

void sli_zigbee_af_ota_storage_write_int32u_to_eeprom (uint32_t value, uint32_t realOffset)
Parameters
N/Avalue
N/ArealOffset

Definition at line 256 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

sli_zigbee_af_ota_storage_read_int32u_from_eeprom#

uint32_t sli_zigbee_af_ota_storage_read_int32u_from_eeprom (uint32_t realOffset)
Parameters
N/ArealOffset

Definition at line 257 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

sli_zigbee_af_storage_eeprom_update_download_offset#

void sli_zigbee_af_storage_eeprom_update_download_offset (uint32_t offset, bool finalOffset)
Parameters
N/Aoffset
N/AfinalOffset

Definition at line 258 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

sli_zigbee_af_ota_storage_driver_get_real_offset#

bool sli_zigbee_af_ota_storage_driver_get_real_offset (uint32_t * offset, uint32_t * length)
Parameters
N/Aoffset
N/Alength

Definition at line 260 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

Macro Definition Documentation#

SOC_BOOTLOADING_SUPPORT_ENABLED#

#define SOC_BOOTLOADING_SUPPORT_ENABLED
Value:
false

Definition at line 158 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

SOC_BOOTLOADING_SUPPORT_TEXT#

#define SOC_BOOTLOADING_SUPPORT_TEXT
Value:
"no"

Definition at line 159 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

READ_MODIFY_WRITE_SUPPORT_TEXT#

#define READ_MODIFY_WRITE_SUPPORT_TEXT
Value:
"no"

Definition at line 165 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

EEPROM_START#

#define EEPROM_START
Value:
SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_START

Definition at line 169 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

EEPROM_END#

#define EEPROM_END
Value:
SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END

Definition at line 170 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

SAVE_RATE#

#define SAVE_RATE
Value:
SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_DOWNLOAD_OFFSET_SAVE_RATE

Definition at line 171 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

DEFAULT_SLOT#

#define DEFAULT_SLOT
Value:
0

Definition at line 173 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

USE_FIRST_SLOT#

#define USE_FIRST_SLOT
Value:
0

Definition at line 174 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

USE_LAST_SLOT#

#define USE_LAST_SLOT
Value:
1

Definition at line 175 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

USE_SPECIFIC_SLOT#

#define USE_SPECIFIC_SLOT
Value:
2

Definition at line 176 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

DO_NOT_USE_SLOTS#

#define DO_NOT_USE_SLOTS
Value:
3

Definition at line 177 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

SLOT_STRATEGY#

#define SLOT_STRATEGY
Value:
SL_ZIGBEE_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_GECKO_BOOTLOADER_STORAGE_SUPPORT

Definition at line 178 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAX_WORD_SIZE#

#define MAX_WORD_SIZE
Value:
4

Definition at line 180 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAGIC_NUMBER_INDEX#

#define MAGIC_NUMBER_INDEX
Value:
0

Definition at line 184 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAGIC_NUMBER_SIZE#

#define MAGIC_NUMBER_SIZE
Value:
8

Definition at line 185 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

VERSION_NUMBER_INDEX#

#define VERSION_NUMBER_INDEX
Value:
(MAGIC_NUMBER_INDEX + MAGIC_NUMBER_SIZE)

Definition at line 186 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

VERSION_NUMBER_SIZE#

#define VERSION_NUMBER_SIZE
Value:
4

Definition at line 187 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAGIC_NUMBER#

#define MAGIC_NUMBER
Value:
0x01, 0x09, 0x05, 0x01, 0x00, 0x02, 0x00, 0x00

Definition at line 192 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

VERSION_NUMBER#

#define VERSION_NUMBER
Value:
0x00, 0x00, 0x00, 0x03

Definition at line 200 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

EBL_START_OFFSET_INDEX#

#define EBL_START_OFFSET_INDEX
Value:
(VERSION_NUMBER_INDEX + VERSION_NUMBER_SIZE)

Definition at line 208 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

EBL_START_OFFSET_SIZE#

#define EBL_START_OFFSET_SIZE
Value:
4

Definition at line 209 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

SAVED_DOWNLOAD_OFFSET_INDEX#

#define SAVED_DOWNLOAD_OFFSET_INDEX
Value:
(EBL_START_OFFSET_INDEX + EBL_START_OFFSET_SIZE)

Definition at line 216 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAX_BYTEMASK_LENGTH#

#define MAX_BYTEMASK_LENGTH
Value:
1024

Definition at line 234 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

OTA_HEADER_INDEX#

#define OTA_HEADER_INDEX
Value:
(SAVED_DOWNLOAD_OFFSET_INDEX + MAX_BYTEMASK_LENGTH)

Definition at line 237 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MAX_IMAGE_INFO_AND_OTA_HEADER_SIZE#

#define MAX_IMAGE_INFO_AND_OTA_HEADER_SIZE
Value:
(MAX_BYTEMASK_LENGTH + 1024)

Definition at line 239 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h

MINIMUM_FILE_SIZE_TO_STORE_OFFSET#

#define MINIMUM_FILE_SIZE_TO_STORE_OFFSET
Value:
(OTA_MINIMUM_HEADER_LENGTH)

Definition at line 243 of file app/framework/plugin/ota-storage-simple-eeprom/ota-storage-eeprom.h