下载 FreeRTOS
 

出色的 RTOS & 嵌入式软件

内核
最新资讯
FreeRTOS-Plus-TCP 现具有统一的 IPv4 和 IPv6 功能,支持多接口。
为基于 FreeRTOS 的固件实现防砖化 MCU FOTA:
宣布停止支持 FreeRTOS 202012 LTS。
FreeRTOS 网站现已提供简体中文版本
新的 FreeRTOS Long Term Support 版本现已发布。

vTaskResume
[任务控制]

task. h
void vTaskResume( TaskHandle_t xTaskToResume );

必须将 INCLUDE_vTaskSuspend 定义为 1 才能使用此函数。有关详细信息,请参阅 RTOS 配置文档。

恢复已挂起的任务。

由一次或多次调用 vTaskSuspend () 而挂起的任务可通过单次调用 vTaskResume () 重新运行。

参数:
xTaskToResume 要恢复的任务句柄。
用法示例:
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 suspend the created task. vTaskSuspend( xHandle );

// ...

// The created task will not run during this period, unless // another task calls vTaskResume( xHandle ).

//...

// Resume the suspended task ourselves. vTaskResume( xHandle );

// The created task will once again get microcontroller processing // time in accordance with its priority within the system. }





Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.