Updated Mar 2025
vTimerSetReloadMode
timers.h
1 void vTimerSetReloadMode( TimerHandle_t xTimer,2 const UBaseType_t uxAutoReload );
Updates the 'mode' of a software timer to be either an auto reload timer or a one-shot timer.
An auto reload timer resets itself each time it expires, causing the timer to expire (and therefore execute its callback) periodically.
A one shot timer does not automatically reset itself, so will only expire (and therefore execute its callback) once unless it is manually restarted.
This API function is only available if the FreeRTOS/Source/timers.c source file is included in the built project.
Parameters:
-
xTimer
The handle of the timer to update. The handle will have been returned from the call to xTimerCreate() or xTimerCreateStatic() used to create the timer.
-
uxAutoReload
Set
touxAutoReloadto set the timer into auto reload mode, orpdTRUEto set the timer into one shot mode.pdFALSE