5 // NVIC_SetPriority expects priority encoded according to priority grouping
6 // We allocate zero bits for sub-priority, therefore we have 16 priorities to use on STM32
9 #define NVIC_PRIO_MAX 1
10 #define NVIC_PRIO_I2C_ER 2
11 #define NVIC_PRIO_I2C_EV 2
12 #define NVIC_PRIO_TIMER 3
13 #define NVIC_PRIO_TIMER_DMA 3
14 #define NVIC_PRIO_SDIO 3
15 #define NVIC_PRIO_USB 5
16 #define NVIC_PRIO_SERIALUART 5
17 #define NVIC_PRIO_VCP 7
21 #define NVIC_PRIORITY_GROUPING NVIC_PRIORITY_GROUP_4
23 // Use all available bits for priority and zero bits to sub-priority
25 #define NVIC_PRIORITY_GROUPING NVIC_PRIORITYGROUP_4
27 #define NVIC_PRIORITY_GROUPING NVIC_PriorityGroup_4