MQX RTOS, passing parameter(s) to Auto start tasks! How?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX RTOS, passing parameter(s) to Auto start tasks! How?

781 Views
_ZZ_
Contributor II

Hello everybody,

this might be a very simple one, but I don't know it. 

I know how to pass parameter to a task which is created inside other task susing : 

 _task_create(blabla, blabla, (uint32_t) parameter);

but how/where do I pass parameter to the tasks which are set to MQX_AUTO_START_TASK ???

thanks 

0 Kudos
1 Reply

626 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Roosbeh Almasi 

Please refer to the MQX_template_list,  the param next to last is the parameter passed to tasks that MQX creates from the template.

const TASK_TEMPLATE_STRUCT  MQX_template_list[] =
{
    /* Task Index,   Function,   Stack,  Priority, Name,     Attributes,                              Param, Time Slice */
    { HELLO_TASK,   hello_task, 1500,   8,        "hello",  MQX_AUTO_START_TASK, 0,          0 },
    { 0 }
};

Regards

Daniel

0 Kudos