Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules 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 /* Default actuators driver */
50 #define DEFAULT_ACTUATORS "subsystems/actuators/actuators_pwm.h"
51 #define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
52 #define ActuatorsDefaultInit() ActuatorsPwmInit()
53 #define ActuatorsDefaultCommit() ActuatorsPwmCommit()
54 
55 /* SERVOS : 4017 on FBW_RC0 connector (ppm driver) */
56 
57 /* MAT0.1 on P0.5 */
58 #define SERVO_CLOCK_PIN 5
59 #define SERVO_CLOCK_PINSEL PINSEL0
60 #define SERVO_CLOCK_PINSEL_VAL 0x02
61 #define SERVO_CLOCK_PINSEL_BIT 10
62 
63 /* reset on P1.25 */
64 #define SERVO_RESET_PIN 25
65 #define SERVO_RESET_PINSEL PINSEL2
66 
67 /* ADCs */
68 /* AD0.6 ( on pin P0.4 ) is supply monitoring */
69 #define USE_AD0_6
70 
71 #endif /* FBW */
72 
73 
74 
75 #ifdef AP
76 
77 #define SPI_SELECT_SLAVE0_PORT 0
78 #define SPI_SELECT_SLAVE0_PIN 20
79 #define SPI_SELECT_SLAVE0_PINSEL PINSEL1
80 #define SPI_SELECT_SLAVE0_PINSEL_BIT 8
81 #define SPI_SELECT_SLAVE0_PINSEL_VAL 0
82 
83 #ifndef SITL
84 /* sitl handles this board as a mono-processor one: unfortunately these
85  definitions are already in FBW */
86 
87 #ifndef USE_LED_1
88 #define USE_LED_1 1
89 #endif
90 #define LED_1_BANK 1
91 #define LED_1_PIN 18
92 
93 #ifndef USE_LED_2
94 #define USE_LED_2 1
95 #endif
96 #define LED_2_BANK 1
97 #define LED_2_PIN 19
98 
99 #ifndef USE_LED_3
100 #define USE_LED_3 1
101 #endif
102 #define LED_3_BANK 1
103 #define LED_3_PIN 20
104 
105 #endif /* !SITL */
106 
107 #endif /* AP */
108 
109 /* ADC */
110 /* Definitions for test_adcs.c, to test ADCs on AP ANALOG1 */
111 #define ADC_0 AdcBank1(5)
112 #define ADC_1 AdcBank1(6)
113 #define ADC_2 AdcBank1(7)
114 #define ADC_3 AdcBank1(4)
115 #define ADC_4 AdcBank1(3)
116 #define ADC_5 AdcBank1(2)
117 
118 
119 #endif /* CONFIG_CLASSIX_H */