mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 18:40:17 +00:00
cc26xx - implemented watchdog_stop
Also modified watchdog_start so that if we stop and start again the watchdog timeout will be reset (by calling watchdog_periodic).
This commit is contained in:
parent
dfdb0a6487
commit
22d8a8dd56
@ -70,6 +70,7 @@ watchdog_init(void)
|
|||||||
void
|
void
|
||||||
watchdog_start(void)
|
watchdog_start(void)
|
||||||
{
|
{
|
||||||
|
watchdog_periodic();
|
||||||
ti_lib_watchdog_reset_enable();
|
ti_lib_watchdog_reset_enable();
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
@ -83,6 +84,15 @@ watchdog_periodic(void)
|
|||||||
ti_lib_watchdog_int_clear();
|
ti_lib_watchdog_int_clear();
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* \brief Stops the WDT such that it won't timeout and cause MCU reset
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
watchdog_stop(void)
|
||||||
|
{
|
||||||
|
ti_lib_watchdog_reset_disable();
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Manually trigger a WDT reboot
|
* \brief Manually trigger a WDT reboot
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user