mirror of https://github.com/ARMmbed/mbed-os.git
VirtualWatchdog: fix error code and timeout
parent
02936376ae
commit
1c0f1880eb
|
@ -34,9 +34,9 @@ VirtualWatchdog::VirtualWatchdog(uint32_t timeout, const char *const str): _name
|
|||
Watchdog &watchdog = Watchdog::get_instance();
|
||||
if (!_is_hw_watchdog_running) {
|
||||
if (watchdog.is_running() == true) {
|
||||
MBED_MAKE_ERROR(MBED_MODULE_DRIVER_WATCHDOG, INITIALIZATION_FAILED);
|
||||
MBED_MAKE_ERROR(MBED_MODULE_DRIVER_WATCHDOG, MBED_ERROR_INITIALIZATION_FAILED);
|
||||
}
|
||||
watchdog.start(&VirtualWatchdog::process, Watchdog::elapsed_ms);
|
||||
watchdog.start(&VirtualWatchdog::process, Watchdog::watchdog_timeout);
|
||||
_is_hw_watchdog_running = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
#ifdef DEVICE_WATCHDOG
|
||||
|
||||
#include <cstdio>
|
||||
#include "mbed_error.h"
|
||||
#include "platform/mbed_error.h"
|
||||
#include "platform/mbed_critical.h"
|
||||
#include "platform/mbed_power_mgmt.h"
|
||||
#include "mbed_assert.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
|
||||
namespace mbed {
|
||||
|
||||
|
|
Loading…
Reference in New Issue