Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
lisa_m_2.1.h
Go to the documentation of this file.
1
#ifndef CONFIG_LISA_M_2_1_H
2
#define CONFIG_LISA_M_2_1_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
/* red, shared with ADC15 (ADC_4 on connector ANALOG2) */
50
#ifndef USE_LED_4
51
#define USE_LED_4 1
52
#endif
53
#define LED_4_GPIO GPIOC
54
#define LED_4_GPIO_PIN GPIO5
55
#define LED_4_GPIO_ON gpio_clear
56
#define LED_4_GPIO_OFF gpio_set
57
#define LED_4_AFIO_REMAP ((void)0)
58
59
/* green, on PC15 */
60
#ifndef USE_LED_5
61
#define USE_LED_5 1
62
#endif
63
#define LED_5_GPIO GPIOC
64
#define LED_5_GPIO_PIN GPIO15
65
#define LED_5_GPIO_ON gpio_clear
66
#define LED_5_GPIO_OFF gpio_set
67
#define LED_5_AFIO_REMAP ((void)0)
68
69
/*
70
* LEDs not populated by default
71
*/
72
/* PC3, ADC13 on ADC_1 */
73
#define LED_6_GPIO GPIOC
74
#define LED_6_GPIO_PIN GPIO3
75
#define LED_6_GPIO_ON gpio_clear
76
#define LED_6_GPIO_OFF gpio_set
77
#define LED_6_AFIO_REMAP ((void)0)
78
79
/* PC0, ADC10 on ADC_2 */
80
#define LED_7_GPIO GPIOC
81
#define LED_7_GPIO_PIN GPIO0
82
#define LED_7_GPIO_ON gpio_clear
83
#define LED_7_GPIO_OFF gpio_set
84
#define LED_7_AFIO_REMAP ((void)0)
85
86
/* PC1, ADC11 on ADC_3 */
87
#define LED_8_GPIO GPIOC
88
#define LED_8_GPIO_PIN GPIO1
89
#define LED_8_GPIO_ON gpio_clear
90
#define LED_8_GPIO_OFF gpio_set
91
#define LED_8_AFIO_REMAP ((void)0)
92
93
94
/*
95
* not actual LEDS, used as GPIOs
96
*/
97
98
/* PB1, DRDY on EXT SPI connector*/
99
#define LED_BODY_GPIO GPIOB
100
#define LED_BODY_GPIO_PIN GPIO1
101
#define LED_BODY_GPIO_ON gpio_set
102
#define LED_BODY_GPIO_OFF gpio_clear
103
#define LED_BODY_AFIO_REMAP ((void)0)
104
105
/* PC12, on GPIO connector*/
106
#define LED_12_GPIO GPIOC
107
#define LED_12_GPIO_PIN GPIO12
108
#define LED_12_GPIO_ON gpio_clear
109
#define LED_12_GPIO_OFF gpio_set
110
#define LED_12_AFIO_REMAP ((void)0)
111
112
/*
113
* Spektrum
114
*/
115
/* The line that is pulled low at power up to initiate the bind process */
116
#define SPEKTRUM_BIND_PIN GPIO2
117
#define SPEKTRUM_BIND_PIN_PORT GPIOB
118
119
/* Default actuators driver */
120
#define DEFAULT_ACTUATORS "modules/actuators/actuators_pwm.h"
121
#define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
122
#define ActuatorsDefaultInit() ActuatorsPwmInit()
123
#define ActuatorsDefaultCommit() ActuatorsPwmCommit()
124
125
126
#define DefaultVoltageOfAdc(adc) (0.0045*adc)
127
128
129
/* by default activate onboard baro */
130
#ifndef USE_BARO_BOARD
131
#define USE_BARO_BOARD 1
132
#endif
133
134
#endif
/* CONFIG_LISA_M_2_1_H */
lisa_m_common.h
sw
airborne
boards
lisa_m_2.1.h
Generated on Fri Nov 8 2024 14:10:45 for Paparazzi UAS by
1.9.1