1.我调用tuya_get_local_time函数获取时间,一旦获取就会出现重启,用的是8285芯片,log在附件中,帮忙看看;
struct tm *st_time;
if(my_wf_sta == STAT_STA_CONN)
if((get_time++) == 10)
{
PR_NOTICE("I GOT TIME!!!!");
get_time = 0;
tuya_get_local_time(st_time);
PR_NOTICE("tm_wday:%d tm_min:%d ", st_time->tm_wday,st_time->tm_min);
}
2.我想配置成上电配网模式,开了一个定时器,在定时器回调函数调用tuya_dev_reset_factory函数,让设备上电配网,但会出现一上电,灯闪烁异常,一直配不上;
op_ret = sys_add_timer(mysave_pw_cb, NULL, &my_pw_timer);
if (OPRT_OK != op_ret)
{
return op_ret;
} else
{
sys_start_timer(my_pw_timer, 5000, TIMER_ONCE);
}
STATIC VOID mysave_pw_cb(UINT timerID,PVOID pTimerArg)
{
tuya_dev_reset_factory();
}