Paparazzi UAS
v5.8.2_stable-0-g6260b7c
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
umarim_lite_2.0.h
Go to the documentation of this file.
1
#ifndef CONFIG_UMARIM_LITE_V2_0_H
2
#define CONFIG_UMARIM_LITE_V2_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
/* Default actuators driver */
34
#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
35
#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
36
#define ActuatorsDefaultInit() Actuators4017Init()
37
#define ActuatorsDefaultCommit() Actuators4017Commit()
38
39
/* P0.5 aka MAT0.1 */
40
#define SERVO_CLOCK_PIN 5
41
#define SERVO_CLOCK_PINSEL PINSEL0
42
#define SERVO_CLOCK_PINSEL_VAL 0x02
43
#define SERVO_CLOCK_PINSEL_BIT 10
44
/* p1.20 */
45
#define SERVO_RESET_PIN 20
46
47
/* PPM : rc rx on P0.28 ( CAP0.2 ) */
48
#define PPM_PINSEL PINSEL1
49
#define PPM_PINSEL_VAL 0x02
50
#define PPM_PINSEL_BIT 24
51
#define PPM_CRI TIR_CR2I
52
#define PPM_CCR_CRF TCCR_CR2_F
53
#define PPM_CCR_CRR TCCR_CR2_R
54
#define PPM_CCR_CRI TCCR_CR2_I
55
#define PPM_CR T0CR2
56
57
/* ADC */
58
59
#define ADC_0 AdcBank1(5)
60
#if USE_ADC_0
61
#ifndef USE_AD1
62
#define USE_AD1
63
#endif
64
#define USE_AD1_5
65
#endif
66
67
#define ADC_1 AdcBank1(4)
68
#if USE_ADC_1
69
#ifndef USE_AD1
70
#define USE_AD1
71
#endif
72
#define USE_AD1_4
73
#endif
74
75
#define ADC_2 AdcBank1(3)
76
#if USE_ADC_2
77
#ifndef USE_AD1
78
#define USE_AD1
79
#endif
80
#define USE_AD1_3
81
#endif
82
83
#define ADC_3 AdcBank1(2)
84
#if USE_ADC_3
85
#ifndef USE_AD1
86
#define USE_AD1
87
#endif
88
#define USE_AD1_2
89
#endif
90
91
92
/* battery */
93
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
94
#ifndef ADC_CHANNEL_VSUPPLY
95
#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
96
#ifndef USE_AD0
97
#define USE_AD0
98
#endif
99
#define USE_AD0_2
100
#endif
101
102
#define DefaultVoltageOfAdc(adc) (0.0247*adc)
103
104
/* SPI (SSP) */
105
#define SPI_SELECT_SLAVE0_PORT 0
106
#define SPI_SELECT_SLAVE0_PIN 20
107
#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
108
#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
109
#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
110
111
#define SPI1_DRDY_PINSEL PINSEL1
112
#define SPI1_DRDY_PINSEL_BIT 0
113
#define SPI1_DRDY_PINSEL_VAL 1
114
#define SPI1_DRDY_EINT 0
115
#define SPI1_DRDY_VIC_IT VIC_EINT0
116
117
#endif
/* CONFIG_UMARIM_LITE_V2_0_H */
sw
airborne
boards
umarim_lite_2.0.h
Generated on Tue Jun 21 2016 14:01:12 for Paparazzi UAS by
1.8.8