31 bool Create(
const char* name,
void (*callback)(uint32_t), uint32_t arg,
32 uint32_t periodMs,
bool autoStart =
false) noexcept {
C-facing helper functions for delays, cycle counters, and creation of RTOS handles (queues,...
bool os_timer_deactivate_ex(OS_Timer &timer, bool suppressVerbose=true) noexcept
Deactivates a OS timer.
Definition OsUtility.cpp:707
constexpr uint32_t os_convert_msec_to_delay_ticks(uint32_t milliseconds)
Converts milliseconds to delay ticks, rounding down but never to zero.
Definition OsUtility.h:74
bool os_timer_create_ex(OS_Timer &timer, const char *name, void(*callback)(uint32_t), uint32_t callbackExpirationInput, uint32_t initialTimeoutTicks, uint32_t rescheduleTimeoutTicks, OS_Uint autoActivate, bool suppressVerbose=true) noexcept
Creates a OS timer and reports any errors associated with the creation.
Definition OsUtility.cpp:627
bool os_timer_activate_ex(OS_Timer &timer, bool suppressVerbose=true) noexcept
Activates a OS timer.
Definition OsUtility.cpp:683
bool os_timer_deactivate_and_delete_ex(OS_Timer &timer, bool suppressVerbose=true) noexcept
Stops and deletes a OS timer, reporting any errors associated with the operation.
Definition OsUtility.cpp:659
Simple RAII wrapper around OS timers.
Definition PeriodicTimer.h:13
bool Destroy() noexcept
Definition PeriodicTimer.h:47
bool Stop() noexcept
Definition PeriodicTimer.h:44
PeriodicTimer() noexcept
Definition PeriodicTimer.h:16
~PeriodicTimer()
Definition PeriodicTimer.h:19
bool Create(const char *name, void(*callback)(uint32_t), uint32_t arg, uint32_t periodMs, bool autoStart=false) noexcept
Create a periodic timer.
Definition PeriodicTimer.h:31
OS_Timer timer
Definition PeriodicTimer.h:60
bool created
Definition PeriodicTimer.h:61
bool Start() noexcept
Definition PeriodicTimer.h:41
bool IsValid() const noexcept
Definition PeriodicTimer.h:57
@ OS_AUTO_START
Definition os_cmsis.h:54
@ OS_DONT_START
Definition os_cmsis.h:55
osTimerId_t OS_Timer
Definition os_cmsis.h:32