diff --git a/cm7/core_cm7_regs.h b/cm7/core_cm7_regs.h index bb02397..4108e5f 100644 --- a/cm7/core_cm7_regs.h +++ b/cm7/core_cm7_regs.h @@ -1840,7 +1840,7 @@ typedef struct #endif #include CMSIS_NVIC_VIRTUAL_HEADER_FILE #else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_SetPriorityGrouping IntMgr_SetGroupPriority//__NVIC_SetPriorityGrouping #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping #define NVIC_EnableIRQ IntMgr_EnableInterrupt//__NVIC_EnableIRQ #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ diff --git a/interrupt_manager.h b/interrupt_manager.h index 3b69b59..112f323 100644 --- a/interrupt_manager.h +++ b/interrupt_manager.h @@ -19,6 +19,14 @@ extern "C" { #include "device_header.h" +typedef enum +{ + NVIC_PRIORITY_GROUP_0 = ((uint32_t)0x7), /*!< 0 bits for preemption priority, 4 bits for subpriority */ + NVIC_PRIORITY_GROUP_1 = ((uint32_t)0x6), /*!< 1 bits for preemption priority, 3 bits for subpriority */ + NVIC_PRIORITY_GROUP_2 = ((uint32_t)0x5), /*!< 2 bits for preemption priority, 2 bits for subpriority */ + NVIC_PRIORITY_GROUP_3 = ((uint32_t)0x4), /*!< 3 bits for preemption priority, 1 bits for subpriority */ + NVIC_PRIORITY_GROUP_4 = ((uint32_t)0x3) /*!< 4 bits for preemption priority, 0 bits for subpriority */ +} nvic_priority_group_type; typedef enum {