APM:Libraries
Config.h
Go to the documentation of this file.
1 // no includes from here! only defines in one place
2 #pragma once
3 
4 #define DEBUG_BUILD 1
5 
6 #define USART_SAFE_INSERT // ignore received bytes if buffer overflows
7 
8 #define USE_WFE
9 
10 
11 #define F4Light_RC_INPUT_MIN_CHANNELS 4
12 #define F4Light_RC_INPUT_NUM_CHANNELS 20
13 
14 #define USE_MPU // guard page in process stack
15 
16 
17 //#define DEBUG_LOOP_TIME for AP_Scheduler
18 
19 
20 #ifdef DEBUG_BUILD
21 // profiling
22 //#define ISR_PERF - now all time-consuming calculations moved out from ISR to io_completion level
23 //#define SEM_PROF - now semaphores are part of scheduler
24 #define SHED_PROF
25 #define MTASK_PROF
26 
27 //#define SHED_DEBUG
28 //#define SEM_DEBUG
29 //#define MPU_DEBUG
30 //#define I2C_DEBUG
31 //#define DEBUG_SPI
32 
33 #endif
34 
35 /*
36  interrupts priorities:
37 */
38 
39 #define PWM_INT_PRIORITY 0 // PWM input (10uS between interrupts)
40 #define SOFT_UART_INT_PRIORITY 1 // soft_uart
41 #define I2C_INT_PRIORITY 2 // i2c
42 #define TIMER_I2C_INT_PRIORITY 3 // timer_i2C (2uS between interrupts)
43 #define MICROS_INT_PRIORITY 4 // micros() Timer5
44 #define SYSTICK_INT_PRIORITY 5 // SysTick
45 #define UART_INT_PRIORITY 6 // uart
46 #define DMA_IOC_INT_PRIORITY 7 // dma IO complete
47 #define GPIO_INT_PRIORITY 8 // gpio pin
48 #define MPU_INT_PRIORITY 9 // MPU6000 DataReady
49 #define VSI_INT_PRIORITY 10 // OSD VSI
50 #define USB_INT_PRIORITY 11 // usb
51 #define IOC_INT_PRIORITY 12 // driver's io_completion
52 // 13
53 #define SVC_INT_PRIORITY 14 // scheduler - Timer7, tail timer, svc
54 #define PENDSV_INT_PRIORITY 15 // Pend_Sw
55 
56 
57 #define SPI_INT_PRIORITY I2C_INT_PRIORITY
58