Change to use interrupt priority definitions that use shifted values from 0 to 7, rather than the full numeric value.

pull/4/head
Richard Barry 17 years ago
parent e12614df23
commit 0773e6b805

@ -93,8 +93,10 @@ to exclude the API function. */
#define INCLUDE_vTaskDelay 1 #define INCLUDE_vTaskDelay 1
#define INCLUDE_uxTaskGetStackHighWaterMark 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 */ #endif /* FREERTOS_CONFIG_H */

@ -77,7 +77,7 @@ unsigned long ulFrequency;
/* Set the timer interrupts to be above the kernel. The interrupts are /* Set the timer interrupts to be above the kernel. The interrupts are
assigned different priorities so they nest with each other. */ 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 ); IntPrioritySet( INT_TIMER3A, configMAX_SYSCALL_INTERRUPT_PRIORITY );
/* Ensure interrupts do not start until the scheduler is running. */ /* Ensure interrupts do not start until the scheduler is running. */

Loading…
Cancel
Save