diff options
author | Stephane D'Alu <sdalu@sdalu.com> | 2016-07-10 14:10:58 +0200 |
---|---|---|
committer | Stephane D'Alu <sdalu@sdalu.com> | 2016-07-10 14:10:58 +0200 |
commit | 49afe683a0827a9b29c7e2e761f6740b67543056 (patch) | |
tree | 6b510c934a49b44b909b7eafbebfda89a649218b /os | |
parent | 9cf4f9dfc7f6bcd1c46c96d9e388bf677e7148f1 (diff) | |
download | ChibiOS-Contrib-49afe683a0827a9b29c7e2e761f6740b67543056.tar.gz ChibiOS-Contrib-49afe683a0827a9b29c7e2e761f6740b67543056.tar.bz2 ChibiOS-Contrib-49afe683a0827a9b29c7e2e761f6740b67543056.zip |
assert that watchdog can't be restarted
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/NRF5/LLD/hal_wdg_lld.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/ports/NRF5/LLD/hal_wdg_lld.c b/os/hal/ports/NRF5/LLD/hal_wdg_lld.c index 30d31af..35c079f 100644 --- a/os/hal/ports/NRF5/LLD/hal_wdg_lld.c +++ b/os/hal/ports/NRF5/LLD/hal_wdg_lld.c @@ -101,6 +101,10 @@ void wdg_lld_init(void) { * @notapi
*/
void wdg_lld_start(WDGDriver *wdgp) {
+ osalDbgAssert((wdgp->state == WDG_STOP),
+ "This WDG driver cannot be restarted once activated");
+
+ /* Generate interrupt on timeout */
#if WDG_USE_TIMEOUT_CALLBACK == TRUE
wdgp->wdt->INTENSET = WDT_INTENSET_TIMEOUT_Msk;
#endif
@@ -134,7 +138,7 @@ void wdg_lld_start(WDGDriver *wdgp) { */
void wdg_lld_stop(WDGDriver *wdgp) {
(void)wdgp;
- osalDbgAssert(false, "WDG cannot be stopped once activated");
+ osalDbgAssert(false, "This WDG driver cannot be stopped once activated");
}
/**
|