TuyaOS
枚举 | 函数
tuya_hal_ota.h 文件参考

Common process - Initialization 更多...

#include "tal_ota.h"
tuya_hal_ota.h 的引用(Include)关系图:

浏览源代码.

枚举

enum  OTA_TYPE { AIR_OTA_TYPE , UART_OTA_TYPE }
 

函数

int tuya_hal_ota_data_process (const unsigned int total_len, const unsigned int offset, const unsigned char *data, const unsigned int len, unsigned int *remain_len, void *pri_data)
 Ota data packet processing 更多...
 
int tuya_hal_ota_end_inform (BOOL_T reset)
 Ota data transfer completion notification 更多...
 
int tuya_hal_ota_start_inform (unsigned int file_size, OTA_TYPE type)
 Start upgrade notification 更多...
 
VOID_T tuya_os_ota_intf_init (VOID_T)
 Ota interface initialization 更多...
 

详细描述

Common process - Initialization

版本
0.1
日期
2020-11-09

函数说明

◆ tuya_hal_ota_data_process()

int tuya_hal_ota_data_process ( const unsigned int  total_len,
const unsigned int  offset,
const unsigned char *  data,
const unsigned int  len,
unsigned int *  remain_len,
void *  pri_data 
)

Ota data packet processing

参数
[in]total_lentotal lenth of upgrade package
[in]offsetoffset of current data in upgrade package
[in]dataota data
[in]lenota data length
[out]remain_lenthe length of data that has been distributed internally but not yet processed
[in]pri_datareserved data
注解
This API is used for ota data packet processing
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_hal_ota_end_inform()

int tuya_hal_ota_end_inform ( BOOL_T  reset)

Ota data transfer completion notification

参数
[in]resetif need reset or not
注解
This API is used for ota data transfer completion notification users can do firmware verification and device restart
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_hal_ota_start_inform()

int tuya_hal_ota_start_inform ( unsigned int  file_size,
OTA_TYPE  type 
)

Start upgrade notification

参数
[in]file_sizefile size
[in]typeota type
注解
This API is used for starting upgrade notification
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_os_ota_intf_init()

VOID_T tuya_os_ota_intf_init ( VOID_T  )

Ota interface initialization

参数
VOID
注解
This API is used for initialization of ota interface.
返回
VOID