OTA Storage Common#
API and Callbacks for the OTA Storage Common Component.
Common code for any storage module implementing an Over-the-Air bootload cluster. It is used by either the Zigbee or legacy Ember Standalone bootloader implementations.
Modules#
API#
bool
sl_zigbee_af_is_ota_image_id_valid(const sl_zigbee_af_ota_image_id_t *idToCompare)
Macros#
#define
OTA_MINIMUM_HEADER_LENGTH (20 + 32 + 4)
#define
OTA_MAXIMUM_HEADER_LENGTH (OTA_MINIMUM_HEADER_LENGTH + 1 + 32 + 4)
#define
OTA_MAXIMUM_HEADER_LENGTH_2_BYTE_ALIGNED (OTA_MAXIMUM_HEADER_LENGTH + 1)
#define
OTA_MAXIMUM_HEADER_LENGTH_4_BYTE_ALIGNED (OTA_MAXIMUM_HEADER_LENGTH + 3)
#define
OTA_FILE_MAGIC_NUMBER 0x0BEEF11EL
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
TAG_OVERHEAD (2 + 4)
#define
isValidHeaderVersion (headerVersion)
#define
#define
#define
#define
headerHasSecurityCredentials (header)
#define
headerHasUpgradeFileDest (header)
#define
headerHasHardwareVersions (header)
#define
SIGNATURE_TAG_DATA_SIZE (EUI64_SIZE + SL_ZIGBEE_SIGNATURE_SIZE)
#define
SIGNATURE_283K1_TAG_DATA_SIZE (EUI64_SIZE + SL_ZIGBEE_SIGNATURE_283K1_SIZE)
#define
INVALID_MANUFACTURER_ID 0xFFFF
#define
INVALID_DEVICE_ID 0xFFFF
#define
INVALID_FIRMWARE_VERSION 0xFFFFFFFFUL
#define
INVALID_EUI64 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define
INVALID_OTA_IMAGE_ID undefined
#define
INVALID_SLOT (uint32_t)-1
#define
API Documentation#
sl_zigbee_af_is_ota_image_id_valid#
bool sl_zigbee_af_is_ota_image_id_valid (const sl_zigbee_af_ota_image_id_t * idToCompare)
Parameters
N/A | idToCompare |
Definition at line
107
of file app/framework/plugin/ota-storage-common/ota-storage.h
Macro Definition Documentation#
OTA_MINIMUM_HEADER_LENGTH#
#define OTA_MINIMUM_HEADER_LENGTHValue:
(20 + 32 + 4)
Definition at line
39
of file app/framework/plugin/ota-storage-common/ota-storage.h
OTA_MAXIMUM_HEADER_LENGTH#
#define OTA_MAXIMUM_HEADER_LENGTHValue:
(OTA_MINIMUM_HEADER_LENGTH + 1 + 32 + 4)
Definition at line
41
of file app/framework/plugin/ota-storage-common/ota-storage.h
OTA_MAXIMUM_HEADER_LENGTH_2_BYTE_ALIGNED#
#define OTA_MAXIMUM_HEADER_LENGTH_2_BYTE_ALIGNEDValue:
(OTA_MAXIMUM_HEADER_LENGTH + 1)
Definition at line
45
of file app/framework/plugin/ota-storage-common/ota-storage.h
OTA_MAXIMUM_HEADER_LENGTH_4_BYTE_ALIGNED#
#define OTA_MAXIMUM_HEADER_LENGTH_4_BYTE_ALIGNEDValue:
(OTA_MAXIMUM_HEADER_LENGTH + 3)
Definition at line
46
of file app/framework/plugin/ota-storage-common/ota-storage.h
OTA_FILE_MAGIC_NUMBER#
#define OTA_FILE_MAGIC_NUMBERValue:
0x0BEEF11EL
Definition at line
48
of file app/framework/plugin/ota-storage-common/ota-storage.h
MAGIC_NUMBER_OFFSET#
#define MAGIC_NUMBER_OFFSETValue:
0
Definition at line
50
of file app/framework/plugin/ota-storage-common/ota-storage.h
HEADER_VERSION_OFFSET#
#define HEADER_VERSION_OFFSETValue:
4
Definition at line
51
of file app/framework/plugin/ota-storage-common/ota-storage.h
HEADER_LENGTH_OFFSET#
#define HEADER_LENGTH_OFFSETValue:
6
Definition at line
52
of file app/framework/plugin/ota-storage-common/ota-storage.h
FIELD_CONTROL_OFFSET#
#define FIELD_CONTROL_OFFSETValue:
8
Definition at line
53
of file app/framework/plugin/ota-storage-common/ota-storage.h
MANUFACTURER_ID_OFFSET#
#define MANUFACTURER_ID_OFFSETValue:
10
Definition at line
54
of file app/framework/plugin/ota-storage-common/ota-storage.h
IMAGE_TYPE_ID_OFFSET#
#define IMAGE_TYPE_ID_OFFSETValue:
12
Definition at line
55
of file app/framework/plugin/ota-storage-common/ota-storage.h
VERSION_OFFSET#
#define VERSION_OFFSETValue:
14
Definition at line
56
of file app/framework/plugin/ota-storage-common/ota-storage.h
STACK_VERSION_OFFSET#
#define STACK_VERSION_OFFSETValue:
18
Definition at line
57
of file app/framework/plugin/ota-storage-common/ota-storage.h
HEADER_STRING_OFFSET#
#define HEADER_STRING_OFFSETValue:
20
Definition at line
58
of file app/framework/plugin/ota-storage-common/ota-storage.h
IMAGE_SIZE_OFFSET#
#define IMAGE_SIZE_OFFSETValue:
52
Definition at line
59
of file app/framework/plugin/ota-storage-common/ota-storage.h
OPTIONAL_FIELDS_OFFSET#
#define OPTIONAL_FIELDS_OFFSETValue:
56
Definition at line
60
of file app/framework/plugin/ota-storage-common/ota-storage.h
HEADER_LENGTH_FIELD_LENGTH#
#define HEADER_LENGTH_FIELD_LENGTHValue:
2
Definition at line
63
of file app/framework/plugin/ota-storage-common/ota-storage.h
TAG_OVERHEAD#
#define TAG_OVERHEADValue:
(2 + 4)
Definition at line
65
of file app/framework/plugin/ota-storage-common/ota-storage.h
isValidHeaderVersion#
#define isValidHeaderVersionValue:
(headerVersion)
Definition at line
67
of file app/framework/plugin/ota-storage-common/ota-storage.h
SECURITY_CREDENTIAL_VERSION_FIELD_PRESENT_MASK#
#define SECURITY_CREDENTIAL_VERSION_FIELD_PRESENT_MASKValue:
0x0001
Definition at line
70
of file app/framework/plugin/ota-storage-common/ota-storage.h
DEVICE_SPECIFIC_FILE_PRESENT_MASK#
#define DEVICE_SPECIFIC_FILE_PRESENT_MASKValue:
0x0002
Definition at line
71
of file app/framework/plugin/ota-storage-common/ota-storage.h
HARDWARE_VERSIONS_PRESENT_MASK#
#define HARDWARE_VERSIONS_PRESENT_MASKValue:
0x0004
Definition at line
72
of file app/framework/plugin/ota-storage-common/ota-storage.h
headerHasSecurityCredentials#
#define headerHasSecurityCredentialsValue:
(header)
Definition at line
74
of file app/framework/plugin/ota-storage-common/ota-storage.h
headerHasUpgradeFileDest#
#define headerHasUpgradeFileDestValue:
(header)
Definition at line
76
of file app/framework/plugin/ota-storage-common/ota-storage.h
headerHasHardwareVersions#
#define headerHasHardwareVersionsValue:
(header)
Definition at line
78
of file app/framework/plugin/ota-storage-common/ota-storage.h
SIGNATURE_TAG_DATA_SIZE#
#define SIGNATURE_TAG_DATA_SIZEValue:
(EUI64_SIZE + SL_ZIGBEE_SIGNATURE_SIZE)
Definition at line
82
of file app/framework/plugin/ota-storage-common/ota-storage.h
SIGNATURE_283K1_TAG_DATA_SIZE#
#define SIGNATURE_283K1_TAG_DATA_SIZEValue:
(EUI64_SIZE + SL_ZIGBEE_SIGNATURE_283K1_SIZE)
Definition at line
83
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_MANUFACTURER_ID#
#define INVALID_MANUFACTURER_IDValue:
0xFFFF
Definition at line
85
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_DEVICE_ID#
#define INVALID_DEVICE_IDValue:
0xFFFF
Definition at line
86
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_FIRMWARE_VERSION#
#define INVALID_FIRMWARE_VERSIONValue:
0xFFFFFFFFUL
Definition at line
87
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_EUI64#
#define INVALID_EUI64Value:
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
Definition at line
88
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_OTA_IMAGE_ID#
#define INVALID_OTA_IMAGE_IDValue:
{ INVALID_MANUFACTURER_ID, \
INVALID_DEVICE_ID, \
INVALID_FIRMWARE_VERSION, \
INVALID_EUI64, \
}
Definition at line
90
of file app/framework/plugin/ota-storage-common/ota-storage.h
INVALID_SLOT#
#define INVALID_SLOTValue:
(uint32_t)-1
Definition at line
97
of file app/framework/plugin/ota-storage-common/ota-storage.h
DEFAULT_SLOT#
#define DEFAULT_SLOTValue:
0
Definition at line
100
of file app/framework/plugin/ota-storage-common/ota-storage.h