configs/nrf52-pca10040: Add support for starting the watchdog timer on the nRF52.

This commit is contained in:
Alan Carvalho de Assis
2018-04-20 07:23:57 -06:00
committed by Gregory Nutt
parent e4c48e0f23
commit 161fb98b11
@@ -38,7 +38,9 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <syslog.h>
/****************************************************************************
* Public Functions
@@ -60,5 +62,18 @@
int nrf52_bringup(void)
{
int ret;
#ifdef CONFIG_NRF52_WDT
/* Start Watchdog timer */
ret = nrf52_wdt_initialize(CONFIG_WATCHDOG_DEVPATH, 1, 1);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: nrf52_wdt_initialize failed: %d\n", ret);
}
#endif
UNUSED(ret);
return OK;
}