STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
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 ) 0xffff
#define portSTACK_GROWTH   ( -1 )
#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT   8
#define portDONT_DISCARD   __attribute__( ( used ) )
#define portYIELD()
#define portNVIC_INT_CTRL_REG   ( *( ( volatile uint32_t * ) 0xe000ed04 ) )
#define portNVIC_PENDSVSET_BIT   ( 1UL << 28UL )
#define portEND_SWITCHING_ISR(xSwitchRequired)
#define portYIELD_FROM_ISR(x)
#define portSET_INTERRUPT_MASK_FROM_ISR()
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)
#define portDISABLE_INTERRUPTS()
#define portENABLE_INTERRUPTS()
#define portENTER_CRITICAL()
#define portEXIT_CRITICAL()
#define portTASK_FUNCTION_PROTO(vFunction, pvParameters)
#define portTASK_FUNCTION(vFunction, pvParameters)
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime)
#define configUSE_PORT_OPTIMISED_TASK_SELECTION   1
#define portRECORD_READY_PRIORITY(uxPriority, uxReadyPriorities)
#define portRESET_READY_PRIORITY(uxPriority, uxReadyPriorities)
#define portGET_HIGHEST_PRIORITY(uxTopPriority, uxReadyPriorities)
#define portNOP()
#define portINLINE   __inline
#define portFORCE_INLINE   inline __attribute__( ( always_inline ) )
#define portMEMORY_BARRIER()

Typedefs

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

Functions

void vPortEnterCritical (void)
void vPortExitCritical (void)
void vPortSuppressTicksAndSleep (TickType_t xExpectedIdleTime)
 __attribute__ ((always_inline)) static inline uint8_t ucPortCountLeadingZeros(uint32_t ulBitmap)
static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt (void)
static portFORCE_INLINE void vPortRaiseBASEPRI (void)
static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI (void)
static portFORCE_INLINE void vPortSetBASEPRI (uint32_t ulNewMaskValue)

Macro Definition Documentation

◆ configUSE_PORT_OPTIMISED_TASK_SELECTION

#define configUSE_PORT_OPTIMISED_TASK_SELECTION   1

Definition at line 132 of file portmacro.h.

◆ portBASE_TYPE

#define portBASE_TYPE   long

Definition at line 56 of file portmacro.h.

◆ portBYTE_ALIGNMENT

#define portBYTE_ALIGNMENT   8

Definition at line 83 of file portmacro.h.

Referenced by prvHeapInit().

◆ portCHAR

#define portCHAR   char

Definition at line 50 of file portmacro.h.

◆ portCLEAR_INTERRUPT_MASK_FROM_ISR

#define portCLEAR_INTERRUPT_MASK_FROM_ISR ( x)

◆ portDISABLE_INTERRUPTS

#define portDISABLE_INTERRUPTS ( )
Value:
static portFORCE_INLINE void vPortRaiseBASEPRI(void)
Definition portmacro.h:200

Definition at line 109 of file portmacro.h.

Referenced by prvTaskExitError(), vPortEnterCritical(), vTaskEndScheduler(), vTaskStartScheduler(), and xPortSysTickHandler().

◆ portDONT_DISCARD

#define portDONT_DISCARD   __attribute__( ( used ) )

Definition at line 84 of file portmacro.h.

Referenced by vTaskPlaceOnEventListRestricted().

◆ portDOUBLE

#define portDOUBLE   double

Definition at line 52 of file portmacro.h.

◆ portENABLE_INTERRUPTS

#define portENABLE_INTERRUPTS ( )
Value:

Definition at line 110 of file portmacro.h.

Referenced by vPortExitCritical(), and xPortSysTickHandler().

◆ portEND_SWITCHING_ISR

#define portEND_SWITCHING_ISR ( xSwitchRequired)
Value:
do { if( xSwitchRequired != pdFALSE ) portYIELD(); } while( 0 )
#define portYIELD()
Definition portmacro.h:88
#define pdFALSE
Definition projdefs.h:45

Definition at line 100 of file portmacro.h.

◆ portENTER_CRITICAL

#define portENTER_CRITICAL ( )
Value:
void vPortEnterCritical(void)
Definition port.c:431

Definition at line 111 of file portmacro.h.

◆ portEXIT_CRITICAL

#define portEXIT_CRITICAL ( )
Value:
void vPortExitCritical(void)
Definition port.c:448

Definition at line 112 of file portmacro.h.

◆ portFLOAT

#define portFLOAT   float

Definition at line 51 of file portmacro.h.

◆ portFORCE_INLINE

#define portFORCE_INLINE   inline __attribute__( ( always_inline ) )

Definition at line 175 of file portmacro.h.

◆ portGET_HIGHEST_PRIORITY

#define portGET_HIGHEST_PRIORITY ( uxTopPriority,
uxReadyPriorities )
Value:
uxTopPriority = ( 31UL - ( uint32_t ) ucPortCountLeadingZeros( ( uxReadyPriorities ) ) )

Definition at line 158 of file portmacro.h.

◆ portINLINE

#define portINLINE   __inline

Definition at line 172 of file portmacro.h.

◆ portLONG

#define portLONG   long

Definition at line 53 of file portmacro.h.

◆ portMAX_DELAY

◆ portMEMORY_BARRIER

#define portMEMORY_BARRIER ( )
Value:
__asm volatile ( "" ::: "memory" )

Definition at line 245 of file portmacro.h.

Referenced by vTaskSuspendAll(), and xTaskResumeAll().

◆ portNOP

#define portNOP ( )

Definition at line 170 of file portmacro.h.

◆ portNVIC_INT_CTRL_REG

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

Definition at line 98 of file portmacro.h.

Referenced by vPortEnterCritical(), and xPortSysTickHandler().

◆ portNVIC_PENDSVSET_BIT

#define portNVIC_PENDSVSET_BIT   ( 1UL << 28UL )

Definition at line 99 of file portmacro.h.

Referenced by xPortSysTickHandler().

◆ portRECORD_READY_PRIORITY

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

Definition at line 153 of file portmacro.h.

◆ portRESET_READY_PRIORITY

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

Definition at line 154 of file portmacro.h.

◆ portSET_INTERRUPT_MASK_FROM_ISR

#define portSET_INTERRUPT_MASK_FROM_ISR ( )

◆ portSHORT

#define portSHORT   short

Definition at line 54 of file portmacro.h.

◆ portSTACK_GROWTH

#define portSTACK_GROWTH   ( -1 )

Definition at line 81 of file portmacro.h.

◆ portSTACK_TYPE

#define portSTACK_TYPE   uint32_t

Definition at line 55 of file portmacro.h.

◆ portSUPPRESS_TICKS_AND_SLEEP

#define portSUPPRESS_TICKS_AND_SLEEP ( xExpectedIdleTime)
Value:
vPortSuppressTicksAndSleep( xExpectedIdleTime )
void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)

Definition at line 126 of file portmacro.h.

Referenced by portTASK_FUNCTION().

◆ portTASK_FUNCTION

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

Definition at line 120 of file portmacro.h.

◆ portTASK_FUNCTION_PROTO

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

Definition at line 119 of file portmacro.h.

◆ portTICK_PERIOD_MS

#define portTICK_PERIOD_MS   ( ( TickType_t ) 1000 / configTICK_RATE_HZ )

Definition at line 82 of file portmacro.h.

◆ portYIELD

#define portYIELD ( )
Value:
{ \
/* Set a PendSV to request a context switch. */ \
\
/* Barriers are normally not required but do ensure the code is completely \
* within the specified behaviour for the architecture. */ \
__asm volatile ( "dsb" ::: "memory" ); \
__asm volatile ( "isb" ); \
}
#define portNVIC_PENDSVSET_BIT
Definition portmacro.h:99
#define portNVIC_INT_CTRL_REG
Definition portmacro.h:98

Definition at line 88 of file portmacro.h.

◆ portYIELD_FROM_ISR

#define portYIELD_FROM_ISR ( x)
Value:
#define portEND_SWITCHING_ISR(xSwitchRequired)
Definition portmacro.h:100

Definition at line 101 of file portmacro.h.

Referenced by osEventFlagsClear(), osEventFlagsSet(), osMessageQueueGet(), osMessageQueuePut(), osSemaphoreAcquire(), and osSemaphoreRelease().

Typedef Documentation

◆ BaseType_t

typedef long BaseType_t

Definition at line 59 of file portmacro.h.

◆ StackType_t

Definition at line 58 of file portmacro.h.

◆ TickType_t

typedef uint16_t TickType_t

Definition at line 63 of file portmacro.h.

◆ UBaseType_t

typedef unsigned long UBaseType_t

Definition at line 60 of file portmacro.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (always_inline) )

Definition at line 138 of file portmacro.h.

◆ ulPortRaiseBASEPRI()

portFORCE_INLINE uint32_t ulPortRaiseBASEPRI ( void )
static

Definition at line 216 of file portmacro.h.

References configMAX_SYSCALL_INTERRUPT_PRIORITY, and portFORCE_INLINE.

◆ vPortEnterCritical()

void vPortEnterCritical ( void )
extern

◆ vPortExitCritical()

void vPortExitCritical ( void )
extern

Definition at line 448 of file port.c.

References configASSERT, and portENABLE_INTERRUPTS.

◆ vPortRaiseBASEPRI()

portFORCE_INLINE void vPortRaiseBASEPRI ( void )
static

Definition at line 200 of file portmacro.h.

References configMAX_SYSCALL_INTERRUPT_PRIORITY, and portFORCE_INLINE.

◆ vPortSetBASEPRI()

portFORCE_INLINE void vPortSetBASEPRI ( uint32_t ulNewMaskValue)
static

Definition at line 236 of file portmacro.h.

References portFORCE_INLINE.

◆ vPortSuppressTicksAndSleep()

void vPortSuppressTicksAndSleep ( TickType_t xExpectedIdleTime)
extern

◆ xPortIsInsideInterrupt()

portFORCE_INLINE BaseType_t xPortIsInsideInterrupt ( void )
static

Definition at line 178 of file portmacro.h.

References pdFALSE, pdTRUE, and portFORCE_INLINE.