Chapter 2. API Reference
{ 0,
};
void vATask( void *pvParameters )
{
//
This task was created such that it has access to certain regions of
//
memory
as
defined by the MPU
//
desired that these MPU regions are replaced
//
xAltRegions const struct
//
for
this
purpose.
//
function should modify the MPU regions of the calling
vTaskAllocateMPURegions( NULL, xAltRegions );
//
Now the task can
//
access its stack
//
defined
or
}
Parameters
• xTask: The handle of the task being updated.
• pxRegions: A pointer to an MemoryRegion_t structure that contains the new memory region
definitions.
void
vTaskDelete(TaskHandle_t
INCLUDE_vTaskDelete must be defined as 1 for this function to be available. See the configuration section
for more information.
Remove a task from the RTOS real time kernel's management. The task being deleted will be removed from
all ready, blocked, suspended and event lists.
NOTE: The idle task is responsible for freeing the kernel allocated memory from tasks that have been deleted.
It is therefore important that the idle task is not starved of microcontroller processing time if your application
makes any calls to vTaskDelete (). Memory allocated by the task code is not automatically freed, and should
be freed before the task is deleted.
See the demo application file death.c for sample code that utilises vTaskDelete ().
Example usage:
void vOtherFunction( void )
{
TaskHandle_t xHandle;
//
Create the task, storing the
xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY,
);
→
//
Use the handle to delete the
vTaskDelete( xHandle );
}
Parameters
• xTaskToDelete: The handle of the task to be deleted. Passing NULL will cause the calling task
to be deleted.
void vTaskDelay(const TickType_t xTicksToDelay)
Delay a task for a given number of ticks. The actual time that the task remains blocked depends on the tick
rate. The constant portTICK_PERIOD_MS can be used to calculate real time from the tick rate - with the
resolution of one tick period.
INCLUDE_vTaskDelay must be defined as 1 for this function to be available. See the configuration section
for more information.
Espressif Systems
0,
0
configuration.
above.
NULL
is
used
continue
its function, but
and
the ucOneKByte array (unless
shared regions have been declared
xTaskToDelete)
handle.
task.
Submit Document Feedback
}
At some point it
with
that defined
Use a call to vTaskAllocateMPURegions()
as
the task handle to indicate that this
from
this
any
elsewhere).
858
(continued from previous page)
is
in
the
task.
point on can only
other statically
&xHandle␣
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?