Creating Tasks using RTOS
Up to Development Discussion
Sorry, another silly question here:
I'm trying to utilize multiple tasks using the RTOS and have been reading the tutorials regarding it. However, there's one ambiguity to me that if someone could clear up, I'd greatly appreciate it.
The example in the tutorial has in the creation of a task,
TaskCreate( MyTask, "Mine", 1000, 0, 1);
I understand that MyTask and "Mine" are the names, 1000 is the memory allocated to this task, and that one of the remaining two parameters is the priority. My question is, which one is it and what then does the other number represent?
Thanks-
Gilbert Davis
The API is your friend - check http://www.makingthings.com/ref/firmware/html/group___tasks.html#g784f87fb45eebb76d07478036ed228d3
The last one is the priority, and the second to last is a void* that you can use to pass a parameter into your task. In most of the examples this is not used, which is why the 'void *p' is almost always unused.
The last one is the priority, and the second to last is a void* that you can use to pass a parameter into your task. In most of the examples this is not used, which is why the 'void *p' is almost always unused.
Powered by
Ploneboard
Shopping Cart