Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
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
/* not compatible with PWM1 */
58
#define ADC_0 AdcBank1(6)
59
#if USE_ADC_0
60
#ifndef USE_AD1
61
#define USE_AD1
62
#endif
63
#define USE_AD1_6
64
#endif
65
66
/* battery */
67
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
68
#ifndef ADC_CHANNEL_VSUPPLY
69
#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
70
#ifndef USE_AD0
71
#define USE_AD0
72
#endif
73
#define USE_AD0_2
74
#endif
75
76
#define DefaultVoltageOfAdc(adc) (0.017889*adc)
77
78
/* SPI (SSP) */
79
#define SPI_SELECT_SLAVE0_PORT 0
80
#define SPI_SELECT_SLAVE0_PIN 20
81
#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
82
#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
83
#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
84
85
//#define SPI_SELECT_SLAVE1_PORT 1
86
//#define SPI_SELECT_SLAVE1_PIN 19
87
88
#define SPI1_DRDY_PINSEL PINSEL1
89
#define SPI1_DRDY_PINSEL_BIT 0
90
#define SPI1_DRDY_PINSEL_VAL 1
91
#define SPI1_DRDY_EINT 0
92
#define SPI1_DRDY_VIC_IT VIC_EINT0
93
94
/* Servo definition for actruators_pwm driver */
95
96
/* NAVGO PWM0 = PWM_SERVO_2 (driver) = PWM2 (lpc) */
97
#if USE_PWM0
98
#define PWM_SERVO_2 1
99
#define SERVO_REG_0 PWMMR2
100
#endif
101
102
/* NAVGO PWM1 = PWM_SERVO_5 (driver) = PWM5 (lpc) */
103
#if USE_PWM1
104
#define PWM_SERVO_5 1
105
#define SERVO_REG_1 PWMMR5
106
#endif
107
108
109
/* by default activate onboard baro */
110
#ifndef USE_BARO_BOARD
111
#define USE_BARO_BOARD 1
112
#endif
113
114
#endif
/* CONFIG_NAVGO_V1_0_H */
sw
airborne
boards
navgo_1.0.h
Generated on Sat Feb 9 2019 07:05:38 for Paparazzi UAS by
1.8.8