TuyaOS
tkl_nbiot_misc.h
浏览该文件的文档.
1
9#ifndef __TKL_NBIOT_MISC_H__
10#define __TKL_NBIOT_MISC_H__
11
12#include "tkl_nbiot_comm.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef enum {
19 TKL_CHIP_MTK2625 = 0, //适配所有涂鸦自己的差分升级流程!!!
20 TKL_CHIP_EC616 = 1,
21 TKL_CHIP_XY1100 = 2,
22 TKL_CHIP_MAX = 3,
23} TKL_MISC_CHIP_TYPE_E;
24
32OPERATE_RET tkl_nbiot_chip_type(TKL_MISC_CHIP_TYPE_E *out_type);
33
42
51
60
68OPERATE_RET tkl_nbiot_get_app_offset(UINT_T *out_addr);
69
77OPERATE_RET tkl_nbiot_get_app_len(UINT_T *out_len);
78
87
95OPERATE_RET tkl_nbiot_fota_update_end(VOID);
96
105
114OPERATE_RET tkl_nbiot_get_fota_offset(UINT_T *out_addr, UCHAR_T *_1st_data, UINT32_T _1st_data_size);
115
123OPERATE_RET tkl_nbiot_get_fota_len(UINT_T *out_len);
124
132OPERATE_RET tkl_nbiot_get_fota_update_info_offset(UINT_T *out_addr);
133
141OPERATE_RET tkl_nbiot_get_fota_trigger_flag_offset(UINT_T *out_addr);
142
143#ifdef __cplusplus
144}
145#endif /* __cplusplus */
146
147#endif
148
149
150
Common process - common defination
OPERATE_RET tkl_nbiot_get_app_offset(UINT_T *out_addr)
get the offset address of app firmware
OPERATE_RET tkl_nbiot_fota_status_acquire(VOID)
some upgrade status needs to be obtained from the platform,such as NX1, others return directly
OPERATE_RET tkl_nbiot_get_fota_trigger_flag_offset(UINT_T *out_addr)
get the offset address to save trigger fota indicator
OPERATE_RET tkl_nbiot_atcmd_serial_port_off(VOID)
set AT serial port off
OPERATE_RET tkl_nbiot_fota_update_end(VOID)
notify fota update end, some platform need acquire this info to clear update status,...
OPERATE_RET tkl_nbiot_fota_update_start(VOID)
notify fota update start, some platform need acquire this info then restart system,...
OPERATE_RET tkl_nbiot_get_app_len(UINT_T *out_len)
get the app firmware space length
OPERATE_RET tkl_nbiot_get_fota_update_info_offset(UINT_T *out_addr)
get the offset address to save update info
OPERATE_RET tkl_nbiot_chip_type(TKL_MISC_CHIP_TYPE_E *out_type)
get the chip type
OPERATE_RET tkl_nbiot_get_fota_len(UINT_T *out_len)
get the space legth to save firmware
OPERATE_RET tkl_nbiot_get_fota_offset(UINT_T *out_addr, UCHAR_T *_1st_data, UINT32_T _1st_data_size)
get the offset address to save firmware
BOOL_T tkl_nbiot_is_atcmd_serial_port_on(VOID)
if AT serial port is on or off
OPERATE_RET tkl_nbiot_atcmd_serial_port_on(VOID)
set AT serial port on