Rev 144 | Rev 154 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 144 | Rev 145 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | ||
1 | #ifndef _CONFIG_H |
2 | #ifndef _CONFIG_H |
2 | #define _CONFIG_H |
3 | #define _CONFIG_H |
Line -... | Line 4... | ||
- | 4 | ||
- | 5 | //*** <<< Use Configuration Wizard in Context Menu >>> *** |
|
- | 6 | ||
3 | 7 | ||
4 | // Configure the interrupt priority at a level from 0 to 15 (0 is highest priority) |
8 | // Configure the interrupt priority at a level from 0 to 15 (0 is highest priority) |
Line -... | Line 9... | ||
- | 9 | // for each interrupot vector (VIC0 and VIC1) |
|
5 | // for each interrupot vector (VIC0 and VIC1) |
10 | |
- | 11 | ||
- | 12 | //<h>Vector 0 (higher priority than vector 1) |
|
- | 13 | //<i> IRQ with the same priority are NOT allowed |
|
6 | 14 | ||
- | 15 | //<o> VIC0.5: system time <0-15> |
|
- | 16 | #define PRIORITY_TIMER1 8 // VIC0.5: system time |
|
7 | // Vector 0 higher priority than vector 1 |
17 | |
- | 18 | //<o> VIC0.6: servo pwm <0-15> |
|
- | 19 | #define PRIORITY_TIMER2 7 // VIC0.6: servo pwm, must be disabled on UART redirection |
|
8 | #define PRIORITY_TIMER1 8 // VIC0.5: system time |
20 | |
- | 21 | //<o> VIC0.8 VIC 0.9: usb port <0-15> |
|
- | 22 | #define PRIORITY_USB 9 // VIC0.8 VIC 0.9: usb port |
|
9 | #define PRIORITY_TIMER2 7 // VIC0.6: servo pwm, must be disabled on UART redirection |
23 | |
- | 24 | //<o> VIC0.15: adc conversion <0-15> |
|
- | 25 | #define PRIORITY_ADC 15 // VIC0.15: adc conversion |
|
10 | #define PRIORITY_USB 9 // VIC0.8 VIC 0.9: usb port |
26 | //============================================================================= |
- | 27 | //</h> |
|
- | 28 | //<h>Vector 1 (lower priority than vector 0) |
|
11 | #define PRIORITY_ADC 15 // VIC0.15: adc conversion |
29 | |
- | 30 | //<o> VIC1.0: uart0 to GPS/MK3MAG <0-15> |
|
- | 31 | #define PRIORITY_UART0 1 // VIC1.0: uart to GPS/MK3MAG |
|
12 | // Vector 1 lower priority than vector 0 |
32 | |
- | 33 | //<o> VIC1.1: uart2 to FC <0-15> |
|
- | 34 | #define PRIORITY_UART2 2 // VIC1.1: uart to FC |
|
13 | #define PRIORITY_UART0 1 // VIC1.0: uart to GPS/MK3MAG |
35 | |
- | 36 | //<o> VIC1.2: debug uart1 <0-15> |
|
- | 37 | #define PRIORITY_UART1 0 // VIC1.2: debug uart |
|
14 | #define PRIORITY_UART2 2 // VIC1.1: uart to FC |
38 | |
- | 39 | //<o> VIC1.4: i2c to MK3MAG <0-15> |
|
- | 40 | #define PRIORITY_I2C1 4 // VIC1.4: i2c to MK3MAG |
|
15 | #define PRIORITY_UART1 0 // VIC1.2: debug uart |
41 | |
- | 42 | //<o> VIC1.5: SPI0 <0-15> |
|
- | 43 | #define PRIORITY_SPI0 3 // VIC1.5: timing forced by FC, must be lower than UARTS for flashing FC thrue the NC |
|
16 | #define PRIORITY_I2C1 4 // VIC1.4: i2c to MK3MAG |
44 | |
Line -... | Line 45... | ||
- | 45 | //<o> VIC0.5: VIC1.10 switch SD card <0-15> |
|
- | 46 | #define PRIORITY_SDSWITCH 15 // VIC1.10 switch at sd port |
|
- | 47 | ||
- | 48 | //</h> |
|
17 | #define PRIORITY_SPI0 3 // VIC1.5: timing forced by FC, must be lower than UARTS for flashing FC thrue the NC |
49 | //============================================================================= |
- | 50 | //<h>Baudrates |
|
- | 51 | //<o> UART0 <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud |
|
18 | #define PRIORITY_SDSWITCH 15 // VIC1.10 switch at sd port |
52 | #define UART0_BAUD_RATE 57600 //Baud Rate for the serial interfaces |
- | 53 | ||
- | 54 | //<o> UART1 <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud |
|
19 | 55 | #define UART1_BAUD_RATE 57600 //Baud Rate for the serial interfaces |
|
- | 56 | ||
- | 57 | //<o> UART2 <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud |
|
20 | #define UART0_BAUD_RATE 57600 //Baud Rate for the serial interfaces |
58 | #define UART2_BAUD_RATE 57600 //Baud Rate for the serial interfaces |
Line -... | Line 59... | ||
- | 59 | ||
- | 60 | //<o> I2C-Bus1 <20000=> 20 kBit <50000=> 50 kBit <100000=> 100 kBit <200000=> 200 kBit <400000=> 400 kBit |
|
- | 61 | #define I2C1_CLOCK 20000 // 20 kHz |
|
21 | #define UART1_BAUD_RATE 57600 //Baud Rate for the serial interfaces |
62 |