Run FreeRTOS task using a lambda.
- esp-idf v2.1.1
Like this
static m2d::FreeRTOS::Task task("Task name", 10, 1024 * 3, [&] {
while (1) {
// Do something
vTaskDelay(25 / portTICK_PERIOD_MS);
}
});
task.run();
DO NOT release a variable when task is running.
MIT