38 #include "stm32f4xx.h"
56 uint8_t NVIC_IRQChannel;
61 uint8_t NVIC_IRQChannelPreemptionPriority;
66 uint8_t NVIC_IRQChannelSubPriority;
71 FunctionalState NVIC_IRQChannelCmd;
86 #define NVIC_VectTab_RAM ((uint32_t)0x20000000)
87 #define NVIC_VectTab_FLASH ((uint32_t)0x08000000)
88 #define IS_NVIC_VECTTAB(VECTTAB) (((VECTTAB) == NVIC_VectTab_RAM) || \
89 ((VECTTAB) == NVIC_VectTab_FLASH))
98 #define NVIC_LP_SEVONPEND ((uint8_t)0x10)
99 #define NVIC_LP_SLEEPDEEP ((uint8_t)0x04)
100 #define NVIC_LP_SLEEPONEXIT ((uint8_t)0x02)
101 #define IS_NVIC_LP(LP) (((LP) == NVIC_LP_SEVONPEND) || \
102 ((LP) == NVIC_LP_SLEEPDEEP) || \
103 ((LP) == NVIC_LP_SLEEPONEXIT))
112 #define NVIC_PriorityGroup_0 ((uint32_t)0x700)
114 #define NVIC_PriorityGroup_1 ((uint32_t)0x600)
116 #define NVIC_PriorityGroup_2 ((uint32_t)0x500)
118 #define NVIC_PriorityGroup_3 ((uint32_t)0x400)
120 #define NVIC_PriorityGroup_4 ((uint32_t)0x300)
123 #define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PriorityGroup_0) || \
124 ((GROUP) == NVIC_PriorityGroup_1) || \
125 ((GROUP) == NVIC_PriorityGroup_2) || \
126 ((GROUP) == NVIC_PriorityGroup_3) || \
127 ((GROUP) == NVIC_PriorityGroup_4))
129 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
131 #define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
133 #define IS_NVIC_OFFSET(OFFSET) ((OFFSET) < 0x000FFFFF)
143 #define SysTick_CLKSource_HCLK_Div8 ((uint32_t)0xFFFFFFFB)
144 #define SysTick_CLKSource_HCLK ((uint32_t)0x00000004)
145 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK) || \
146 ((SOURCE) == SysTick_CLKSource_HCLK_Div8))