// Loop through the task table and create each task. for(uint8_t TaskCount = 0; TaskCount < TasksToCreate; TaskCount++) { (void)xTaskCreate(TaskInitParameters[TaskCount].TaskCodePtr, TaskInitParameters[TaskCount].TaskName, TaskInitParameters[TaskCount].StackDepth, TaskInitParameters[TaskCount].ParametersPtr, TaskInitParameters[TaskCount].TaskPriority, TaskInitParameters[TaskCount].TaskHandle); }


/** * Task configuration table that contains all the parameters necessary to initialize * the system tasks. */ TaskInitParams_t const TaskInitParameters[] = { // Pointer to the Task function, Task String Name , The task stack depth , Parameter Pointer, Task priority , Task Handle {(TaskFunction_t)Task_Telemetry, "Task_Telemetry", TASK_TELEMETRY_STACK_DEPTH, &Telemetry, TASK_TELEMETRY_PRIORITY, NULL }, {(TaskFunction_t)Task_TxMessaging, "Task_TxMessaging", TASK_TXMESSAGING_STACK_DEPTH, … Continue reading RTOS_Init_Snippet_2


/** * Task configuration structure used to create a task configuration table. * Note: this is for dynamic memory allocation. We create all the tasks up front * dynamically and then never allocate memory again after initialization. * todo: This could be updated to allocate tasks statically. */ typedef struct { TaskFunction_t const TaskCodePtr; /*< … Continue reading RTOS_Init_Snippet_1