Go to the documentation of this file.
49 #define portFLOAT float
50 #define portDOUBLE double
52 #define portSHORT short
53 #define portSTACK_TYPE uint32_t
54 #define portBASE_TYPE long
60 #if( configUSE_16_BIT_TICKS == 1 )
62 #define portMAX_DELAY ( TickType_t ) 0xffff
65 #define portMAX_DELAY ( TickType_t ) 0xffffffffUL
69 #define portTICK_TYPE_IS_ATOMIC 1
74 #define portSTACK_GROWTH ( -1 )
75 #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
76 #define portBYTE_ALIGNMENT 8
79 #define portSY_FULL_READ_WRITE ( 15 )
87 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \
91 __dsb( portSY_FULL_READ_WRITE ); \
92 __isb( portSY_FULL_READ_WRITE ); \
96 #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )
97 #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
98 #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD()
99 #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
106 #define portDISABLE_INTERRUPTS() vPortRaiseBASEPRI()
107 #define portENABLE_INTERRUPTS() vPortSetBASEPRI( 0 )
108 #define portENTER_CRITICAL() vPortEnterCritical()
109 #define portEXIT_CRITICAL() vPortExitCritical()
110 #define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()
111 #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI(x)
116 #ifndef portSUPPRESS_TICKS_AND_SLEEP
118 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime ) vPortSuppressTicksAndSleep( xExpectedIdleTime )
123 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
124 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
127 #if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
130 #if( configMAX_PRIORITIES > 32 )
131 #error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
135 #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
136 #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
140 #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - ( uint32_t ) __clz( ( uxReadyPriorities ) ) )
148 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
149 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
153 void vPortValidateInterruptPriority(
void );
154 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() vPortValidateInterruptPriority()
160 #define portINLINE __inline
162 #ifndef portFORCE_INLINE
163 #define portFORCE_INLINE __forceinline
174 msr basepri, ulBASEPRI
187 msr basepri, ulNewBASEPRI
214 mrs ulReturn, basepri
215 msr basepri, ulNewBASEPRI
226 uint32_t ulCurrentInterrupt;
232 mrs ulCurrentInterrupt, ipsr
235 if( ulCurrentInterrupt == 0 )
#define portFORCE_INLINE
Definition: portmacro.h:162
static portFORCE_INLINE void vPortRaiseBASEPRI(void)
Definition: portmacro.h:178
static portFORCE_INLINE void vPortClearBASEPRIFromISR(void)
Definition: portmacro.h:193
void vPortExitCritical(void)
Definition: port.c:364
static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt(void)
Definition: portmacro.h:223
void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
uint32_t TickType_t
Definition: portmacro.h:64
#define pdFALSE
Definition: projdefs.h:45
unsigned long UBaseType_t
Definition: portmacro.h:58
#define configMAX_SYSCALL_INTERRUPT_PRIORITY
Definition: FreeRTOSConfig.h:24
#define portSTACK_TYPE
Definition: portmacro.h:53
portSTACK_TYPE StackType_t
Definition: portmacro.h:56
long BaseType_t
Definition: portmacro.h:57
#define pdTRUE
Definition: projdefs.h:46
static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI(void)
Definition: portmacro.h:205
void vPortEnterCritical(void)
Definition: port.c:347
static portFORCE_INLINE void vPortSetBASEPRI(uint32_t ulBASEPRI)
Definition: portmacro.h:167