2021-02-04 12:42:43 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
// espressif includes
|
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
|
|
|
#include <freertos/task.h>
|
|
|
|
|
|
|
|
|
|
// local includes
|
|
|
|
|
#include "cpptypesafeenum.h"
|
|
|
|
|
|
|
|
|
|
namespace espcpputils {
|
|
|
|
|
#define CoreAffinityValues(x) \
|
|
|
|
|
x(Core0) \
|
|
|
|
|
x(Core1) \
|
|
|
|
|
x(Both)
|
|
|
|
|
DECLARE_TYPESAFE_ENUM(CoreAffinity, : uint8_t, CoreAffinityValues)
|
|
|
|
|
|
|
|
|
|
BaseType_t createTask(TaskFunction_t pvTaskCode,
|
|
|
|
|
const char * const pcName,
|
|
|
|
|
const uint32_t usStackDepth,
|
|
|
|
|
void * const pvParameters,
|
|
|
|
|
UBaseType_t uxPriority,
|
|
|
|
|
TaskHandle_t * const pvCreatedTask,
|
2021-02-09 18:16:31 +01:00
|
|
|
CoreAffinity coreAffinity);
|
2021-02-04 12:42:43 +01:00
|
|
|
} // namespace espcpputils
|