CC2538: Add WATCHDOG_CONF_ENABLE to optionally disable the watchdog timer.
This commit is contained in:
parent
4af2661374
commit
7081440eff
3 changed files with 13 additions and 0 deletions
|
@ -87,6 +87,7 @@ void
|
||||||
watchdog_reboot(void)
|
watchdog_reboot(void)
|
||||||
{
|
{
|
||||||
INTERRUPTS_DISABLE();
|
INTERRUPTS_DISABLE();
|
||||||
|
watchdog_start(); /* just in case the WDT hasn't been started yet */
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,6 +50,16 @@ typedef uint32_t rtimer_clock_t;
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* \name Watchdog Timer configuration
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifndef WATCHDOG_CONF_ENABLE
|
||||||
|
#define WATCHDOG_CONF_ENABLE 1 /**<Enable the watchdog timer */
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \name USB 'core' configuration
|
* \name USB 'core' configuration
|
||||||
*
|
*
|
||||||
|
|
|
@ -203,7 +203,9 @@ main(void)
|
||||||
|
|
||||||
autostart_start(autostart_processes);
|
autostart_start(autostart_processes);
|
||||||
|
|
||||||
|
#if WATCHDOG_CONF_ENABLE
|
||||||
watchdog_start();
|
watchdog_start();
|
||||||
|
#endif
|
||||||
fade(LEDS_ORANGE);
|
fade(LEDS_ORANGE);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
Loading…
Reference in a new issue