mirror of https://github.com/ARMmbed/mbed-os.git
Watchdog: remove config value for timeout, set it dynamically
Use start method to set timeoutpull/10857/head
parent
6313e530b3
commit
fd445a57cb
|
@ -63,6 +63,6 @@ TEST_F(TestWatchdog, test_watchdog_get_max_timeout)
|
|||
|
||||
TEST_F(TestWatchdog, test_watchdog_get_timeout)
|
||||
{
|
||||
EXPECT_EQ(500, Watchdog::get_instance().get_timeout());
|
||||
EXPECT_EQ(Watchdog::watchdog_timeout, Watchdog::get_instance().get_timeout());
|
||||
}
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ set(unittest-test-sources
|
|||
)
|
||||
|
||||
# defines
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEVICE_WATCHDOG -DMBED_WDOG_ASSERT=1 -DMBED_CONF_TARGET_WATCHDOG_TIMEOUT=500")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEVICE_WATCHDOG -DMBED_WDOG_ASSERT=1 -DMBED_CONF_TARGET_WATCHDOG_TIMEOUT=500")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEVICE_WATCHDOG -DMBED_WDOG_ASSERT=1")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEVICE_WATCHDOG -DMBED_WDOG_ASSERT=1")
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace mbed {
|
|||
*/
|
||||
class Watchdog : private NonCopyable<Watchdog> {
|
||||
public:
|
||||
static const uint32_t watchdog_timeout = MBED_CONF_TARGET_WATCHDOG_TIMEOUT;
|
||||
static const uint32_t watchdog_timeout = 800;
|
||||
|
||||
/** As Watchdog might not stop ever, there is just one instance - we use single instance.
|
||||
* This ensures we keep Watchdog alive. To operate watchdog, use start/stop methods.
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
"tickless-from-us-ticker": {
|
||||
"help": "Run tickless from the microsecond ticker rather than the low power ticker. Running tickless off of the microsecond ticker improves interrupt latency on targets which use lpticker_delay_ticks",
|
||||
"value": false
|
||||
},
|
||||
"watchdog-timeout": {
|
||||
"help": "Define the timeout in ms to do HW kick",
|
||||
"value": "800"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue