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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

158 Views
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

3 Views
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