We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32f615e commit fdf1c33Copy full SHA for fdf1c33
drivers/source/Watchdog.cpp
@@ -34,18 +34,14 @@ bool Watchdog::start(uint32_t timeout)
34
MBED_ASSERT(timeout > 0);
35
36
core_util_critical_section_enter();
37
- if (_running) {
38
- core_util_critical_section_exit();
39
- return false;
40
- }
41
watchdog_config_t config;
42
config.timeout_ms = timeout;
43
watchdog_status_t sts = hal_watchdog_init(&config);
44
if (sts == WATCHDOG_STATUS_OK) {
45
_running = true;
46
}
47
core_util_critical_section_exit();
48
- return _running;
+ return (sts == WATCHDOG_STATUS_OK);
49
50
51
bool Watchdog::start()
0 commit comments