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
classix_1.0.h
Go to the documentation of this file.
1 #ifndef CONFIG_CLASSIX_H
2 #define CONFIG_CLASSIX_H
3 
4 /* Master oscillator freq. */
5 #define FOSC (12000000)
6 /* PLL multiplier */
7 #define PLL_MUL (5)
8 /* CPU clock freq. */
9 #define CCLK (FOSC * PLL_MUL)
10 /* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
11 #define PBSD_BITS 0x00
12 #define PBSD_VAL 4
13 /* Peripheral bus clock freq. */
14 #define PCLK (CCLK / PBSD_VAL)
15 
16 
17 
18 #ifdef FBW
19 #ifndef USE_LED_1
20 #define USE_LED_1 1
21 #endif
22 #define LED_1_BANK 1
23 #define LED_1_PIN 24
24 
25 #ifndef USE_LED_2
26 #define USE_LED_2 1
27 #endif
28 #define LED_2_BANK 1
29 #define LED_2_PIN 31
30 
31 
32 /* PPM : rc rx on P0.16 : FBW_RC1 connector
33 #define PPM_PINSEL PINSEL1
34 #define PPM_PINSEL_VAL 0x03
35 #define PPM_PINSEL_BIT 0
36 */
37 
38 
39 /* PPM : rc rx on P0.6 : FBW_RC0 connector */
40 #define PPM_PINSEL PINSEL0
41 #define PPM_PINSEL_VAL 0x02
42 #define PPM_PINSEL_BIT 12
43 #define PPM_CRI TIR_CR2I
44 #define PPM_CCR_CRF TCCR_CR2_F
45 #define PPM_CCR_CRR TCCR_CR2_R
46 #define PPM_CCR_CRI TCCR_CR2_I
47 #define PPM_CR T0CR2
48 
49 /* SERVOS : 4017 on FBW_RC0 connector */
50 
51 /* MAT0.1 on P0.5 */
52 #define SERVO_CLOCK_PIN 5
53 #define SERVO_CLOCK_PINSEL PINSEL0
54 #define SERVO_CLOCK_PINSEL_VAL 0x02
55 #define SERVO_CLOCK_PINSEL_BIT 10
56 
57 /* reset on P1.25 */
58 #define SERVO_RESET_PIN 25
59 #define SERVO_RESET_PINSEL PINSEL2
60 
61 /* ADCs */
62 /* AD0.6 ( on pin P0.4 ) is supply monitoring */
63 #define USE_AD0_6
64 
65 #endif /* FBW */
66 
67 
68 
69 #ifdef AP
70 
71 #define SPI_SELECT_SLAVE0_PORT 0
72 #define SPI_SELECT_SLAVE0_PIN 20
73 
74 #ifndef SITL
75 /* sitl handles this board as a mono-processor one: unfortunately these
76  definitions are already in FBW */
77 
78 #ifndef USE_LED_1
79 #define USE_LED_1 1
80 #endif
81 #define LED_1_BANK 1
82 #define LED_1_PIN 18
83 
84 #ifndef USE_LED_2
85 #define USE_LED_2 1
86 #endif
87 #define LED_2_BANK 1
88 #define LED_2_PIN 19
89 
90 #ifndef USE_LED_3
91 #define USE_LED_3 1
92 #endif
93 #define LED_3_BANK 1
94 #define LED_3_PIN 20
95 
96 #endif /* !SITL */
97 
98 #endif /* AP */
99 
100 /* ADC */
101 /* Definitions for test_adcs.c, to test ADCs on AP ANALOG1 */
102 #define ADC_0 AdcBank1(5)
103 #define ADC_1 AdcBank1(6)
104 #define ADC_2 AdcBank1(7)
105 #define ADC_3 AdcBank1(4)
106 #define ADC_4 AdcBank1(3)
107 #define ADC_5 AdcBank1(2)
108 
109 
110 #endif /* CONFIG_CLASSIX_H */