I'm doing some work on logging in my 200D port and I'm confused by the advantages of task_create. Can someone explain the difference between these two examples?
msleep(1000);
do_stuff();
and
msleep(1000);
task_create("do_stuff", 0x1e, 0x1000, do_stuff, 0 );
Is the benefit on the second case related to blocking, because tasks go in a queue? Is that all there is?
If you start do_stuff() the first way, it will obviously execute in the same task.
If you launch it as a new task, it will run independently, in parallel. Also, you get to specify the task priority (0x1e), and the amount of stack space (0x1000).
Thanks, that's mostly how I guessed (hadn't considered the priority). I think I know the right way to do what I want.