4#include "freertos/FreeRTOS.h"
5#include "freertos/task.h"
6#elif defined(__linux__)
13#include "AudioLogger.h"
43 Task(
const char* name,
int stackSizeWords,
int priority = 1,
int core = -1)
54 bool create(
const char* name,
int stackSizeWords,
int priority = 1,
60 if (priority >= configMAX_PRIORITIES) {
61 priority = configMAX_PRIORITIES - 1;
62 LOGW(
"clamped task priority to %d ", priority);
66 xTaskCreatePinnedToCore(
task_loop, name, stackSizeWords,
this, priority,
74#if defined(configUSE_CORE_AFFINITY) && (configUSE_CORE_AFFINITY == 1) && \
75 (configNUMBER_OF_CORES > 1)
78 if (core >= 0) vTaskCoreAffinitySet(
xHandle, (1 << core));
94 bool begin(std::function<
void()> process) {
140 return xPortGetCoreID();
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define LOGI(...)
Definition AudioLoggerIDF.h:28