Subversion Repositories NaviCtrl

Rev

Rev 195 | Details | Compare with Previous | Last modification | View Log | RSS feed

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