SomeFreeRTOSExamples/examples/ex1_task_hello/main.c

22 lines
459 B
C
Raw Permalink Normal View History

#include "pico/stdlib.h"
#include "FreeRTOS.h"
#include "task.h"
void hello_task(void *pvParameters) {
while (true) {
printf("Hello from FreeRTOS! Success!\n");
vTaskDelay(pdMS_TO_TICKS(1000));
}
}
int main() {
stdio_init_all();
xTaskCreate(hello_task, "Hello Task", 256, NULL, 1, NULL);
vTaskStartScheduler();
// The scheduler will take over, so main() should never reach here.
while (true) {}
return 0;
}