Subversion Repositories NaviCtrl

Rev

Rev 189 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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