diff --git a/UNITTESTS/stubs/watchdog_api_stub.c b/UNITTESTS/stubs/watchdog_api_stub.c index b0b5833cb4..d04a84394a 100644 --- a/UNITTESTS/stubs/watchdog_api_stub.c +++ b/UNITTESTS/stubs/watchdog_api_stub.c @@ -29,20 +29,20 @@ void hal_watchdog_kick(void) watchdog_status_t hal_watchdog_stop(void) { - return WATCHDOG_STATUS_OK; + return WATCHDOG_STATUS_OK; } uint32_t hal_watchdog_get_reload_value(void) { - return (500); + return (500); } watchdog_features_t hal_watchdog_get_platform_features(void) { - watchdog_features_t features; - features.max_timeout = 0xFFFFFFFF; - return features; + watchdog_features_t features; + features.max_timeout = 0xFFFFFFFF; + return features; } #endif // DEVICE_WATCHDOG diff --git a/UNITTESTS/target_h/platform/mbed_power_mgmt.h b/UNITTESTS/target_h/platform/mbed_power_mgmt.h index c49ef40745..a9864934eb 100644 --- a/UNITTESTS/target_h/platform/mbed_power_mgmt.h +++ b/UNITTESTS/target_h/platform/mbed_power_mgmt.h @@ -21,6 +21,6 @@ */ extern void mock_system_reset(); MBED_NORETURN static inline void system_reset(void) -{ +{ mock_system_reset(); } diff --git a/drivers/Watchdog.h b/drivers/Watchdog.h index f78fd086b1..eaae19a1f6 100644 --- a/drivers/Watchdog.h +++ b/drivers/Watchdog.h @@ -22,7 +22,6 @@ #include #include "mbed_error.h" -#include "rtos/ThisThread.h" #include "platform/mbed_critical.h" #include "platform/mbed_power_mgmt.h" namespace mbed { diff --git a/platform/mbed_watchdog_mgr.cpp b/platform/mbed_watchdog_mgr.cpp index 2a5de74262..b2cad9d58d 100644 --- a/platform/mbed_watchdog_mgr.cpp +++ b/platform/mbed_watchdog_mgr.cpp @@ -29,13 +29,12 @@ MBED_STATIC_ASSERT((HW_WATCHDOG_TIMEOUT > 0), "Timeout must be greater than zero * its only going to call process to verify all registered users/threads in alive state * */ -Watchdog watchdog(0, "Platform Watchdog"); - +mbed::Watchdog watchdog(0, "Platform Watchdog"); /** Create singleton instance of LowPowerTicker for watchdog periodic call back of kick. */ -static LowPowerTicker *get_ticker() +static mbed::LowPowerTicker *get_ticker() { - static LowPowerTicker ticker; + static mbed::LowPowerTicker ticker; return &ticker; } @@ -78,7 +77,7 @@ bool mbed_wdog_manager_start() core_util_critical_section_exit(); if (is_watchdog_started){ us_timestamp_t timeout = (MS_TO_US(((elapsed_ms <= 0) ? 1 : elapsed_ms))); - get_ticker()->attach_us(callback(&mbed_wdog_manager_kick), timeout); + get_ticker()->attach_us(mbed::callback(&mbed_wdog_manager_kick), timeout); } return is_watchdog_started; } diff --git a/platform/mbed_watchdog_mgr.h b/platform/mbed_watchdog_mgr.h index e42f4455b7..20c1f305e8 100644 --- a/platform/mbed_watchdog_mgr.h +++ b/platform/mbed_watchdog_mgr.h @@ -22,7 +22,7 @@ #include "watchdog_api.h" #include "mbed_error.h" -#include "mbed.h" +#include "platform/Callback.h" #include "platform/mbed_critical.h" #include "LowPowerTicker.h" #include "Watchdog.h" @@ -62,7 +62,7 @@ bool mbed_wdog_manager_start(); * Calling this function will attempt to disable any currently running * watchdog timers if supported by the current platform. * - * @return Returns true if the watchdog timer was succesfully + * @return Returns true if the watchdog timer was successfully * stopped, Returns false if the watchdog cannot be disabled * on the current platform or if the timer was never started. */