永发信息网

ucos-ii如何向任务传递参数?

答案:1  悬赏:80  手机版
解决时间 2021-03-21 00:26
  • 提问者网友:相思似海深
  • 2021-03-20 02:28
ucos-ii如何向任务传递参数?
最佳答案
  • 五星知识达人网友:大漠
  • 2021-03-20 03:06
INT8U OSTaskCreate (void (*task)(void *p_arg), void *p_arg, OS_STK *ptos, INT8U prio)

p_arg is a pointer to an optional data area which can be used to pass parameters to the task when the task first executes. Where the task is concerned it thinks it was invoked and passed the argument 'p_arg' as follows:
* void Task (void *p_arg)
* {
* for (;;) {
* Task code;
* }
* }
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯