From 48759eccdc0ee41d81b97ff2bcf7c79136b1baec Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Tue, 2 Jun 2020 12:54:25 +0200 Subject: [PATCH] drivers/wdt: Add feature to indicate a configurable warning period This adds the feature `periph_wdt_warning_period` that indicates that a platform WDT driver implementation supports a configurable CONFIG_WDT_WARNING_PERIOD. --- cpu/sam0_common/Makefile.features | 2 +- drivers/include/periph/wdt.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cpu/sam0_common/Makefile.features b/cpu/sam0_common/Makefile.features index 7223053341..3370c01eab 100644 --- a/cpu/sam0_common/Makefile.features +++ b/cpu/sam0_common/Makefile.features @@ -7,6 +7,6 @@ FEATURES_PROVIDED += periph_i2c_reconfigure FEATURES_PROVIDED += periph_timer_periodic # implements timer_set_periodic() FEATURES_PROVIDED += periph_uart_modecfg FEATURES_PROVIDED += periph_uart_nonblocking -FEATURES_PROVIDED += periph_wdt periph_wdt_cb +FEATURES_PROVIDED += periph_wdt periph_wdt_cb periph_wdt_warning_period -include $(RIOTCPU)/cortexm_common/Makefile.features diff --git a/drivers/include/periph/wdt.h b/drivers/include/periph/wdt.h index 324030e98e..2f30c5b158 100644 --- a/drivers/include/periph/wdt.h +++ b/drivers/include/periph/wdt.h @@ -112,9 +112,10 @@ * for details on its constraints. * * The callback will be executed CONFIG_WDT_WARNING_PERIOD before the actual reboot. - * The value of CONFIG_WDT_WARNING_PERIOD may be configurable or a fixed value. But is - * in any case defined at compile time. Specific platform implementation should - * assert improper values. + * The value of CONFIG_WDT_WARNING_PERIOD may be configurable or a fixed value. If + * a platform allows this value to be configured, the feature + * `periph_wdt_warning_period` is provided. But is in any case defined at + * compile time. Specific platform implementation should assert improper values. * * * In the code snippet and diagram `time` is an arbitrary value such that