
ACR89U-A1 – Application Programming Interface info@acs.com.hk
Version 1.01
www.acs.com.hk
Page 46 of 78
Example:
void vAFunction( void )
{
xTaskHandle xHandle;
// Create a task, storing the handle.
xTaskCreate( vTaskCode,
"NAME",
STACK_SIZE,
NULL,
tskIDLE_PRIORITY,
&xHandle );
// ...
// Use the handle to suspend the created task.
vTaskSuspend( xHandle );
// ...
// The created task will not run during this period, unless
// another task calls vTaskResume( xHandle ).
//...
// Suspend ourselves.
vTaskSuspend( NULL );
// We cannot get here unless another task calls vTaskResume
// with our handle as the parameter.
}
6.2.6. vTaskResume
This function resumes a suspended task. A task that has been suspended by one of more calls to
vTaskSuspend () will be made available for running again by a single call to vTaskResume ().
[task.h]
void vTaskResume( xTaskHandle pxTaskToResume );
Parameters:
pxTaskToResume [in] Handle to the task being readied.
Example:
void vAFunction( void )
{
xTaskHandle xHandle;
// Create a task, storing the handle.
xTaskCreate( vTaskCode,
"NAME",
STACK_SIZE,
NULL,
tskIDLE_PRIORITY,
&xHandle );
// ...
Comments to this Manuals