Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
lisa_m_2.0.h
Go to the documentation of this file.
1
#ifndef CONFIG_LISA_M_2_0_H
2
#define CONFIG_LISA_M_2_0_H
3
4
#include "
boards/lisa_m_common.h
"
5
6
#define BOARD_LISA_M
7
8
/* Lisa/M has a 12MHz external clock and 72MHz internal. */
9
#define EXT_CLK 12000000
10
#define AHB_CLK 72000000
11
12
/*
13
* Onboard LEDs
14
*/
15
16
/* red, on PA8 */
17
#ifndef USE_LED_1
18
#define USE_LED_1 1
19
#endif
20
#define LED_1_GPIO GPIOA
21
#define LED_1_GPIO_PIN GPIO8
22
#define LED_1_GPIO_ON gpio_clear
23
#define LED_1_GPIO_OFF gpio_set
24
#define LED_1_AFIO_REMAP ((void)0)
25
26
/* green, shared with JTAG_TRST */
27
#ifndef USE_LED_2
28
#define USE_LED_2 1
29
#endif
30
#define LED_2_GPIO GPIOB
31
#define LED_2_GPIO_PIN GPIO4
32
#define LED_2_GPIO_ON gpio_clear
33
#define LED_2_GPIO_OFF gpio_set
34
#define LED_2_AFIO_REMAP { \
35
rcc_periph_clock_enable(RCC_AFIO); \
36
AFIO_MAPR |= AFIO_MAPR_SWJ_CFG_FULL_SWJ_NO_JNTRST; \
37
}
38
39
/* green, shared with ADC12 (ADC_6 on connector ANALOG2) */
40
#ifndef USE_LED_3
41
#define USE_LED_3 1
42
#endif
43
#define LED_3_GPIO GPIOC
44
#define LED_3_GPIO_PIN GPIO2
45
#define LED_3_GPIO_ON gpio_clear
46
#define LED_3_GPIO_OFF gpio_set
47
#define LED_3_AFIO_REMAP ((void)0)
48
49
#if USE_LED_3 && USE_ADC_6
50
#error "You can't use LED_3 and ADC_6 at the same time"
51
#endif
52
53
/* red, shared with ADC15 (ADC_4 on connector ANALOG2) */
54
#ifndef USE_LED_4
55
#define USE_LED_4 1
56
#endif
57
#define LED_4_GPIO GPIOC
58
#define LED_4_GPIO_PIN GPIO5
59
#define LED_4_GPIO_ON gpio_clear
60
#define LED_4_GPIO_OFF gpio_set
61
#define LED_4_AFIO_REMAP ((void)0)
62
63
#if USE_LED_4 && USE_ADC_4
64
#error "You can't use LED_4 and ADC_4 at the same time"
65
#endif
66
67
/* green, on PC15 */
68
#ifndef USE_LED_5
69
#define USE_LED_5 1
70
#endif
71
#define LED_5_GPIO GPIOC
72
#define LED_5_GPIO_PIN GPIO15
73
#define LED_5_GPIO_ON gpio_clear
74
#define LED_5_GPIO_OFF gpio_set
75
#define LED_5_AFIO_REMAP ((void)0)
76
77
/*
78
* LEDs not populated by default
79
*/
80
/* PC3, ADC13 on ADC_1 */
81
#define LED_6_GPIO GPIOC
82
#define LED_6_GPIO_PIN GPIO3
83
#define LED_6_GPIO_ON gpio_clear
84
#define LED_6_GPIO_OFF gpio_set
85
#define LED_6_AFIO_REMAP ((void)0)
86
87
/* PC0, ADC10 on ADC_2 */
88
#define LED_7_GPIO GPIOC
89
#define LED_7_GPIO_PIN GPIO0
90
#define LED_7_GPIO_ON gpio_clear
91
#define LED_7_GPIO_OFF gpio_set
92
#define LED_7_AFIO_REMAP ((void)0)
93
94
/* PC1, ADC11 on ADC_3 */
95
#define LED_8_GPIO GPIOC
96
#define LED_8_GPIO_PIN GPIO1
97
#define LED_8_GPIO_ON gpio_clear
98
#define LED_8_GPIO_OFF gpio_set
99
#define LED_8_AFIO_REMAP ((void)0)
100
101
102
/*
103
* not actual LEDS, used as GPIOs
104
*/
105
106
/* PB1, DRDY on EXT SPI connector*/
107
#define LED_BODY_GPIO GPIOB
108
#define LED_BODY_GPIO_PIN GPIO1
109
#define LED_BODY_GPIO_ON gpio_set
110
#define LED_BODY_GPIO_OFF gpio_clear
111
#define LED_BODY_AFIO_REMAP ((void)0)
112
113
/* PC12, on GPIO connector*/
114
#define LED_12_GPIO GPIOC
115
#define LED_12_GPIO_PIN GPIO12
116
#define LED_12_GPIO_ON gpio_clear
117
#define LED_12_GPIO_OFF gpio_set
118
#define LED_12_AFIO_REMAP ((void)0)
119
120
/*
121
* Spektrum
122
*/
123
/* The line that is pulled low at power up to initiate the bind process */
124
#define SPEKTRUM_BIND_PIN GPIO3
125
#define SPEKTRUM_BIND_PIN_PORT GPIOC
126
127
/* Default actuators driver */
128
#define DEFAULT_ACTUATORS "modules/actuators/actuators_pwm.h"
129
#define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
130
#define ActuatorsDefaultInit() ActuatorsPwmInit()
131
#define ActuatorsDefaultCommit() ActuatorsPwmCommit()
132
133
134
#define DefaultVoltageOfAdc(adc) (0.0045*adc)
135
136
137
/* by default activate onboard baro */
138
#ifndef USE_BARO_BOARD
139
#define USE_BARO_BOARD 1
140
#endif
141
142
#endif
/* CONFIG_LISA_M_2_0_H */
lisa_m_common.h
sw
airborne
boards
lisa_m_2.0.h
Generated on Thu Dec 5 2024 13:05:29 for Paparazzi UAS by
1.9.1