/* Create one task. */ xTaskCreate( vTask1, /* Pointer to the function that implements the task. */ "Task 1", /* Text name for the task. This is to facilitate debugging only. */ 200, /* Stack depth in words. */ NULL, /* We are not using the task parameter. */ 1, /* This task will run at priority 1. */ NULL ); /* We are not using the task handle. */
/* Create one task. */ xTaskCreate( vTask2, /* Pointer to the function that implements the task. */ "Task 2", /* Text name for the task. This is to facilitate debugging only. */ 200, /* Stack depth in words. */ NULL, /* We are not using the task parameter. */ 2, /* This task will run at priority 1. */ NULL ); /* We are not using the task handle. */
/* Start the scheduler so our tasks start executing. */ vTaskStartScheduler(); .............. ..............
void vTask1( void *pvParameters ) { /* As per most tasks, this task is implemented in an infinite loop. */ while(1) { LED_Toggle(0); LED_Toggle(2); vTaskDelay(800); } }
void vTask2( void *pvParameters ) { /* As per most tasks, this task is implemented in an infinite loop. */ while(1) { LED_Toggle(1); LED_Toggle(3); vTaskDelay(1600); } }