This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/TM4C1290NCPDT:如何使用 task_create 在停止状态下创建任务

Guru**** 3040470 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/863510/ccs-tm4c1290ncpdt-how-i-use-task_create-to-create-task-in-stop-state

器件型号:TM4C1290NCPDT

工具/软件:Code Composer Studio

您好,

我想了解如何使用 task_create 在暂停/停止状态下创建任务并以编程方式将新创建的任务置于运行模式。

谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sergey、

    若要创建任务而不准备好运行、您可以为其指定-1的优先级。  例如:

       Task_Params      taskParams;

       Task_Params_init (&taskParams);

       taskParams.priority =-1;
       任务= Task_create (...、&taskParams、...);

    优先级为-1时、任务处于非活动状态。  然后、要允许任务运行、请将优先级更改为大于0且小于 Task_numPriorities 的值。

       Task_setPri (任务、优先级);

    此致、

    Janet