mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-05 19:01:54 +00:00
Added fixes to timer implementation
This commit is contained in:
@@ -57,12 +57,13 @@ namespace sta
|
||||
*/
|
||||
void stop() override;
|
||||
|
||||
/**
|
||||
* @returns True of the timmer is currently running.
|
||||
*/
|
||||
bool isRunning();
|
||||
|
||||
private:
|
||||
static void timeoutHandler(void* arg)
|
||||
{
|
||||
RtosTimer* timer = static_cast<RtosTimer*>(arg);
|
||||
timer->callback_(timer->callbackArg_);
|
||||
}
|
||||
static void timeoutHandler(void* arg);
|
||||
|
||||
private:
|
||||
osTimerId_t timer_id_; /**< CMSIS RTOS2 Timer */
|
||||
@@ -70,6 +71,7 @@ namespace sta
|
||||
|
||||
std::function<void(void*)> callback_; /**< The callback to call on timeout. */
|
||||
void* callbackArg_; /**< The argument to pass to the callback. */
|
||||
bool running_; /**< The current state of the timer. Running or not? */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
Reference in New Issue
Block a user