Labor04
portmacro.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define portCHAR   char
 
#define portFLOAT   float
 
#define portDOUBLE   double
 
#define portLONG   long
 
#define portSHORT   short
 
#define portSTACK_TYPE   uint32_t
 
#define portBASE_TYPE   long
 
#define portMAX_DELAY   ( TickType_t ) 0xffffffffUL
 
#define portTICK_TYPE_IS_ATOMIC   1
 
#define portSTACK_GROWTH   ( -1 )
 
#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 
#define portBYTE_ALIGNMENT   8
 
#define portSY_FULL_READ_WRITE   ( 15 )
 
#define portYIELD()
 
#define portNVIC_INT_CTRL_REG   ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )
 
#define portNVIC_PENDSVSET_BIT   ( 1UL << 28UL )
 
#define portEND_SWITCHING_ISR(xSwitchRequired)   if( xSwitchRequired != pdFALSE ) portYIELD()
 
#define portYIELD_FROM_ISR(x)   portEND_SWITCHING_ISR( x )
 
#define portDISABLE_INTERRUPTS()   vPortRaiseBASEPRI()
 
#define portENABLE_INTERRUPTS()   vPortSetBASEPRI( 0 )
 
#define portENTER_CRITICAL()   vPortEnterCritical()
 
#define portEXIT_CRITICAL()   vPortExitCritical()
 
#define portSET_INTERRUPT_MASK_FROM_ISR()   ulPortRaiseBASEPRI()
 
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)   vPortSetBASEPRI(x)
 
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime)   vPortSuppressTicksAndSleep( xExpectedIdleTime )
 
#define configUSE_PORT_OPTIMISED_TASK_SELECTION   1
 
#define portRECORD_READY_PRIORITY(uxPriority, uxReadyPriorities)   ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
 
#define portRESET_READY_PRIORITY(uxPriority, uxReadyPriorities)   ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
 
#define portGET_HIGHEST_PRIORITY(uxTopPriority, uxReadyPriorities)   uxTopPriority = ( 31UL - ( uint32_t ) __clz( ( uxReadyPriorities ) ) )
 
#define portTASK_FUNCTION_PROTO(vFunction, pvParameters)   void vFunction( void *pvParameters )
 
#define portTASK_FUNCTION(vFunction, pvParameters)   void vFunction( void *pvParameters )
 
#define portNOP()
 
#define portINLINE   __inline
 
#define portFORCE_INLINE   __forceinline
 

Typedefs

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

Functions

void vPortEnterCritical (void)
 
void vPortExitCritical (void)
 
void vPortSuppressTicksAndSleep (TickType_t xExpectedIdleTime)
 
static portFORCE_INLINE void vPortSetBASEPRI (uint32_t ulBASEPRI)
 
static portFORCE_INLINE void vPortRaiseBASEPRI (void)
 
static portFORCE_INLINE void vPortClearBASEPRIFromISR (void)
 
static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI (void)
 
static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt (void)
 

Macro Definition Documentation

◆ configUSE_PORT_OPTIMISED_TASK_SELECTION

#define configUSE_PORT_OPTIMISED_TASK_SELECTION   1

◆ portBASE_TYPE

#define portBASE_TYPE   long

◆ portBYTE_ALIGNMENT

#define portBYTE_ALIGNMENT   8

◆ portCHAR

#define portCHAR   char

◆ portCLEAR_INTERRUPT_MASK_FROM_ISR

#define portCLEAR_INTERRUPT_MASK_FROM_ISR (   x)    vPortSetBASEPRI(x)

◆ portDISABLE_INTERRUPTS

#define portDISABLE_INTERRUPTS ( )    vPortRaiseBASEPRI()

◆ portDOUBLE

#define portDOUBLE   double

◆ portENABLE_INTERRUPTS

#define portENABLE_INTERRUPTS ( )    vPortSetBASEPRI( 0 )

◆ portEND_SWITCHING_ISR

#define portEND_SWITCHING_ISR (   xSwitchRequired)    if( xSwitchRequired != pdFALSE ) portYIELD()

◆ portENTER_CRITICAL

#define portENTER_CRITICAL ( )    vPortEnterCritical()

◆ portEXIT_CRITICAL

#define portEXIT_CRITICAL ( )    vPortExitCritical()

◆ portFLOAT

#define portFLOAT   float

◆ portFORCE_INLINE

#define portFORCE_INLINE   __forceinline

◆ portGET_HIGHEST_PRIORITY

#define portGET_HIGHEST_PRIORITY (   uxTopPriority,
  uxReadyPriorities 
)    uxTopPriority = ( 31UL - ( uint32_t ) __clz( ( uxReadyPriorities ) ) )

◆ portINLINE

#define portINLINE   __inline

◆ portLONG

#define portLONG   long

◆ portMAX_DELAY

#define portMAX_DELAY   ( TickType_t ) 0xffffffffUL

◆ portNOP

#define portNOP ( )

◆ portNVIC_INT_CTRL_REG

#define portNVIC_INT_CTRL_REG   ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )

◆ portNVIC_PENDSVSET_BIT

#define portNVIC_PENDSVSET_BIT   ( 1UL << 28UL )

◆ portRECORD_READY_PRIORITY

#define portRECORD_READY_PRIORITY (   uxPriority,
  uxReadyPriorities 
)    ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )

◆ portRESET_READY_PRIORITY

#define portRESET_READY_PRIORITY (   uxPriority,
  uxReadyPriorities 
)    ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )

◆ portSET_INTERRUPT_MASK_FROM_ISR

#define portSET_INTERRUPT_MASK_FROM_ISR ( )    ulPortRaiseBASEPRI()

◆ portSHORT

#define portSHORT   short

◆ portSTACK_GROWTH

#define portSTACK_GROWTH   ( -1 )

◆ portSTACK_TYPE

#define portSTACK_TYPE   uint32_t

◆ portSUPPRESS_TICKS_AND_SLEEP

#define portSUPPRESS_TICKS_AND_SLEEP (   xExpectedIdleTime)    vPortSuppressTicksAndSleep( xExpectedIdleTime )

◆ portSY_FULL_READ_WRITE

#define portSY_FULL_READ_WRITE   ( 15 )

◆ portTASK_FUNCTION

#define portTASK_FUNCTION (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters )

◆ portTASK_FUNCTION_PROTO

#define portTASK_FUNCTION_PROTO (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters )

◆ portTICK_PERIOD_MS

#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )

◆ portTICK_TYPE_IS_ATOMIC

#define portTICK_TYPE_IS_ATOMIC   1

◆ portYIELD

#define portYIELD ( )
Value:
{ \
/* Set a PendSV to request a context switch. */ \
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \
\
/* Barriers are normally not required but do ensure the code is completely \
within the specified behaviour for the architecture. */ \
}

◆ portYIELD_FROM_ISR

#define portYIELD_FROM_ISR (   x)    portEND_SWITCHING_ISR( x )

Typedef Documentation

◆ BaseType_t

typedef long BaseType_t

◆ StackType_t

◆ TickType_t

typedef uint32_t TickType_t

◆ UBaseType_t

typedef unsigned long UBaseType_t

Function Documentation

◆ ulPortRaiseBASEPRI()

static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI ( void  )
static

◆ vPortClearBASEPRIFromISR()

static portFORCE_INLINE void vPortClearBASEPRIFromISR ( void  )
static
Here is the caller graph for this function:

◆ vPortEnterCritical()

void vPortEnterCritical ( void  )

◆ vPortExitCritical()

void vPortExitCritical ( void  )

◆ vPortRaiseBASEPRI()

static portFORCE_INLINE void vPortRaiseBASEPRI ( void  )
static
Here is the caller graph for this function:

◆ vPortSetBASEPRI()

static portFORCE_INLINE void vPortSetBASEPRI ( uint32_t  ulBASEPRI)
static

◆ vPortSuppressTicksAndSleep()

void vPortSuppressTicksAndSleep ( TickType_t  xExpectedIdleTime)

◆ xPortIsInsideInterrupt()

static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt ( void  )
static
portSY_FULL_READ_WRITE
#define portSY_FULL_READ_WRITE
Definition: portmacro.h:79
portNVIC_PENDSVSET_BIT
#define portNVIC_PENDSVSET_BIT
Definition: portmacro.h:96