add smartconfig at command

This commit is contained in:
esma(马璐)
2020-12-17 14:46:44 +08:00
parent 25342c0a35
commit dd932f0362
3 changed files with 115 additions and 0 deletions

View File

@@ -199,3 +199,19 @@ int tos_tf_module_ota_read_fwdata(uint8_t *ota_fw_data_buffer,uint16_t buf_size)
}
return -1;
}
int tos_tf_module_smartconfig_start(void)
{
if (g_tencent_firmware_module && g_tencent_firmware_module->start_smartconfig) {
return g_tencent_firmware_module->start_smartconfig();
}
return -1;
}
int tos_tf_module_smartconfig_stop(void)
{
if (g_tencent_firmware_module && g_tencent_firmware_module->stop_smartconfig) {
return g_tencent_firmware_module->stop_smartconfig();
}
return -1;
}

View File

@@ -139,6 +139,10 @@ typedef struct tencent_firmware_module_st {
int (*ota_read_fwinfo)(ota_fw_info_t *ota_fw_info);
int (*ota_read_fwdata)(uint8_t *ota_fw_data_buffer,uint16_t buf_size);
int (*start_smartconfig)(void);
int (*stop_smartconfig)(void);
} tencent_firmware_module_t;
/**
@@ -301,5 +305,23 @@ int tos_tf_module_ota_read_fwinfo(ota_fw_info_t *ota_fw_info);
*/
int tos_tf_module_ota_read_fwdata(uint8_t *ota_fw_data_buffer,uint16_t buf_size);
/**
* @brief Start smartconfig from tencent firmware module
*
* @attention None
*
* @return errcode
*/
int tos_tf_module_smartconfig_start(void);
/**
* @brief Stop smartconfig from tencent firmware module
*
* @attention None
*
* @return errcode
*/
int tos_tf_module_smartconfig_stop(void);
#endif