下载 FreeRTOS
 

出色的 RTOS & 嵌入式软件

内核
最新资讯
简化任何设备的身份验证云连接。
利用 CoAP 设计节能型云连接 IoT 解决方案。
11.0.0 版 FreeRTOS 内核简介:
FreeRTOS 路线图和代码贡献流程。
使用 FreeRTOS 实现 OPC-UA over TSN。

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.