Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
booz_1.0.h
Go to the documentation of this file.
1 #ifndef CONFIG_BOOZ2_V1_0_H
2 #define CONFIG_BOOZ2_V1_0_H
3 
4 /* Master oscillator freq. */
5 #define FOSC (12000000)
6 
7 /* PLL multiplier */
8 #define PLL_MUL (5)
9 
10 /* CPU clock freq. */
11 #define CCLK (FOSC * PLL_MUL)
12 
13 /* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
14 #define PBSD_BITS 0x02
15 #define PBSD_VAL 2
16 
17 /* Peripheral bus clock freq. */
18 #define PCLK (CCLK / PBSD_VAL)
19 
20 /* Onboard LEDs */
21 #ifndef USE_LED_1
22 #define USE_LED_1 1
23 #endif
24 #define LED_1_BANK 1
25 #define LED_1_PIN 25
26 
27 #ifndef USE_LED_2
28 #define USE_LED_2 1
29 #endif
30 #define LED_2_BANK 1
31 #define LED_2_PIN 24
32 
33 #ifndef USE_LED_3
34 #define USE_LED_3 1
35 #endif
36 #define LED_3_BANK 1
37 #define LED_3_PIN 23
38 
39 #ifndef USE_LED_4
40 #define USE_LED_4 1
41 #endif
42 #define LED_4_BANK 1
43 #define LED_4_PIN 31
44 
45 #ifndef USE_LED_5
46 #define USE_LED_5 1
47 #endif
48 #define LED_5_BANK 1
49 #define LED_5_PIN 18
50 
51 #define POWER_SWITCH_LED 5
52 
53 #ifndef USE_LED_6
54 #define USE_LED_6 1
55 #endif
56 #define LED_6_BANK 1
57 #define LED_6_PIN 22
58 
59 #define CAM_SWITCH_LED 6
60 
61 
62 /* PPM : rc rx on P0.28 ( CAP0.2 ) */
63 #define PPM_PINSEL PINSEL1
64 #define PPM_PINSEL_VAL 0x02
65 #define PPM_PINSEL_BIT 24
66 #define PPM_CRI TIR_CR2I
67 #define PPM_CCR_CRF TCCR_CR2_F
68 #define PPM_CCR_CRR TCCR_CR2_R
69 #define PPM_CCR_CRI TCCR_CR2_I
70 #define PPM_CR T0CR2
71 
72 
73 /* ADC */
74 
75 /* select P0.13 (ADC_SPARE) as AD1.4 for ADC_0 */
76 #define ADC_0 AdcBank1(4)
77 #ifdef USE_ADC_0
78 #ifndef USE_AD1
79 #define USE_AD1
80 #endif
81 #define USE_AD1_4
82 #endif
83 
84 /* select P0.4 (SCK_0) as AD0.6 for ADC_1 */
85 #define ADC_1 AdcBank0(6)
86 #ifdef USE_ADC_1
87 #ifndef USE_AD0
88 #define USE_AD0
89 #endif
90 #define USE_AD0_6
91 #endif
92 
93 /* select P0.5 (MISO_0) as AD0.7 for ADC_2 */
94 #define ADC_2 AdcBank0(7)
95 #ifdef USE_ADC_2
96 #ifndef USE_AD0
97 #define USE_AD0
98 #endif
99 #define USE_AD0_7
100 #endif
101 
102 /* select P0.6 (MOSI_0) as AD1.0 for ADC_3 */
103 #define ADC_3 AdcBank1(0)
104 #ifdef USE_ADC_3
105 #ifndef USE_AD1
106 #define USE_AD1
107 #endif
108 #define USE_AD1_0
109 #endif
110 
111 /* battery */
112 /* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
113 #ifndef ADC_CHANNEL_VSUPPLY
114 #define ADC_CHANNEL_VSUPPLY AdcBank0(2)
115 #ifndef USE_AD0
116 #define USE_AD0
117 #endif
118 #define USE_AD0_2
119 #endif
120 
121 #define DefaultVoltageOfAdc(adc) (0.0183*adc)
122 
123 /* baro */
124 #define ADC_CHANNEL_BARO AdcBank1(2)
125 #ifndef USE_AD1
126 #define USE_AD1
127 #endif
128 #define USE_AD1_2
129 
130 
131 
132 /* MS2100 on SSP, IMU connector */
133 #define MS2100_SS_PIN 28
134 #define MS2100_SS_IODIR IO1DIR
135 #define MS2100_SS_IOSET IO1SET
136 #define MS2100_SS_IOCLR IO1CLR
137 
138 #define MS2100_RESET_PIN 19
139 #define MS2100_RESET_IODIR IO1DIR
140 #define MS2100_RESET_IOSET IO1SET
141 #define MS2100_RESET_IOCLR IO1CLR
142 
143 #define MS2100_DRDY_PIN 30
144 #define MS2100_DRDY_PINSEL PINSEL1
145 #define MS2100_DRDY_PINSEL_BIT 28
146 #define MS2100_DRDY_PINSEL_VAL 2
147 #define MS2100_DRDY_EINT 3
148 #define MS2100_DRDY_VIC_IT VIC_EINT3
149 
150 /* PWM5 on CAM connector */
151 /* P0.21 */
152 #define PWM0_PINSEL PINSEL1
153 #define PWM0_PINSEL_VAL 0x01
154 #define PWM0_PINSEL_BIT 10
155 
156 /* PWM2 on SPI connector */
157 /* P0.7 */
158 #define PWM1_PINSEL PINSEL0
159 #define PWM1_PINSEL_VAL 0x02
160 #define PWM1_PINSEL_BIT 14
161 
162 
163 #define BOARD_HAS_BARO 1
164 
165 /*
166  * Modem
167  */
168 //#define MODEM_DEVICE Uart1
169 //#define MODEM_UART_FLAG
170 
171 
172 #endif /* CONFIG_BOOZ2_V1_0_H */