1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include "freertos/FreeRTOS.h" 5 #include "freertos/task.h" 6 #include "freertos/queue.h" 7 #include "driver/gpio.h" 8 9 static void task(void* arg) 10 { 11 char *name = (char *)arg; 12 for(;;) { 13 printf("%s \n",name); 14 vTaskDelay(2000 / portTICK_RATE_MS); 15 } 16 } 17 18 19 void app_main() 20 { 21 xTaskCreate(task, "task_1", 2048, "task_1", 5, NULL); 22 xTaskCreate(task, "task_2", 2048, "task_2", 5, NULL); 23 } 24 ~