EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #871 background imageLoading...
Page #871 background image
Chapter 2. API Reference
(continued from previous page)
}
}
Return Value which can be used to check whether the task was actually delayed. Will be pdTRUE if the task
way delayed and pdFALSE otherwise. A task will not be delayed if the next expected wake time is in the
past.
Parameters
pxPreviousWakeTime: Pointer to a variable that holds the time at which the task was last
unblocked. The variable must be initialised with the current time prior to its first use (see the example
below). Following this the variable is automatically updated within xTaskDelayUntil ().
xTimeIncrement: The cycle time period. The task will be unblocked at time *pxPreviousWake-
Time + xTimeIncrement. Calling xTaskDelayUntil with the same xTimeIncrement parameter value
will cause the task to execute with a fixed interface period.
BaseType_t xTaskAbortDelay(TaskHandle_t xTask)
INCLUDE_xTaskAbortDelay must be defined as 1 in FreeRTOSConfig.h for this function to be available.
A task will enter the Blocked state when it is waiting for an event. The event it is waiting for can be a tem-
poral event (waiting for a time), such as when vTaskDelay() is called, or an event on an object, such as when
xQueueReceive() or ulTaskNotifyTake() is called. If the handle of a task that is in the Blocked state is used
in a call to xTaskAbortDelay() then the task will leave the Blocked state, and return from whichever function
call placed the task into the Blocked state.
There is no FromISRversion of this function as an interrupt would need to know which object a task
was blocked on in order to know which actions to take. For example, if the task was blocked on a queue the
interrupt handler would then need to know if the queue was locked.
Return If the task referenced by xTask was not in the Blocked state then pdFAIL is returned. Otherwise
pdPASS is returned.
Parameters
xTask: The handle of the task to remove from the Blocked state.
UBaseType_t uxTaskPriorityGet(const TaskHandle_t xTask)
INCLUDE_uxTaskPriorityGet must be defined as 1 for this function to be available. See the configuration
section for more information.
Obtain the priority of any task.
Example usage:
void vAFunction( void )
{
TaskHandle_t xHandle;
// Create a task, storing the handle.
xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle
,);
// ...
// Use the handle to obtain the priority of the created task.
// It was created with tskIDLE_PRIORITY, but may have changed
// it itself.
if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY )
{
// The task has changed it's priority.
}
// ...
// Is our priority higher than the created task?
if( uxTaskPriorityGet( xHandle ) < uxTaskPriorityGet( NULL ) )
(continues on next page)
Espressif Systems 860
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish