Files
kunlun/app/bsrm/iot_bsrm_pm_upgrade_img.h
2024-09-28 14:24:04 +08:00

50 lines
1.8 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef IOT_BSRM_PM_UPGRADE_IMG_H
#define IOT_BSRM_PM_UPGRADE_IMG_H
/**
* @brief iot_bsrm_pm_get_local_img_version() - get local pm image version.
* @retval 0 - invalid version.
* othersie - sucessful.
*/
uint32_t iot_bsrm_pm_get_local_img_version();
/**
* @brief iot_bsrm_pm_get_local_img_size() - get local pm image size.
* @retval img size.
*/
uint32_t iot_bsrm_pm_get_local_img_size();
/**
* @brief iot_bsrm_pm_get_local_img_crc() - get local pm image crc value.
* @retval img crc value.
*/
uint32_t iot_bsrm_pm_get_local_img_crc();
/**
* @brief iot_bsrm_pm_get_local_img_data() - get local pm image data to buffer.
* @param buffer: dec buffer ptr.
* @param block_size: get image data block size.
* @param block_index: image block index, index is [0, n].
* @retval valid buffer data length, 0 - get img data complete.
*/
uint32_t iot_bsrm_pm_get_local_img_data(const uint8_t **buffer,
uint32_t block_size, uint32_t block_index);
#endif /* IOT_BSRM_PM_UPGRADE_IMG_H */