This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Organising multiple task IDs

I want part of my program to send messages to layers (the app layer and HAL). Based on the TI demo apps, I need two registered task IDs to do this. How do you tell one registered task ID from the first one?

I understand that HAL is initiated first, so I should assume the first task ID that's registered is from HAL. But is there a better method? What do the pros do?

  • Hi Peter,

    The task ID are stored in a global variable in the respective init functions such as: 

    void HeartRate_Init( uint8 task_id )
    {
      heartRate_TaskID = task_id;

     

    You could also make them nonstatic and access it from other files/layers.