//Created by Barbu Vulc!
//Running FreeRTOS on an ESP32 board!
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
/*
#if CONFIG_FREERTOS_UNICORE
#define ARDUINO_RUNNING_CORE 0
#else
#define ARDUINO_RUNNING_CORE 1
#endif
*/
void setup() {
//Initialize serial communication & FreeRTOS task:
Serial.begin(115200);
xTaskCreate(Task, "task", 1024, NULL, 0, NULL);
}
//Task's creation:
void Task(void *pvParameters){
//(void) pvParameters;
for(;;){
Serial.println("Hello Task!");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
//We don't need to use loop function here!
void loop() {
Serial.println("Loop");
delay(2000);
}