Added periodic timers

This commit is contained in:
@CarlWachter
2024-05-31 13:54:09 +02:00
parent 1877c82f37
commit dcc647a062
2 changed files with 8 additions and 6 deletions

View File

@@ -10,6 +10,7 @@
#include <sta/timer.hpp>
#include <functional>
#include "cmsis_os2.h"
namespace sta
@@ -30,7 +31,7 @@ namespace sta
* @param callback The callback function to call upon timer timeout.
* @param arg The argument to pass to the callback function.
*/
RtosTimer(std::function<void(void*)>, void *arg);
RtosTimer(std::function<void(void*)>, void *arg, osTimerType_t type = osTimerOnce);
/**
* @brief Initializes the timer with a callback that has no effect.