Espressif ESP32-S2 Programming Manual page 872

Table of Contents

Advertisement

Chapter 2. API Reference
{
// Our priority (obtained using NULL handle) is higher.
}
}
Return The priority of xTask.
Parameters
• xTask: Handle of the task to be queried. Passing a NULL handle results in the priority of the
calling task being returned.
UBaseType_t uxTaskPriorityGetFromISR(const
A version of uxTaskPriorityGet() that can be used from an ISR.
eTaskState eTaskGetState(TaskHandle_t
INCLUDE_eTaskGetState must be defined as 1 for this function to be available. See the configuration section
for more information.
Obtain the state of any task. States are encoded by the eTaskState enumerated type.
Return The state of xTask at the time the function was called. Note the state of the task might change between
the function being called, and the functions return value being tested by the calling task.
Parameters
• xTask: Handle of the task to be queried.
void
vTaskGetInfo(TaskHandle_t
eTaskState
configUSE_TRACE_FACILITY must be defined as 1 for this function to be available. See the configuration
section for more information.
Populates a TaskStatus_t structure with information about a task.
Example usage:
void vAFunction( void )
{
TaskHandle_t xHandle;
TaskStatus_t xTaskDetails;
//
Obtain the handle of a task
xHandle
=
xTaskGetHandle(
//
Check the handle
configASSERT( xHandle );
//
Use the handle to obtain further information about the
vTaskGetInfo( xHandle,
}
Parameters
• xTask: Handle of the task being queried. If xTask is NULL then information will be returned
about the calling task.
• pxTaskStatus: A pointer to the TaskStatus_t structure that will be filled with information about
the task referenced by the handle passed using the xTask parameter.
• xGetFreeStackSpace: The TaskStatus_t structure contains a member to report the stack high
water mark of the task being queried. Calculating the stack high water mark takes a relatively long
time, and can make the system temporarily unresponsive - so the xGetFreeStackSpace parameter is
provided to allow the high water mark checking to be skipped. The high watermark value will only
be written to the TaskStatus_t structure if xGetFreeStackSpace is not set to pdFALSE;
• eState: The TaskStatus_t structure contains a member to report the state of the task being queried.
Obtaining the task state is not as fast as a simple assignment - so the eState parameter is provided to
Espressif Systems
xTask)
xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace,
eState)
from
"Task_Name"
is not
NULL.
&xTaskDetails,
pdTRUE,
//
Include the high water mark
eInvalid );
//
Include the task state
Submit Document Feedback
TaskHandle_t
xTask)
its
name.
);
in
in
861
(continued from previous page)
task.
xTaskDetails.
xTaskDetails.
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF