11 #ifndef FREERTOS_TASK_H
12 #define FREERTOS_TASK_H
19 #include "freertos/FreeRTOS.h"
25 #define xTaskHandle TaskHandle_t
26 #define tskNO_AFFINITY INT_MAX
28 #define taskDISABLE_INTERRUPTS portDISABLE_INTERRUPTS
29 #define taskENABLE_INTERRUPTS portENABLE_INTERRUPTS
31 #define taskENTER_CRITICAL portENTER_CRITICAL
32 #define taskEXIT_CRITICAL portEXIT_CRITICAL
34 typedef void (*TaskFunction_t)(
void *);
36 typedef void* TaskHandle_t;
38 BaseType_t xTaskCreate(TaskFunction_t pvTaskCode,
39 const char *
const pcName,
40 const uint32_t usStackDepth,
41 void *
const pvParameters,
42 UBaseType_t uxPriority,
43 TaskHandle_t *
const pvCreatedTask);
45 BaseType_t xTaskCreatePinnedToCore(TaskFunction_t pvTaskCode,
46 const char *
const pcName,
47 const uint32_t usStackDepth,
48 void *
const pvParameters,
49 UBaseType_t uxPriority,
50 TaskHandle_t *
const pvCreatedTask,
51 const BaseType_t xCoreID);
53 void vTaskDelete(TaskHandle_t xTaskToDelete);
54 void vTaskDelay(
const TickType_t xTicksToDelay);
56 TaskHandle_t xTaskGetCurrentTaskHandle(
void);
58 void vTaskEnterCritical(portMUX_TYPE *mux);
59 void vTaskExitCritical(portMUX_TYPE *mux);
61 TickType_t xTaskGetTickCount(
void);