|
|
|
@ -72,7 +72,6 @@
|
|
|
|
|
/* Private variables ---------------------------------------------------------*/
|
|
|
|
|
int32_t recv_qid;
|
|
|
|
|
uint16_t version_hex;
|
|
|
|
|
uint32_t start_time;
|
|
|
|
|
sys_ctrl_t sysctrl = {0};
|
|
|
|
|
|
|
|
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
|
|
@ -187,7 +186,6 @@ int32_t main(int32_t argc, char **argv)
|
|
|
|
|
/* 点 RUN 灯. */
|
|
|
|
|
GPIO_RUN_LED(cnt & 0x1);
|
|
|
|
|
|
|
|
|
|
start_time++;
|
|
|
|
|
cnt++;
|
|
|
|
|
|
|
|
|
|
sleep(1);
|
|
|
|
@ -198,6 +196,12 @@ int32_t main(int32_t argc, char **argv)
|
|
|
|
|
usleep(100*1000);
|
|
|
|
|
GPIO_WDT_CTRL(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
time_t curTime = time(NULL);
|
|
|
|
|
if (CPUMS_DIFF(sysctrl.start_time, curTime) >= 86400)
|
|
|
|
|
{
|
|
|
|
|
reboot_system(LOG_DEFAULT, BOOT_RUN_OVER_24_HOURS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|