diff --git a/src/system/watchdog.cpp b/src/system/watchdog.cpp index 373b349..1bf582d 100644 --- a/src/system/watchdog.cpp +++ b/src/system/watchdog.cpp @@ -2,6 +2,7 @@ #ifdef STA_RTOS_WATCHDOG_ENABLE #include +#include #include #include #include diff --git a/src/timer.cpp b/src/timer.cpp index 967396d..79c6361 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -12,7 +12,7 @@ namespace sta { running_{false} { // Pass an anonymous function as the callback which will invoke the currently registered callback. - timer_id_ = osTimerNew(timeoutHandler, osTimerOnce, arg, &timer_attr_); + timer_id_ = osTimerNew(timeoutHandler, osTimerOnce, this, &timer_attr_); STA_ASSERT_MSG(timer_id_ != NULL, "Failed to create timer!"); }