Chapter 2. API Reference
const char
*pcTimerGetName(TimerHandle_t
const char * const pcTimerGetName( TimerHandle_t xTimer );
Returns the name that was assigned to a timer when the timer was created.
Return The name assigned to the timer specified by the xTimer parameter.
Parameters
• xTimer: The handle of the timer being queried.
void
vTimerSetReloadMode(TimerHandle_t
void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload );
Updates a timer to be either an auto-reload timer, in which case the timer automatically resets itself each time
it expires, or a one-shot timer, in which case the timer will only expire once unless it is manually restarted.
Parameters
• xTimer: The handle of the timer being updated.
• uxAutoReload: If uxAutoReload is set to pdTRUE then the timer will expire repeatedly with a
frequency set by the timer' s period (see the xTimerPeriodInTicks parameter of the xTimerCreate()
API function). If uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and enter
the dormant state after it expires.
UBaseType_t
uxTimerGetReloadMode(TimerHandle_t
UBaseType_t uxTimerGetReloadMode( TimerHandle_t xTimer );
Queries a timer to determine if it is an auto-reload timer, in which case the timer automatically resets itself
each time it expires, or a one-shot timer, in which case the timer will only expire once unless it is manually
restarted.
Return If the timer is an auto-reload timer then pdTRUE is returned, otherwise pdFALSE is returned.
Parameters
• xTimer: The handle of the timer being queried.
TickType_t
xTimerGetPeriod(TimerHandle_t
TickType_t xTimerGetPeriod( TimerHandle_t xTimer );
Returns the period of a timer.
Return The period of the timer in ticks.
Parameters
• xTimer: The handle of the timer being queried.
TickType_t
xTimerGetExpiryTime(TimerHandle_t
TickType_t xTimerGetExpiryTime( TimerHandle_t xTimer );
Returns the time in ticks at which the timer will expire. If this is less than the current tick count then the expiry
time has overflowed from the current time.
Return If the timer is running then the time in ticks at which the timer will next expire is returned. If the
timer is not running then the return value is undefined.
Parameters
• xTimer: The handle of the timer being queried.
void vApplicationGetTimerTaskMemory(StaticTask_t
This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Timer Task
TCB. This function is required when configSUPPORT_STATIC_ALLOCATION is set. For more information
see this URI:
https://www.FreeRTOS.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
Parameters
• ppxTimerTaskTCBBuffer: A handle to a statically allocated TCB buffer
• ppxTimerTaskStackBuffer: A handle to a statically allocated Stack buffer for thie idle task
• pulTimerTaskStackSize: A pointer to the number of elements that will fit in the allocated
stack buffer
Espressif Systems
xTimer)
xTimer, const UBaseType_t uxAutoReload)
xTimer)
xTimer)
xTimer)
Type_t
**ppxTimerTaskStackBuffer,
*pulTimerTaskStackSize)
921
Submit Document Feedback
**ppxTimerTaskTCBBuffer,
Stack-
uint32_t
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers