Made cc26xx WDT reload configurable with macro
CONTIKI_WATCHDOG_TIMER_TOP sets the reload value of the WDT
This commit is contained in:
parent
b8cccb6d3c
commit
85555cf6cf
1 changed files with 9 additions and 2 deletions
|
@ -42,9 +42,16 @@
|
|||
* \file
|
||||
* Implementation of the CC13xx/CC26xx watchdog driver.
|
||||
*/
|
||||
#include "watchdog.h"
|
||||
#include "contiki.h"
|
||||
#include "dev/watchdog.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
|
||||
*
|
||||
|
@ -54,7 +61,7 @@
|
|||
void
|
||||
watchdog_init(void)
|
||||
{
|
||||
ti_lib_watchdog_reload_set(0xFFFFF);
|
||||
ti_lib_watchdog_reload_set(CONTIKI_WATCHDOG_TIMER_TOP);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue