|
|
|
@ -117,10 +117,6 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|
|
|
|
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
|
|
|
|
|
#define portNOP() __no_operation()
|
|
|
|
|
|
|
|
|
|
#ifdef configASSERT
|
|
|
|
|
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT( ( __get_interrupt_level() <= configMAX_SYSCALL_INTERRUPT_PRIORITY ) )
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Yield equivalent to "*portITU_SWINTR = 0x01; ( void ) *portITU_SWINTR;"
|
|
|
|
|
where portITU_SWINTR is the location of the software interrupt register
|
|
|
|
|
(0x000872E0). Don't rely on the assembler to select a register, so instead
|
|
|
|
@ -137,17 +133,22 @@ save and restore clobbered registers manually. */
|
|
|
|
|
|
|
|
|
|
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* These macros should be called directly, but through the taskENTER_CRITICAL()
|
|
|
|
|
* and taskEXIT_CRITICAL() macros. If the RTOS is being used correctly then
|
|
|
|
|
* the check to ensure the IPL is not being lowered will not be needed. It is
|
|
|
|
|
* included to ensure assert()s triggered by using an incorrect interrupt
|
|
|
|
|
* priority do not result in the assert() handler inadvertently lowering the
|
|
|
|
|
* priority mask, and in so doing allowing the offending interrupt to continue
|
|
|
|
|
* triggering until stack space is exhausted.
|
|
|
|
|
*/
|
|
|
|
|
/* These macros should not be called directly, but through the
|
|
|
|
|
taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros. An extra check is
|
|
|
|
|
performed if configASSERT() is defined to ensure an assertion handler does not
|
|
|
|
|
inadvertently attempt to lower the IPL when the call to assert was triggered
|
|
|
|
|
because the IPL value was found to be above configMAX_SYSCALL_INTERRUPT_PRIORITY
|
|
|
|
|
when an ISR safe FreeRTOS API function was executed. ISR safe FreeRTOS API
|
|
|
|
|
functions are those that end in FromISR. FreeRTOS maintains a separate
|
|
|
|
|
interrupt API to ensure API function and interrupt entry is as fast and as
|
|
|
|
|
simple as possible. */
|
|
|
|
|
#define portENABLE_INTERRUPTS() __set_interrupt_level( ( unsigned char ) 0 )
|
|
|
|
|
#define portDISABLE_INTERRUPTS() if( __get_interrupt_level() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) __set_interrupt_level( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
|
|
|
|
#ifdef configASSERT
|
|
|
|
|
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT( ( __get_interrupt_level() <= configMAX_SYSCALL_INTERRUPT_PRIORITY ) )
|
|
|
|
|
#define portDISABLE_INTERRUPTS() if( __get_interrupt_level() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) __set_interrupt_level( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
|
|
|
|
#else
|
|
|
|
|
#define portDISABLE_INTERRUPTS() __set_interrupt_level( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Critical nesting counts are stored in the TCB. */
|
|
|
|
|
#define portCRITICAL_NESTING_IN_TCB ( 1 )
|
|
|
|
@ -159,8 +160,6 @@ extern void vTaskExitCritical( void );
|
|
|
|
|
#define portEXIT_CRITICAL() vTaskExitCritical()
|
|
|
|
|
|
|
|
|
|
/* As this port allows interrupt nesting... */
|
|
|
|
|
unsigned long ulPortGetIPL( void );
|
|
|
|
|
void vPortSetIPL( unsigned long ulNewIPL );
|
|
|
|
|
#define portSET_INTERRUPT_MASK_FROM_ISR() __get_interrupt_level(); portDISABLE_INTERRUPTS()
|
|
|
|
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) __set_interrupt_level( ( unsigned char ) ( uxSavedInterruptStatus ) )
|
|
|
|
|
|
|
|
|
|