From: richardbarry Date: Wed, 24 Sep 2008 13:09:59 +0000 (+0000) Subject: Change to use interrupt priority definitions that use shifted values from 0 to 7... X-Git-Tag: V5.1.2~210 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=70f431bb1ad3e08dc42a92519cf741c22c824084;p=freertos Change to use interrupt priority definitions that use shifted values from 0 to 7, rather than the full numeric value. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@486 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h index 90d0e1cfb..027582392 100644 --- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h @@ -93,8 +93,10 @@ to exclude the API function. */ #define INCLUDE_vTaskDelay 1 #define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define configKERNEL_INTERRUPT_PRIORITY 255 -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xa0, or priority 5. */ + + +#define configKERNEL_INTERRUPT_PRIORITY ( ( unsigned portCHAR ) 7 << ( unsigned portCHAR ) 5 ) /* Priority 7, or 255 as only the top three bits are implemented. This is the lowest priority. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( ( unsigned portCHAR ) 5 << ( unsigned portCHAR ) 5 ) /* Priority 5, or 160 as only the top three bits are implemented. */ #endif /* FREERTOS_CONFIG_H */ diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c index 92392a6b5..bd6e6e050 100644 --- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c +++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c @@ -77,7 +77,7 @@ unsigned long ulFrequency; /* Set the timer interrupts to be above the kernel. The interrupts are assigned different priorities so they nest with each other. */ - IntPrioritySet( INT_TIMER2A, configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 ); + IntPrioritySet( INT_TIMER2A, configMAX_SYSCALL_INTERRUPT_PRIORITY + ( 1 << 5 ) ); /* Shift left 5 as only the top 3 bits are implemented. */ IntPrioritySet( INT_TIMER3A, configMAX_SYSCALL_INTERRUPT_PRIORITY ); /* Ensure interrupts do not start until the scheduler is running. */