ret = hi\_nv\_init(ptable->table[HI_FLASH_PARTITON_NORMAL_NV].addr, ptable->table[HI_FLASH_PARTITON_NORMAL_NV].size,
HI_NV_DEFAULT_BLOCK_SIZE);
if (ret != HI_ERR_SUCCESS) {
printf("nv init fail\r\n");
}
#ifndef CONFIG_FACTORY_TEST_MODE
hi_upg_init();
#endif
/\* if not use file system, there is no need init it \*/
hi\_fs\_init();
(hi_void)hi\_event\_init(APP_INIT_EVENT_NUM, HI_NULL);
hi\_sal\_init();
/\* 此处设为TRUE后中断中看门狗复位会显示复位时PC值,但有复位不完全风险,量产版本请务必设为FALSE \*/
hi\_syserr\_watchdog\_debug(HI_FALSE);
/\* 默认记录宕机信息到FLASH,根据应用场景,可不记录,避免频繁异常宕机情况损耗FLASH寿命 \*/
hi\_syserr\_record\_crash\_info(HI_TRUE);
hi\_lpc\_init();
hi\_lpc\_register\_hw\_handler(config_before_sleep, config_after_sleep);
#if defined(CONFIG_AT_COMMAND) || defined(CONFIG_FACTORY_TEST_MODE)
ret = hi_at_init();
if (ret == HI_ERR_SUCCESS) {
hi_at_sys_cmd_register();
}
#endif
/\* 如果不需要使用Histudio查看WIFI驱动运行日志等,无需初始化diag \*/
/\* if not use histudio for diagnostic, diag initialization is unnecessary \*/
/\* Shell and Diag use the same uart port, only one of them can be selected \*/
#ifndef CONFIG_FACTORY_TEST_MODE
#ifndef ENABLE_SHELL_DEBUG
#ifdef CONFIG_DIAG_SUPPORT
(hi_void)hi_diag_init();
#endif
#else
(hi_void)hi_shell_init();
#endif
tcpip\_init(NULL, NULL);
#endif
ret = hi\_wifi\_init(APP_INIT_VAP_NUM, APP_INIT_USR_NUM);
if (ret != HISI_OK) {
printf("wifi init failed!\n");
} else {
printf("wifi init su