mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 14:03:55 +01:00
drivers/wdt: Move WDT_WARNING_PERIOD to 'CONFIG_' namespace
This commit is contained in:
parent
934f68ead8
commit
00b71a2708
@ -193,7 +193,7 @@ void wdt_setup_reboot_with_callback(uint32_t min_time, uint32_t max_time,
|
||||
cb_arg = arg;
|
||||
|
||||
if (cb != NULL) {
|
||||
uint32_t warning_offset = ms_to_per(WDT_WARNING_PERIOD);
|
||||
uint32_t warning_offset = ms_to_per(CONFIG_WDT_WARNING_PERIOD);
|
||||
|
||||
if (warning_offset == 0) {
|
||||
warning_offset = 1;
|
||||
|
||||
@ -111,8 +111,8 @@
|
||||
* This function is highly platform dependent so check the platform documentation
|
||||
* for details on its constraints.
|
||||
*
|
||||
* The callback will be executed WDT_WARNING_PERIOD before the actual reboot.
|
||||
* The value of WDT_WARNING_PERIOD may be configurable or a fixed value. But is
|
||||
* 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.
|
||||
*
|
||||
@ -146,10 +146,10 @@
|
||||
*
|
||||
* @verbatim
|
||||
* |---------------------MAX_TIME-----------------------|
|
||||
* |---WDT_WARNING_PERIOD---|
|
||||
* ^ ^
|
||||
* | |
|
||||
* wdt_cb() reboot
|
||||
* |---CONFIG_WDT_WARNING_PERIOD---|
|
||||
* ^ ^
|
||||
* | |
|
||||
* wdt_cb() reboot
|
||||
* @endverbatim
|
||||
*
|
||||
* To include this feature, (If your platform supports it) in your application
|
||||
@ -276,13 +276,13 @@ void wdt_init(void);
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @def WDT_WARNING_PERIOD
|
||||
* @def CONFIG_WDT_WARNING_PERIOD
|
||||
*
|
||||
* @brief Period (ms) before reboot where wdt_cb() is executed.
|
||||
* Defined per implementation.
|
||||
*/
|
||||
#ifndef WDT_WARNING_PERIOD
|
||||
#define WDT_WARNING_PERIOD (1)
|
||||
#ifndef CONFIG_WDT_WARNING_PERIOD
|
||||
#define CONFIG_WDT_WARNING_PERIOD (1)
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user