Subversion Repositories NaviCtrl

Rev

Rev 489 | 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
 
489 killagreg 5
//*** <<< Use Configuration Wizard in Context Menu >>> ***
145 ingob 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>
378 holgerb 37
//#define PRIORITY_UART1        0               // VIC1.2: debug uart
38
#define PRIORITY_UART1  3               // VIC1.2: debug uart
145 ingob 39
 
465 ingob 40
//<o> VIC1.4: i2c1 to compass and eeprom<0-15>
144 killagreg 41
#define PRIORITY_I2C1   4       // VIC1.4: i2c to MK3MAG
465 ingob 42
//<o> VIC1.3: i2c0 to compass <0-15>
43
#define PRIORITY_I2C0   5       // VIC1.3: i2c to external compass
145 ingob 44
 
45
//<o> VIC1.5: SPI0 <0-15>
378 holgerb 46
//#define PRIORITY_SPI0         3               // VIC1.5: timing forced by FC, must be lower than UARTS for flashing FC thrue the NC
47
#define PRIORITY_SPI0   0               // VIC1.5: timing forced by FC, must be lower than UARTS for flashing FC thrue the NC
145 ingob 48
 
49
//<o> VIC0.5: VIC1.10 switch SD card <0-15>
154 killagreg 50
#define PRIORITY_SDSWITCH 14    // VIC1.10 switch at sd port
142 killagreg 51
 
154 killagreg 52
#define PRIORITY_SW     15              //VIC1.11: Software Interrupt at absolute lowest priority
53
 
145 ingob 54
//</h>
55
//=============================================================================
56
//<h>Baudrates
489 killagreg 57
//<o> UART0     <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud
136 killagreg 58
#define UART0_BAUD_RATE 57600           //Baud Rate for the serial interfaces
145 ingob 59
 
489 killagreg 60
//<o> UART1             <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud
136 killagreg 61
#define UART1_BAUD_RATE 57600           //Baud Rate for the serial interfaces
145 ingob 62
 
489 killagreg 63
//<o> UART2     <9600=> 9600 Baud <19200=> 19,2 kBaud <38400=> 38,4 kBaud <57600=> 57,6 kBaud <115200=> 115,2 kBaud
136 killagreg 64
#define UART2_BAUD_RATE 57600           //Baud Rate for the serial interfaces
145 ingob 65
 
489 killagreg 66
//<o> I2C-Bus1  <22000=> 20 kBit <50000=> 50 kBit <100000=> 100 kBit <200000=> 200 kBit <400000=> 400 kBit
67
#define I2C0_CLOCK 100000                       // Bit Rate for I2C
68
#define I2C1_CLOCK 50000                        // Bit Rate for I2C
136 killagreg 69
 
145 ingob 70
//</h>
489 killagreg 71
//<<< end of configuration section >>>
145 ingob 72
 
136 killagreg 73
#endif // _CONFIG_H