Trident IoT Zigbee SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
tr_osif_ota.h File Reference

Declarations for hardware interface functions for the OTA bootloading client plugin. More...

Go to the source code of this file.

Macros

#define MULTIPLE_OF_32K(Add)   ((((Add) & (0x8000 - 1)) == 0) ? 1 : 0)
 
#define MULTIPLE_OF_64K(Add)   ((((Add) & (0x10000 - 1)) == 0) ? 1 : 0)
 
#define SIZE_OF_FLASH_SECTOR_ERASE   4096
 
#define OTA_FLASH_WRITE_SIZE   2048
 
#define OTA_FLASH_WRITE_BUF_SIZE   (2 * OTA_FLASH_WRITE_SIZE)
 

Functions

zb_zcl_ota_upgrade_file_header_t * tr_ota_upgrade_client_get_ota_header (void)
 
void tr_osif_ota_flash_set_write_addr (zb_uint32_t write_offset)
 
void * zb_osif_ota_open_storage (void)
 
zb_bool_t zb_osif_ota_fw_size_ok (zb_uint32_t image_size)
 
zb_uint32_t zb_osif_ota_get_erase_portion (void)
 
void zb_osif_ota_erase_fw (void *dev, zb_uint_t offset, zb_uint32_t size)
 
void zb_osif_ota_write (void *dev, zb_uint8_t *data, zb_uint_t off, zb_uint_t size, zb_uint32_t image_size)
 
void zb_osif_ota_write_last_data (void)
 
zb_bool_t tr_osif_ota_mark_fw_ready (void *dev, zb_uint32_t size, zb_uint32_t revision)
 
void zb_osif_upgrade_now ()
 
void zb_osif_ota_mark_fw_absent (void)
 
void zb_osif_ota_mark_fw_updated (void)
 
void zb_osif_ota_close_storage (void *dev)
 
zb_bool_t zb_osif_ota_verify_integrity (void *dev, zb_uint32_t raw_len)
 
void zb_osif_ota_read (void *dev, zb_uint8_t *data, zb_uint32_t addr, zb_uint32_t size)
 
zb_bool_t zb_osif_ota_verify_integrity_async (void *dev, zb_uint32_t raw_len)
 
zb_uint8_t zb_erase_fw (zb_uint32_t address, zb_uint32_t pages_count)
 
zb_uint8_t zb_write_fw (zb_uint32_t address, zb_uint8_t *buf, zb_uint16_t len)
 
void Hash16_Calc (zb_uint32_t pBuffer, zb_uint32_t BufferLength, zb_uint8_t *hash16)
 

Detailed Description

Declarations for hardware interface functions for the OTA bootloading client plugin.


SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com


Macro Definition Documentation

◆ MULTIPLE_OF_32K

#define MULTIPLE_OF_32K ( Add)    ((((Add) & (0x8000 - 1)) == 0) ? 1 : 0)

◆ MULTIPLE_OF_64K

#define MULTIPLE_OF_64K ( Add)    ((((Add) & (0x10000 - 1)) == 0) ? 1 : 0)

◆ OTA_FLASH_WRITE_BUF_SIZE

#define OTA_FLASH_WRITE_BUF_SIZE   (2 * OTA_FLASH_WRITE_SIZE)

◆ OTA_FLASH_WRITE_SIZE

#define OTA_FLASH_WRITE_SIZE   2048

◆ SIZE_OF_FLASH_SECTOR_ERASE

#define SIZE_OF_FLASH_SECTOR_ERASE   4096

Function Documentation

◆ Hash16_Calc()

void Hash16_Calc ( zb_uint32_t pBuffer,
zb_uint32_t BufferLength,
zb_uint8_t * hash16 )

◆ tr_osif_ota_flash_set_write_addr()

void tr_osif_ota_flash_set_write_addr ( zb_uint32_t write_offset)

◆ tr_osif_ota_mark_fw_ready()

zb_bool_t tr_osif_ota_mark_fw_ready ( void * dev,
zb_uint32_t size,
zb_uint32_t revision )

◆ tr_ota_upgrade_client_get_ota_header()

zb_zcl_ota_upgrade_file_header_t * tr_ota_upgrade_client_get_ota_header ( void )

◆ zb_erase_fw()

zb_uint8_t zb_erase_fw ( zb_uint32_t address,
zb_uint32_t pages_count )

◆ zb_osif_ota_close_storage()

void zb_osif_ota_close_storage ( void * dev)

◆ zb_osif_ota_erase_fw()

void zb_osif_ota_erase_fw ( void * dev,
zb_uint_t offset,
zb_uint32_t size )

◆ zb_osif_ota_fw_size_ok()

zb_bool_t zb_osif_ota_fw_size_ok ( zb_uint32_t image_size)

◆ zb_osif_ota_get_erase_portion()

zb_uint32_t zb_osif_ota_get_erase_portion ( void )

◆ zb_osif_ota_mark_fw_absent()

void zb_osif_ota_mark_fw_absent ( void )

◆ zb_osif_ota_mark_fw_updated()

void zb_osif_ota_mark_fw_updated ( void )

◆ zb_osif_ota_open_storage()

void * zb_osif_ota_open_storage ( void )

◆ zb_osif_ota_read()

void zb_osif_ota_read ( void * dev,
zb_uint8_t * data,
zb_uint32_t addr,
zb_uint32_t size )

◆ zb_osif_ota_verify_integrity()

zb_bool_t zb_osif_ota_verify_integrity ( void * dev,
zb_uint32_t raw_len )

◆ zb_osif_ota_verify_integrity_async()

zb_bool_t zb_osif_ota_verify_integrity_async ( void * dev,
zb_uint32_t raw_len )

◆ zb_osif_ota_write()

void zb_osif_ota_write ( void * dev,
zb_uint8_t * data,
zb_uint_t off,
zb_uint_t size,
zb_uint32_t image_size )

◆ zb_osif_ota_write_last_data()

void zb_osif_ota_write_last_data ( void )

◆ zb_osif_upgrade_now()

void zb_osif_upgrade_now ( )

◆ zb_write_fw()

zb_uint8_t zb_write_fw ( zb_uint32_t address,
zb_uint8_t * buf,
zb_uint16_t len )