Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / drivers / nvic.h
blobcb484937d3dd533cbb1f86d9e8d4b272a9d6f36d
2 #pragma once
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
8 // can't use 0
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
20 #if defined(AT32F43x)
21 #define NVIC_PRIORITY_GROUPING NVIC_PRIORITY_GROUP_4
22 #else //STM32
23 // Use all available bits for priority and zero bits to sub-priority
24 #ifdef USE_HAL_DRIVER
25 #define NVIC_PRIORITY_GROUPING NVIC_PRIORITYGROUP_4
26 #else
27 #define NVIC_PRIORITY_GROUPING NVIC_PriorityGroup_4
28 #endif
29 #endif