ESP32-IDF
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Data Structures | Macros | Typedefs | Functions
portmacro.h File Reference
#include <stdint.h>
#include <xtensa/tie/xt_core.h>
#include <xtensa/hal.h>
#include <xtensa/config/core.h>
#include <xtensa/config/system.h>
#include <xtensa/xtruntime.h>
#include "portbenchmark.h"
#include "sdkconfig.h"

Go to the source code of this file.

Data Structures

struct  portMUX_TYPE
 
struct  xMPU_SETTINGS
 

Macros

#define portCHAR   int8_t
 
#define portFLOAT   float
 
#define portDOUBLE   double
 
#define portLONG   int32_t
 
#define portSHORT   int16_t
 
#define portSTACK_TYPE   uint8_t
 
#define portBASE_TYPE   int
 
#define portMAX_DELAY   ( TickType_t ) 0xffffffffUL
 
#define portFIRST_TASK_HOOK   CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
 
#define portMUX_MAGIC_VAL   0xB33F0000
 
#define portMUX_FREE_VAL   0xB33FFFFF
 
#define portMUX_MAGIC_MASK   0xFFFF0000
 
#define portMUX_MAGIC_SHIFT   16
 
#define portMUX_CNT_MASK   0x0000FF00
 
#define portMUX_CNT_SHIFT   8
 
#define portMUX_VAL_MASK   0x000000FF
 
#define portMUX_VAL_SHIFT   0
 
#define portMUX_INITIALIZER_UNLOCKED
 
#define portDISABLE_INTERRUPTS()   do { XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); portbenchmarkINTERRUPT_DISABLE(); } while (0)
 
#define portENABLE_INTERRUPTS()   do { portbenchmarkINTERRUPT_RESTORE(0); XTOS_SET_INTLEVEL(0); } while (0)
 
#define portASSERT_IF_IN_ISR()   vPortAssertIfInISR()
 
#define portCRITICAL_NESTING_IN_TCB   1
 
#define portENTER_CRITICAL(mux)   vTaskEnterCritical(mux)
 
#define portEXIT_CRITICAL(mux)   vTaskExitCritical(mux)
 
#define portENTER_CRITICAL_ISR(mux)   vPortCPUAcquireMutex(mux)
 
#define portEXIT_CRITICAL_ISR(mux)   vPortCPUReleaseMutex(mux)
 
#define portEXIT_CRITICAL_NESTED(state)   do { portbenchmarkINTERRUPT_RESTORE(state); XTOS_RESTORE_JUST_INTLEVEL(state); } while (0)
 
#define portSET_INTERRUPT_MASK_FROM_ISR()   portENTER_CRITICAL_NESTED()
 
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(state)   portEXIT_CRITICAL_NESTED(state)
 
#define portSTACK_GROWTH   ( -1 )
 
#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 
#define portBYTE_ALIGNMENT   4
 
#define portNOP()   XT_NOP()
 
#define portGET_RUN_TIME_COUNTER_VALUE()   xthal_get_ccount()
 
#define portYIELD()   vPortYield()
 
#define portYIELD_FROM_ISR()   _frxt_setup_switch()
 
#define portTASK_FUNCTION_PROTO(vFunction, pvParameters)   void vFunction( void *pvParameters )
 
#define portTASK_FUNCTION(vFunction, pvParameters)   void vFunction( void *pvParameters )
 

Typedefs

typedef portSTACK_TYPE StackType_t
 
typedef portBASE_TYPE BaseType_t
 
typedef unsigned portBASE_TYPE UBaseType_t
 
typedef uint32_t TickType_t
 

Functions

void vPortAssertIfInISR ()
 
void vPortCPUInitializeMutex (portMUX_TYPE *mux)
 
void vTaskExitCritical (portMUX_TYPE *mux)
 
void vTaskEnterCritical (portMUX_TYPE *mux)
 
void vPortCPUAcquireMutex (portMUX_TYPE *mux)
 
portBASE_TYPE vPortCPUReleaseMutex (portMUX_TYPE *mux)
 
void vPortYield (void)
 
void _frxt_setup_switch (void)
 

Macro Definition Documentation

#define portASSERT_IF_IN_ISR ( )    vPortAssertIfInISR()
#define portBASE_TYPE   int
#define portBYTE_ALIGNMENT   4
#define portCHAR   int8_t
#define portCLEAR_INTERRUPT_MASK_FROM_ISR (   state)    portEXIT_CRITICAL_NESTED(state)
#define portCRITICAL_NESTING_IN_TCB   1
#define portDISABLE_INTERRUPTS ( )    do { XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); portbenchmarkINTERRUPT_DISABLE(); } while (0)
#define portDOUBLE   double
#define portENABLE_INTERRUPTS ( )    do { portbenchmarkINTERRUPT_RESTORE(0); XTOS_SET_INTLEVEL(0); } while (0)
#define portENTER_CRITICAL (   mux)    vTaskEnterCritical(mux)
#define portENTER_CRITICAL_ISR (   mux)    vPortCPUAcquireMutex(mux)
#define portEXIT_CRITICAL (   mux)    vTaskExitCritical(mux)
#define portEXIT_CRITICAL_ISR (   mux)    vPortCPUReleaseMutex(mux)
#define portEXIT_CRITICAL_NESTED (   state)    do { portbenchmarkINTERRUPT_RESTORE(state); XTOS_RESTORE_JUST_INTLEVEL(state); } while (0)
#define portFIRST_TASK_HOOK   CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
#define portFLOAT   float
#define portGET_RUN_TIME_COUNTER_VALUE ( )    xthal_get_ccount()
#define portLONG   int32_t
#define portMAX_DELAY   ( TickType_t ) 0xffffffffUL
#define portMUX_CNT_MASK   0x0000FF00
#define portMUX_CNT_SHIFT   8
#define portMUX_FREE_VAL   0xB33FFFFF
#define portMUX_INITIALIZER_UNLOCKED
Value:
{ \
}
#define portMUX_FREE_VAL
Definition: portmacro.h:144
#define portMUX_MAGIC_VAL
Definition: portmacro.h:143
#define portMUX_MAGIC_MASK   0xFFFF0000
#define portMUX_MAGIC_SHIFT   16
#define portMUX_MAGIC_VAL   0xB33F0000
#define portMUX_VAL_MASK   0x000000FF
#define portMUX_VAL_SHIFT   0
#define portNOP ( )    XT_NOP()
#define portSET_INTERRUPT_MASK_FROM_ISR ( )    portENTER_CRITICAL_NESTED()
#define portSHORT   int16_t
#define portSTACK_GROWTH   ( -1 )
#define portSTACK_TYPE   uint8_t
#define portTASK_FUNCTION (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters )
#define portTASK_FUNCTION_PROTO (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters )
#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portYIELD ( )    vPortYield()
#define portYIELD_FROM_ISR ( )    _frxt_setup_switch()

Typedef Documentation

typedef unsigned portBASE_TYPE UBaseType_t

Function Documentation

void _frxt_setup_switch ( void  )
void vPortAssertIfInISR ( )
void vPortCPUAcquireMutex ( portMUX_TYPE mux)
void vPortCPUInitializeMutex ( portMUX_TYPE mux)
portBASE_TYPE vPortCPUReleaseMutex ( portMUX_TYPE mux)
void vPortYield ( void  )
void vTaskEnterCritical ( portMUX_TYPE mux)
void vTaskExitCritical ( portMUX_TYPE mux)