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
navgo_1.0.h
Go to the documentation of this file.
1 #ifndef CONFIG_NAVGO_V1_0_H
2 #define CONFIG_NAVGO_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 0
25 #define LED_1_PIN 22
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 28
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 29
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 30
44 
45 /* PPM : rc rx on P0.28 ( CAP0.2 ) */
46 #define PPM_PINSEL PINSEL1
47 #define PPM_PINSEL_VAL 0x02
48 #define PPM_PINSEL_BIT 24
49 #define PPM_CRI TIR_CR2I
50 #define PPM_CCR_CRF TCCR_CR2_F
51 #define PPM_CCR_CRR TCCR_CR2_R
52 #define PPM_CCR_CRI TCCR_CR2_I
53 #define PPM_CR T0CR2
54 
55 /* ADC */
56 
57 /* battery */
58 /* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
59 #ifndef ADC_CHANNEL_VSUPPLY
60 #define ADC_CHANNEL_VSUPPLY AdcBank0(2)
61 #ifndef USE_AD0
62 #define USE_AD0
63 #endif
64 #define USE_AD0_2
65 #endif
66 
67 #define DefaultVoltageOfAdc(adc) (0.017889*adc)
68 
69 /* SPI (SSP) */
70 #define SPI_SELECT_SLAVE0_PORT 0
71 #define SPI_SELECT_SLAVE0_PIN 20
72 
73 //#define SPI_SELECT_SLAVE1_PORT 1
74 //#define SPI_SELECT_SLAVE1_PIN 19
75 
76 #define SPI1_DRDY_PINSEL PINSEL1
77 #define SPI1_DRDY_PINSEL_BIT 0
78 #define SPI1_DRDY_PINSEL_VAL 1
79 #define SPI1_DRDY_EINT 0
80 #define SPI1_DRDY_VIC_IT VIC_EINT0
81 
82 /* PWM0 (internal PWM5) */
83 /* P0.21 */
84 #define PWM0_PINSEL PINSEL1
85 #define PWM0_PINSEL_VAL 0x01
86 #define PWM0_PINSEL_BIT 10
87 
88 /* PWM1 (internal PWM2 */
89 /* P0.7 */
90 #define PWM1_PINSEL PINSEL0
91 #define PWM1_PINSEL_VAL 0x02
92 #define PWM1_PINSEL_BIT 14
93 
94 #define BOARD_HAS_BARO 1
95 
96 #endif /* CONFIG_NAVGO_V1_0_H */