Watchdog test case repair

Signed-off-by: yinshuqing <yinshuqing@huawei.com>
This commit is contained in:
yinshuqing 2021-12-14 20:01:33 +08:00
parent 5bed688ca6
commit bc69ca104c
1 changed files with 5 additions and 1 deletions

View File

@ -56,11 +56,15 @@ STATIC DevHandle g_wdHandle;
STATIC void StartWatchdog(void)
{
int32_t ret;
if (g_wdStarted) {
return;
}
g_wdHandle = WatchdogOpen(0);
ret = WatchdogOpen(0, &g_wdHandle);
if (ret != HDF_SUCCESS) {
return;
}
WatchdogSetTimeout(g_wdHandle, WATCHDOG_TIMER_INTERVAL);
if (LOS_SwtmrCreate(LOSCFG_BASE_CORE_TICK_PER_SECOND * WATCHDOG_TIMER_INTERVAL_HALF, LOS_SWTMR_MODE_PERIOD,