Made cc26xx WDT reload configurable with macro

CONTIKI_WATCHDOG_TIMER_TOP sets the reload value of the WDT
This commit is contained in:
Billy Kozak 2015-08-17 11:02:06 -06:00
parent b8cccb6d3c
commit 85555cf6cf

View file

@ -42,9 +42,16 @@
* \file * \file
* Implementation of the CC13xx/CC26xx watchdog driver. * Implementation of the CC13xx/CC26xx watchdog driver.
*/ */
#include "watchdog.h" #include "contiki.h"
#include "dev/watchdog.h"
#include "ti-lib.h" #include "ti-lib.h"
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef CONTIKI_WATCHDOG_CONF_TIMER_TOP
#define CONTIKI_WATCHDOG_TIMER_TOP CONTIKI_WATCHDOG_CONF_TIMER_TOP
#else
#define CONTIKI_WATCHDOG_TIMER_TOP 0xFFFFF
#endif
/*---------------------------------------------------------------------------*/
/** /**
* \brief Initialises the CC26xx WDT * \brief Initialises the CC26xx WDT
* *
@ -54,7 +61,7 @@
void void
watchdog_init(void) watchdog_init(void)
{ {
ti_lib_watchdog_reload_set(0xFFFFF); ti_lib_watchdog_reload_set(CONTIKI_WATCHDOG_TIMER_TOP);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/** /**