11#ifndef FREERTOS_PORTMACRO_H
12#define FREERTOS_PORTMACRO_H
20#include "esp_heap_caps.h"
31#define portBASE_TYPE int
32#define portUBASE_TYPE unsigned portBASE_TYPE
33#define portTICK_TYPE uint32_t
34#define portSTACK_TYPE uint8_t
36#define portMAX_DELAY 0xFFFFFFFFUL
38#define portMUX_TYPE mutex_t
39#define portMUX_INITIALIZE mutex_init
40#define portMUX_INITIALIZER_UNLOCKED MUTEX_INIT
42#define portYIELD thread_yield_higher
43#define portYIELD_FROM_ISR thread_yield_higher
45#define portENTER_CRITICAL vTaskEnterCritical
46#define portEXIT_CRITICAL vTaskExitCritical
47#define portENTER_CRITICAL_SAFE vTaskEnterCritical
48#define portEXIT_CRITICAL_SAFE vTaskExitCritical
49#define portENTER_CRITICAL_ISR vTaskEnterCritical
50#define portEXIT_CRITICAL_ISR vTaskExitCritical
51#define portENTER_CRITICAL_NESTED irq_disable
52#define portEXIT_CRITICAL_NESTED irq_restore
54#define portSET_INTERRUPT_MASK_FROM_ISR xPortSetInterruptMaskFromISR
55#define portCLEAR_INTERRUPT_MASK_FROM_ISR vPortClearInterruptMaskFromISR
57#define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 )
59#if defined(CPU_FAM_ESP32) || defined(CPU_FAM_ESP32S3)
61#define portNUM_PROCESSORS 2
62#define xPortGetCoreID() PRO_CPU_NUM
63#define vPortYield portYIELD
67#define portNUM_PROCESSORS 1
68#define xPortGetCoreID() PRO_CPU_NUM
69#define vPortYield portYIELD
73extern void vTaskEnterCritical(portMUX_TYPE *mux);
74extern void vTaskExitCritical(portMUX_TYPE *mux);
76bool xPortCanYield(
void);
Mutex for thread synchronization.