mirror of https://github.com/ARMmbed/mbed-os.git
VirtualWatchdog: add config option to ctor to clarify the hw timeout
parent
9f48f26876
commit
61f859b514
|
@ -36,6 +36,7 @@ VirtualWatchdog::VirtualWatchdog(uint32_t timeout, const char *const str): _name
|
|||
if (watchdog.is_running() == true) {
|
||||
MBED_MAKE_ERROR(MBED_MODULE_DRIVER_WATCHDOG, MBED_ERROR_INITIALIZATION_FAILED);
|
||||
}
|
||||
// we use default hw timeout provided by config
|
||||
watchdog.start(&VirtualWatchdog::process, Watchdog::watchdog_timeout);
|
||||
_is_hw_watchdog_running = true;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,9 @@ class VirtualWatchdog {
|
|||
public:
|
||||
|
||||
/** Constructor configured with timeout and name for this software watchdog instance.
|
||||
*
|
||||
* We start hardware watchdog on the first run. This set-up uses default watchdog timeout set via config value
|
||||
* MBED_CONF_TARGET_WATCHDOG_TIMEOUT.
|
||||
*
|
||||
*/
|
||||
VirtualWatchdog(uint32_t timeout = 1, const char *const str = NULL);
|
||||
|
|
Loading…
Reference in New Issue