TuyaOS
tuya_hal_ota.h
浏览该文件的文档.
1
10#ifndef _TUYA_HAL_OTA_H_
11#define _TUYA_HAL_OTA_H_
12
13#include "tal_ota.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef enum {
20 AIR_OTA_TYPE,
21 UART_OTA_TYPE,
22} OTA_TYPE;
23
34int tuya_hal_ota_start_inform(unsigned int file_size, OTA_TYPE type);
35
51int tuya_hal_ota_data_process(const unsigned int total_len, const unsigned int offset,
52 const unsigned char* data, const unsigned int len, unsigned int* remain_len, void* pri_data);
53
64int tuya_hal_ota_end_inform(BOOL_T reset);
65
75VOID_T tuya_os_ota_intf_init(VOID_T);
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif
Common process - implement the ota operation of the ota
int tuya_hal_ota_end_inform(BOOL_T reset)
Ota data transfer completion notification
VOID_T tuya_os_ota_intf_init(VOID_T)
Ota interface initialization
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_start_inform(unsigned int file_size, OTA_TYPE type)
Start upgrade notification