这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 软件与操作系统 » 【求助】FreeRTOS任务调度程序如何工作的?

共1条 1/1 1 跳转至

【求助】FreeRTOS任务调度程序如何工作的?

菜鸟
2021-09-23 15:52:18     打赏

我一直在阅读官网文档:

Https://www.freertos.org/a00132.html

我不明白如何使用vTaskStartScheduler()。我可以创建任务,但据我所知,仅创建任务是不够的。只有在调度程序启动时才会执行任务。

示例用法:

void vAFunction( void )
{
     // Tasks can be created before or after starting the RTOS
     scheduler
     xTaskCreate( vTaskCode,
                  "NAME",
                  STACK_SIZE,
                  NULL,
                  tskIDLE_PRIORITY,
                  NULL );
     // Start the real time scheduler.
     vTaskStartScheduler();
     // Will not get here unless there is insufficient RAM.
}



关键词: FreeRTOS    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]