提交 bc69ca10 编写于 作者: Y yinshuqing

Watchdog test case repair

Signed-off-by: Nyinshuqing <yinshuqing@huawei.com>
上级 5bed688c
...@@ -56,11 +56,15 @@ STATIC DevHandle g_wdHandle; ...@@ -56,11 +56,15 @@ STATIC DevHandle g_wdHandle;
STATIC void StartWatchdog(void) STATIC void StartWatchdog(void)
{ {
int32_t ret;
if (g_wdStarted) { if (g_wdStarted) {
return; return;
} }
g_wdHandle = WatchdogOpen(0); ret = WatchdogOpen(0, &g_wdHandle);
if (ret != HDF_SUCCESS) {
return;
}
WatchdogSetTimeout(g_wdHandle, WATCHDOG_TIMER_INTERVAL); WatchdogSetTimeout(g_wdHandle, WATCHDOG_TIMER_INTERVAL);
if (LOS_SwtmrCreate(LOSCFG_BASE_CORE_TICK_PER_SECOND * WATCHDOG_TIMER_INTERVAL_HALF, LOS_SWTMR_MODE_PERIOD, if (LOS_SwtmrCreate(LOSCFG_BASE_CORE_TICK_PER_SECOND * WATCHDOG_TIMER_INTERVAL_HALF, LOS_SWTMR_MODE_PERIOD,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册