Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
board.h
Go to the documentation of this file.
1
/*
2
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#ifndef _BOARD_H_
18
#define _BOARD_H_
19
20
/*
21
* Setup for Pixhawk PX4FMU_2.4 board
22
* Note the MCU used is STM32F427VIT6
23
*/
24
25
/*
26
* Board identifier.
27
*/
28
#define BOARD_PX4FMU_v2
29
#define BOARD_NAME "Pixhawk PX4 FMU v 2.4"
30
31
/*
32
* Board oscillators-related settings.
33
* NOTE: LSE NOT? fitted.
34
*/
35
#if !defined(STM32_LSECLK)
36
#define STM32_LSECLK 0 // originally was 32000 ?
37
#endif
38
39
#if !defined(STM32_HSECLK)
40
#define STM32_HSECLK 24000000
41
#endif
42
43
44
/*
45
* Board voltages.
46
* Required for performance limits calculation.
47
*/
48
#define STM32_VDD 330
49
50
/*
51
* MCU type as defined in the ST header file stm32f4xx.h.
52
*/
53
#define STM32F407xx
54
55
/*
56
* I/O ports initial setup, this configuration is established soon after reset
57
* in the initialization code.
58
* Please refer to the STM32 Reference Manual for details.
59
*/
60
#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
61
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
62
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
63
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
64
#define PIN_ODR_LOW(n) (0U << (n))
65
#define PIN_ODR_HIGH(n) (1U << (n))
66
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
67
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
68
#define PIN_OSPEED_2M(n) (0U << ((n) * 2U))
69
#define PIN_OSPEED_25M(n) (1U << ((n) * 2U))
70
#define PIN_OSPEED_50M(n) (2U << ((n) * 2U))
71
#define PIN_OSPEED_100M(n) (3U << ((n) * 2U))
72
#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
73
#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
74
#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
75
#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
76
77
/*
78
* Port A setup.
79
*
80
* PA0 - Alternate Push Pull output 50MHz (UART4_TX)
81
* PA1 - Alternate Digital input (UART4_RX)
82
* PA2 - Analog input (BATT VOLTAGE SENS - ADC in)
83
* PA3 - Analog input (BATT CURRENT SENS - ADC in)
84
* PA4 - Analog input (VDD 5V SENS - ADC in)
85
* PA5 - Alternate Push Pull output 50MHz (EXTSPI1_SCK)
86
* PA6 - Alternate Digital input. (EXTSPI1_MISO)
87
* PA7 - Alternate Push Pull output 50MHz (EXTSPI1_MOSI)
88
* PA8 - Digital input (!VDD_5V_PERIPH_EN)
89
* PA9 - Digital input. (USB_VBUS)
90
* PA10 - Alternate Digital input (UART1_Rx)
91
* PA11 - Alternate input (USB_DM)
92
* PA12 - Alternate input (USB_DP)
93
* PA13 - Alternate Digital input (SWDIO)
94
* PA14 - Alternate Digital input (SWCLCK)
95
* PA15 - Digital output (ALARM)
96
*/
97
#define VAL_GPIOA_MODER (PIN_MODE_ALTERNATE(0)| \
98
PIN_MODE_ALTERNATE(1) | \
99
PIN_MODE_ANALOG(2) | \
100
PIN_MODE_ANALOG(3) | \
101
PIN_MODE_ANALOG(4) | \
102
PIN_MODE_ALTERNATE(5) | \
103
PIN_MODE_ALTERNATE(6) | \
104
PIN_MODE_ALTERNATE(7) | \
105
PIN_MODE_INPUT(8) | \
106
PIN_MODE_INPUT(9) | \
107
PIN_MODE_ALTERNATE(10) | \
108
PIN_MODE_ALTERNATE(11) | \
109
PIN_MODE_ALTERNATE(12) | \
110
PIN_MODE_ALTERNATE(13) | \
111
PIN_MODE_ALTERNATE(14) | \
112
PIN_MODE_OUTPUT(15))
113
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(0) | \
114
PIN_OTYPE_PUSHPULL(1) | \
115
PIN_OTYPE_PUSHPULL(2) | \
116
PIN_OTYPE_PUSHPULL(3) | \
117
PIN_OTYPE_PUSHPULL(4) | \
118
PIN_OTYPE_PUSHPULL(5) | \
119
PIN_OTYPE_PUSHPULL(6) | \
120
PIN_OTYPE_PUSHPULL(7) | \
121
PIN_OTYPE_PUSHPULL(8) | \
122
PIN_OTYPE_PUSHPULL(9) | \
123
PIN_OTYPE_PUSHPULL(10) | \
124
PIN_OTYPE_PUSHPULL(11) | \
125
PIN_OTYPE_PUSHPULL(12) | \
126
PIN_OTYPE_PUSHPULL(13) | \
127
PIN_OTYPE_PUSHPULL(14) | \
128
PIN_OTYPE_OPENDRAIN(15))
129
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_100M(0) | \
130
PIN_OSPEED_100M(1) | \
131
PIN_OSPEED_100M(2) | \
132
PIN_OSPEED_100M(3) | \
133
PIN_OSPEED_100M(4) | \
134
PIN_OSPEED_50M(5) | \
135
PIN_OSPEED_50M(6) | \
136
PIN_OSPEED_50M(7) | \
137
PIN_OSPEED_100M(8) | \
138
PIN_OSPEED_100M(9) | \
139
PIN_OSPEED_100M(10) | \
140
PIN_OSPEED_100M(11) | \
141
PIN_OSPEED_100M(12) | \
142
PIN_OSPEED_100M(13) | \
143
PIN_OSPEED_100M(14) | \
144
PIN_OSPEED_100M(15))
145
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(0) | \
146
PIN_PUPDR_FLOATING(1) | \
147
PIN_PUPDR_FLOATING(2) | \
148
PIN_PUPDR_FLOATING(3) | \
149
PIN_PUPDR_FLOATING(4) | \
150
PIN_PUPDR_FLOATING(5) | \
151
PIN_PUPDR_FLOATING(6) | \
152
PIN_PUPDR_FLOATING(7) | \
153
PIN_PUPDR_FLOATING(8) | \
154
PIN_PUPDR_FLOATING(9) | \
155
PIN_PUPDR_FLOATING(10) | \
156
PIN_PUPDR_FLOATING(11) | \
157
PIN_PUPDR_FLOATING(12) | \
158
PIN_PUPDR_FLOATING(13) | \
159
PIN_PUPDR_FLOATING(14) | \
160
PIN_PUPDR_FLOATING(15))
161
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(0) | \
162
PIN_ODR_HIGH(1) | \
163
PIN_ODR_HIGH(2) | \
164
PIN_ODR_HIGH(3) | \
165
PIN_ODR_HIGH(4) | \
166
PIN_ODR_HIGH(5) | \
167
PIN_ODR_HIGH(6) | \
168
PIN_ODR_HIGH(7) | \
169
PIN_ODR_HIGH(8) | \
170
PIN_ODR_HIGH(9) | \
171
PIN_ODR_HIGH(10) | \
172
PIN_ODR_HIGH(11) | \
173
PIN_ODR_HIGH(12) | \
174
PIN_ODR_HIGH(13) | \
175
PIN_ODR_HIGH(14) | \
176
PIN_ODR_HIGH(15))
177
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(0, 8) | \
178
PIN_AFIO_AF(1, 8) | \
179
PIN_AFIO_AF(2, 0) | \
180
PIN_AFIO_AF(3, 0) | \
181
PIN_AFIO_AF(4, 0) | \
182
PIN_AFIO_AF(5, 5) | \
183
PIN_AFIO_AF(6, 5) | \
184
PIN_AFIO_AF(7, 5))
185
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(8, 0) | \
186
PIN_AFIO_AF(9, 0) | \
187
PIN_AFIO_AF(10, 7) | \
188
PIN_AFIO_AF(11, 10) | \
189
PIN_AFIO_AF(12, 10) | \
190
PIN_AFIO_AF(13, 0) | \
191
PIN_AFIO_AF(14, 0) | \
192
PIN_AFIO_AF(15, 0))
193
194
/*
195
* Port B setup:
196
* PB0 - Digital input (GYRO_DRDY) #
197
* PB1 - Digital input (MAG_DRDY) #
198
* PB2 - Digital input (BOOT) # ?
199
* PB3 - Digital input (JTAG_TDO/SWD) #
200
* PB4 - Digital input (ACCEL_DRDY) #
201
* PB5 - Digital input (!VDD_BRICK_VALID) #
202
* PB6 - Alternate Push Pull output 50MHz (CAN2_TX)
203
* PB7 - Digital input (!VDD_SERVO_VALID)
204
* PB8 - Alternate Open Drain output 50MHz (I2C1_SCL)
205
* PB9 - Alternate Open Drain output 50MHz (I2C1_SDA)
206
* PB10 - Alternate Open Drain output 50MHz (I2C2_SCL)
207
* PB11 - Alternate Open Drain output 50MHz (I2C2_SDA)
208
* PB12 - Alternate Push Pull output 50MHz (CAN2_RX)
209
* PB13 - Alternate Push Pull output 50MHz (FRAM_SPI2_SCK) #
210
* PB14 - Alternate Digital input (FRAM_SPI2_MISO) #
211
* PB15 - Alternate Push Pull output 50MHz (FRAM_SPI2_MOSI) #
212
*/
213
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(0) | \
214
PIN_MODE_INPUT(1) | \
215
PIN_MODE_INPUT(2) | \
216
PIN_MODE_ALTERNATE(3) | \
217
PIN_MODE_INPUT(4) | \
218
PIN_MODE_INPUT(5) | \
219
PIN_MODE_ALTERNATE(6) | \
220
PIN_MODE_INPUT(7) | \
221
PIN_MODE_ALTERNATE(8) | \
222
PIN_MODE_ALTERNATE(9) | \
223
PIN_MODE_ALTERNATE(10) | \
224
PIN_MODE_ALTERNATE(11) | \
225
PIN_MODE_ALTERNATE(12) | \
226
PIN_MODE_ALTERNATE(13) | \
227
PIN_MODE_ALTERNATE(14) | \
228
PIN_MODE_ALTERNATE(15))
229
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(0) | \
230
PIN_OTYPE_PUSHPULL(1) | \
231
PIN_OTYPE_PUSHPULL(2) | \
232
PIN_OTYPE_PUSHPULL(3) | \
233
PIN_OTYPE_PUSHPULL(4) | \
234
PIN_OTYPE_PUSHPULL(5) | \
235
PIN_OTYPE_PUSHPULL(6) | \
236
PIN_OTYPE_PUSHPULL(7) | \
237
PIN_OTYPE_OPENDRAIN(8) | \
238
PIN_OTYPE_OPENDRAIN(9) | \
239
PIN_OTYPE_OPENDRAIN(10) | \
240
PIN_OTYPE_OPENDRAIN(11) | \
241
PIN_OTYPE_PUSHPULL(12) | \
242
PIN_OTYPE_PUSHPULL(13) | \
243
PIN_OTYPE_PUSHPULL(14) | \
244
PIN_OTYPE_PUSHPULL(15))
245
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_50M(0) | \
246
PIN_OSPEED_50M(1) | \
247
PIN_OSPEED_50M(2) | \
248
PIN_OSPEED_100M(3) | \
249
PIN_OSPEED_50M(4) | \
250
PIN_OSPEED_50M(5) | \
251
PIN_OSPEED_50M(6) | \
252
PIN_OSPEED_50M(7) | \
253
PIN_OSPEED_50M(8) | \
254
PIN_OSPEED_50M(9) | \
255
PIN_OSPEED_50M(10) | \
256
PIN_OSPEED_50M(11) | \
257
PIN_OSPEED_50M(12) | \
258
PIN_OSPEED_50M(13) | \
259
PIN_OSPEED_50M(14) | \
260
PIN_OSPEED_50M(15))
261
#define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(0) | \
262
PIN_PUPDR_FLOATING(1) | \
263
PIN_PUPDR_FLOATING(2) | \
264
PIN_PUPDR_FLOATING(3) | \
265
PIN_PUPDR_FLOATING(4) | \
266
PIN_PUPDR_FLOATING(5) | \
267
PIN_PUPDR_FLOATING(6) | \
268
PIN_PUPDR_FLOATING(7) | \
269
PIN_PUPDR_FLOATING(8) | \
270
PIN_PUPDR_FLOATING(9) | \
271
PIN_PUPDR_FLOATING(10) | \
272
PIN_PUPDR_FLOATING(11) | \
273
PIN_PUPDR_FLOATING(12) | \
274
PIN_PUPDR_FLOATING(13) | \
275
PIN_PUPDR_FLOATING(14) | \
276
PIN_PUPDR_FLOATING(15))
277
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(0) | \
278
PIN_ODR_HIGH(1) | \
279
PIN_ODR_HIGH(2) | \
280
PIN_ODR_HIGH(3) | \
281
PIN_ODR_HIGH(4) | \
282
PIN_ODR_HIGH(5) | \
283
PIN_ODR_HIGH(6) | \
284
PIN_ODR_HIGH(7) | \
285
PIN_ODR_HIGH(8) | \
286
PIN_ODR_HIGH(9) | \
287
PIN_ODR_HIGH(10) | \
288
PIN_ODR_HIGH(11) | \
289
PIN_ODR_HIGH(12) | \
290
PIN_ODR_HIGH(13) | \
291
PIN_ODR_HIGH(14) | \
292
PIN_ODR_HIGH(15))
293
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(0, 0) | \
294
PIN_AFIO_AF(1, 0) | \
295
PIN_AFIO_AF(2, 0) | \
296
PIN_AFIO_AF(3, 0) | \
297
PIN_AFIO_AF(4, 0) | \
298
PIN_AFIO_AF(5, 0) | \
299
PIN_AFIO_AF(6, 9) | \
300
PIN_AFIO_AF(7, 0))
301
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(8, 4) | \
302
PIN_AFIO_AF(9, 4) | \
303
PIN_AFIO_AF(10, 4) | \
304
PIN_AFIO_AF(11, 4) | \
305
PIN_AFIO_AF(12, 9) | \
306
PIN_AFIO_AF(13, 5) | \
307
PIN_AFIO_AF(14, 5) | \
308
PIN_AFIO_AF(15, 5))
309
310
/*
311
* Port C setup:
312
* PC0 - Digital input (!VBUS_VALID) #
313
* PC1 - Analog input (ADC3) #
314
* PC2 - Push Pull output 50MHz. (!MPU_CS) #
315
* PC3 - Analog input (ADC1) #
316
* PC4 - Analog input (ADC2) #
317
* PC5 - Analog input (PRESSURE_SENS - ADC) #
318
* PC6 - Alternate Push Pull output 50MHz (UART6-TX)
319
* PC7 - Alternate Digital intput (UART6_RX)
320
* PC8 - Alternate pullup 100MHz (SDIO_D0)
321
* PC9 - Alternate pullup 100MHz (SDIO_D1)
322
* PC10 - Alternate pullup 100MHz (SDIO_D2)
323
* PC11 - Alternate pullup 100MHz (SDIO_D3)
324
* PC12 - Alternate floating 100MHz (SDIO_CK)
325
* PC13 - Push Pull output 50MHz. (!GYRO_SS) #
326
* PC14 - Digital input (GPIO_EXT_1)
327
* PC15 - Push Pull output 50MHz. (!ACCEL_MAG_SS)
328
*/
329
#define VAL_GPIOC_MODER (PIN_MODE_INPUT(0) |\
330
PIN_MODE_INPUT(1) | \
331
PIN_MODE_OUTPUT(2) | \
332
PIN_MODE_INPUT(3) | \
333
PIN_MODE_INPUT(4) | \
334
PIN_MODE_INPUT(5) | \
335
PIN_MODE_ALTERNATE(6) | \
336
PIN_MODE_ALTERNATE(7) | \
337
PIN_MODE_ALTERNATE(8) | \
338
PIN_MODE_ALTERNATE(9) | \
339
PIN_MODE_ALTERNATE(10) | \
340
PIN_MODE_ALTERNATE(11) | \
341
PIN_MODE_ALTERNATE(12) | \
342
PIN_MODE_OUTPUT(13) | \
343
PIN_MODE_INPUT(14) | \
344
PIN_MODE_OUTPUT(15))
345
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(0) |\
346
PIN_OTYPE_PUSHPULL(1) | \
347
PIN_OTYPE_PUSHPULL(2) | \
348
PIN_OTYPE_PUSHPULL(3) | \
349
PIN_OTYPE_PUSHPULL(4) | \
350
PIN_OTYPE_PUSHPULL(5) | \
351
PIN_OTYPE_PUSHPULL(6) | \
352
PIN_OTYPE_PUSHPULL(7) | \
353
PIN_OTYPE_PUSHPULL(8) | \
354
PIN_OTYPE_PUSHPULL(9) | \
355
PIN_OTYPE_PUSHPULL(10) | \
356
PIN_OTYPE_PUSHPULL(11) | \
357
PIN_OTYPE_PUSHPULL(12) | \
358
PIN_OTYPE_PUSHPULL(13) | \
359
PIN_OTYPE_PUSHPULL(14) | \
360
PIN_OTYPE_PUSHPULL(15))
361
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_50M(0) |\
362
PIN_OSPEED_50M(1) | \
363
PIN_OSPEED_50M(2) | \
364
PIN_OSPEED_50M(3) | \
365
PIN_OSPEED_50M(4) | \
366
PIN_OSPEED_50M(5) | \
367
PIN_OSPEED_50M(6) | \
368
PIN_OSPEED_50M(7) | \
369
PIN_OSPEED_50M(8) | \
370
PIN_OSPEED_50M(9) | \
371
PIN_OSPEED_50M(10) | \
372
PIN_OSPEED_50M(11) | \
373
PIN_OSPEED_50M(12) | \
374
PIN_OSPEED_2M(13) | \
375
PIN_OSPEED_50M(14) | \
376
PIN_OSPEED_2M(15))
377
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(0) |\
378
PIN_PUPDR_FLOATING(1) | \
379
PIN_PUPDR_FLOATING(2) | \
380
PIN_PUPDR_FLOATING(3) | \
381
PIN_PUPDR_FLOATING(4) | \
382
PIN_PUPDR_FLOATING(5) | \
383
PIN_PUPDR_FLOATING(6) | \
384
PIN_PUPDR_FLOATING(7) | \
385
PIN_PUPDR_PULLUP(8) | \
386
PIN_PUPDR_PULLUP(9) | \
387
PIN_PUPDR_PULLUP(10) | \
388
PIN_PUPDR_PULLUP(11) | \
389
PIN_PUPDR_FLOATING(12) | \
390
PIN_PUPDR_FLOATING(13) | \
391
PIN_PUPDR_FLOATING(14) | \
392
PIN_PUPDR_FLOATING(15))
393
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(0) | \
394
PIN_ODR_HIGH(1) | \
395
PIN_ODR_HIGH(2) | \
396
PIN_ODR_HIGH(3) | \
397
PIN_ODR_HIGH(4) | \
398
PIN_ODR_HIGH(5) | \
399
PIN_ODR_HIGH(6) | \
400
PIN_ODR_HIGH(7) | \
401
PIN_ODR_HIGH(8) | \
402
PIN_ODR_HIGH(9) | \
403
PIN_ODR_HIGH(10) | \
404
PIN_ODR_HIGH(11) | \
405
PIN_ODR_HIGH(12) | \
406
PIN_ODR_HIGH(13) | \
407
PIN_ODR_HIGH(14) | \
408
PIN_ODR_HIGH(15))
409
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(0, 0) |\
410
PIN_AFIO_AF(1, 0) | \
411
PIN_AFIO_AF(2, 0) | \
412
PIN_AFIO_AF(3, 0) | \
413
PIN_AFIO_AF(4, 0) | \
414
PIN_AFIO_AF(5, 0) | \
415
PIN_AFIO_AF(6, 8) | \
416
PIN_AFIO_AF(7, 8))
417
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(8, 12) | \
418
PIN_AFIO_AF(9, 12) | \
419
PIN_AFIO_AF(10, 12) | \
420
PIN_AFIO_AF(11, 12) | \
421
PIN_AFIO_AF(12, 12) | \
422
PIN_AFIO_AF(13, 0) | \
423
PIN_AFIO_AF(14, 0) | \
424
PIN_AFIO_AF(15, 0))
425
426
/*
427
* Port D setup:
428
* PD0 - CAN1_RX.
429
* PD1 - CAN1_TX
430
* PD2 - SDIO_CMD
431
* PD3 - UART2_CTS
432
* PD4 - UART2_RTS
433
* PD5 - UART2_TX
434
* PD6 - UART2_RX
435
* PD7 - !BARO_CS
436
* PD8 - UART3_TX
437
* PD9 - UART3_RX
438
* PD10 - !FRAM_CS
439
* PD11 - UART3_CTS
440
* PD12 - UART3_RTS
441
* PD13 - SERVO_5
442
* PD14 - SERVO_6
443
* PD15 - MPU_DRDY
444
*/
445
#define VAL_GPIOD_MODER (PIN_MODE_ALTERNATE(0) | \
446
PIN_MODE_ALTERNATE(1) | \
447
PIN_MODE_ALTERNATE(2) | \
448
PIN_MODE_ALTERNATE(3) | \
449
PIN_MODE_ALTERNATE(4) | \
450
PIN_MODE_ALTERNATE(5) | \
451
PIN_MODE_ALTERNATE(6) | \
452
PIN_MODE_OUTPUT(7) | \
453
PIN_MODE_ALTERNATE(8) | \
454
PIN_MODE_ALTERNATE(9) | \
455
PIN_MODE_OUTPUT(10) | \
456
PIN_MODE_ALTERNATE(11) | \
457
PIN_MODE_ALTERNATE(12) | \
458
PIN_MODE_INPUT(13) | \
459
PIN_MODE_INPUT(14) | \
460
PIN_MODE_INPUT(15))
461
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(0) | \
462
PIN_OTYPE_PUSHPULL(1) | \
463
PIN_OTYPE_PUSHPULL(2) | \
464
PIN_OTYPE_PUSHPULL(3) | \
465
PIN_OTYPE_PUSHPULL(4) | \
466
PIN_OTYPE_PUSHPULL(5) |\
467
PIN_OTYPE_PUSHPULL(6) | \
468
PIN_OTYPE_PUSHPULL(7) | \
469
PIN_OTYPE_PUSHPULL(8) | \
470
PIN_OTYPE_PUSHPULL(9) | \
471
PIN_OTYPE_PUSHPULL(10) | \
472
PIN_OTYPE_PUSHPULL(11) | \
473
PIN_OTYPE_PUSHPULL(12) | \
474
PIN_OTYPE_PUSHPULL(13) | \
475
PIN_OTYPE_PUSHPULL(14) | \
476
PIN_OTYPE_PUSHPULL(15))
477
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_100M(0) | \
478
PIN_OSPEED_100M(1) | \
479
PIN_OSPEED_100M(2) | \
480
PIN_OSPEED_100M(3) | \
481
PIN_OSPEED_100M(4) | \
482
PIN_OSPEED_100M(5) | \
483
PIN_OSPEED_100M(6) | \
484
PIN_OSPEED_2M(7) | \
485
PIN_OSPEED_100M(8) | \
486
PIN_OSPEED_100M(9) | \
487
PIN_OSPEED_100M(10) | \
488
PIN_OSPEED_100M(11) | \
489
PIN_OSPEED_100M(12) | \
490
PIN_OSPEED_100M(13) | \
491
PIN_OSPEED_100M(14) | \
492
PIN_OSPEED_100M(15))
493
#define VAL_GPIOD_PUPDR (PIN_PUPDR_FLOATING(0) | \
494
PIN_PUPDR_FLOATING(1) | \
495
PIN_PUPDR_FLOATING(2) | \
496
PIN_PUPDR_FLOATING(3) | \
497
PIN_PUPDR_FLOATING(4) | \
498
PIN_PUPDR_FLOATING(5) |\
499
PIN_PUPDR_FLOATING(6) | \
500
PIN_PUPDR_FLOATING(7) | \
501
PIN_PUPDR_FLOATING(8) | \
502
PIN_PUPDR_FLOATING(9) | \
503
PIN_PUPDR_FLOATING(10) | \
504
PIN_PUPDR_FLOATING(11) | \
505
PIN_PUPDR_FLOATING(12) | \
506
PIN_PUPDR_FLOATING(13) | \
507
PIN_PUPDR_FLOATING(14) | \
508
PIN_PUPDR_FLOATING(15))
509
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(0) | \
510
PIN_ODR_HIGH(1) | \
511
PIN_ODR_HIGH(2) | \
512
PIN_ODR_HIGH(3) | \
513
PIN_ODR_HIGH(4) | \
514
PIN_ODR_HIGH(5) | \
515
PIN_ODR_HIGH(6) | \
516
PIN_ODR_HIGH(7) | \
517
PIN_ODR_HIGH(8) | \
518
PIN_ODR_HIGH(9) | \
519
PIN_ODR_HIGH(10) | \
520
PIN_ODR_HIGH(11) | \
521
PIN_ODR_HIGH(12) | \
522
PIN_ODR_HIGH(13) | \
523
PIN_ODR_HIGH(14) | \
524
PIN_ODR_HIGH(15))
525
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(0, 9) | \
526
PIN_AFIO_AF(1, 9) | \
527
PIN_AFIO_AF(2, 12) | \
528
PIN_AFIO_AF(3, 7) | \
529
PIN_AFIO_AF(4, 7) | \
530
PIN_AFIO_AF(5, 7) | \
531
PIN_AFIO_AF(6, 7) | \
532
PIN_AFIO_AF(7, 0))
533
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(8, 7) | \
534
PIN_AFIO_AF(9, 7) | \
535
PIN_AFIO_AF(10, 0) | \
536
PIN_AFIO_AF(11, 7) | \
537
PIN_AFIO_AF(12, 7) | \
538
PIN_AFIO_AF(13, 0) | \
539
PIN_AFIO_AF(14, 0) | \
540
PIN_AFIO_AF(15, 0))
541
542
/*
543
* Port E setup:
544
* PE0 - UART8_RX
545
* PE1 - UART8_TX
546
* PE2 - SPI4_EXT_SCK
547
* PE3 - VDD_3V3_SENSOR_EN
548
* PE4 - !SPI4_EXT_NSS
549
* PE5 - SPI4_EXT_MISO
550
* PE6 - SPI4_EXT_MOSI
551
* PE7 - UART7_RX
552
* PE8 - UART7_TX
553
* PE9 - SERVO_CH4
554
* PE10 - !VDD_HIPOWER_OC
555
* PE11 - SERVO_CH3
556
* PE12 - LED_AMBER
557
* PE13 - SERVO_CH2
558
* PE14 - SERVO_CH1
559
* PE15 - !VDD_5V_PERIPH_OC
560
*/
561
#define VAL_GPIOE_MODER (PIN_MODE_ALTERNATE(0) | \
562
PIN_MODE_ALTERNATE(1) | \
563
PIN_MODE_ALTERNATE(2) | \
564
PIN_MODE_OUTPUT(3) | \
565
PIN_MODE_ALTERNATE(4) | \
566
PIN_MODE_ALTERNATE(5) | \
567
PIN_MODE_ALTERNATE(6) | \
568
PIN_MODE_ALTERNATE(7) | \
569
PIN_MODE_ALTERNATE(8) | \
570
PIN_MODE_INPUT(9) | \
571
PIN_MODE_INPUT(10) | \
572
PIN_MODE_INPUT(11) | \
573
PIN_MODE_OUTPUT(12) | \
574
PIN_MODE_INPUT(13) | \
575
PIN_MODE_INPUT(14) | \
576
PIN_MODE_INPUT(15))
577
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(0) | \
578
PIN_OTYPE_PUSHPULL(1) | \
579
PIN_OTYPE_PUSHPULL(2) | \
580
PIN_OTYPE_PUSHPULL(3) | \
581
PIN_OTYPE_PUSHPULL(4) | \
582
PIN_OTYPE_PUSHPULL(5) | \
583
PIN_OTYPE_PUSHPULL(6) | \
584
PIN_OTYPE_PUSHPULL(7) | \
585
PIN_OTYPE_PUSHPULL(8) | \
586
PIN_OTYPE_PUSHPULL(9) | \
587
PIN_OTYPE_PUSHPULL(10) | \
588
PIN_OTYPE_PUSHPULL(11) | \
589
PIN_OTYPE_OPENDRAIN(12) | \
590
PIN_OTYPE_PUSHPULL(13) | \
591
PIN_OTYPE_PUSHPULL(14) | \
592
PIN_OTYPE_PUSHPULL(15))
593
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_100M(0) | \
594
PIN_OSPEED_100M(1) | \
595
PIN_OSPEED_50M(2) | \
596
PIN_OSPEED_100M(3) | \
597
PIN_OSPEED_50M(4) | \
598
PIN_OSPEED_50M(5) | \
599
PIN_OSPEED_50M(6) | \
600
PIN_OSPEED_100M(7) | \
601
PIN_OSPEED_100M(8) | \
602
PIN_OSPEED_100M(9) | \
603
PIN_OSPEED_100M(10) | \
604
PIN_OSPEED_100M(11) | \
605
PIN_OSPEED_100M(12) | \
606
PIN_OSPEED_100M(13) | \
607
PIN_OSPEED_100M(14) | \
608
PIN_OSPEED_100M(15))
609
#define VAL_GPIOE_PUPDR (PIN_PUPDR_FLOATING(0) | \
610
PIN_PUPDR_FLOATING(1) | \
611
PIN_PUPDR_FLOATING(2) | \
612
PIN_PUPDR_FLOATING(3) | \
613
PIN_PUPDR_FLOATING(4) | \
614
PIN_PUPDR_FLOATING(5) | \
615
PIN_PUPDR_FLOATING(6) | \
616
PIN_PUPDR_FLOATING(7) | \
617
PIN_PUPDR_FLOATING(8) | \
618
PIN_PUPDR_FLOATING(9) | \
619
PIN_PUPDR_FLOATING(10) | \
620
PIN_PUPDR_FLOATING(11) | \
621
PIN_PUPDR_FLOATING(12) | \
622
PIN_PUPDR_FLOATING(13) | \
623
PIN_PUPDR_FLOATING(14) | \
624
PIN_PUPDR_FLOATING(15))
625
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(0) | \
626
PIN_ODR_HIGH(1) | \
627
PIN_ODR_HIGH(2) | \
628
PIN_ODR_HIGH(3) | \
629
PIN_ODR_HIGH(4) | \
630
PIN_ODR_HIGH(5) | \
631
PIN_ODR_HIGH(6) | \
632
PIN_ODR_HIGH(7) | \
633
PIN_ODR_HIGH(8) | \
634
PIN_ODR_HIGH(9) | \
635
PIN_ODR_HIGH(10) | \
636
PIN_ODR_HIGH(11) | \
637
PIN_ODR_HIGH(12) | \
638
PIN_ODR_HIGH(13) | \
639
PIN_ODR_HIGH(14) | \
640
PIN_ODR_HIGH(15))
641
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(0, 8) | \
642
PIN_AFIO_AF(1, 8) | \
643
PIN_AFIO_AF(2, 5) | \
644
PIN_AFIO_AF(3, 0) | \
645
PIN_AFIO_AF(4, 5) | \
646
PIN_AFIO_AF(5, 5) | \
647
PIN_AFIO_AF(6, 5) | \
648
PIN_AFIO_AF(7, 8))
649
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(8, 8) | \
650
PIN_AFIO_AF(9, 0) | \
651
PIN_AFIO_AF(10, 0) | \
652
PIN_AFIO_AF(11, 0) | \
653
PIN_AFIO_AF(12, 0) | \
654
PIN_AFIO_AF(13, 0) | \
655
PIN_AFIO_AF(14, 0) | \
656
PIN_AFIO_AF(15, 0))
657
658
/*
659
* GPIOF setup:
660
*
661
*/
662
#define VAL_GPIOF_MODER 0x00000000
663
#define VAL_GPIOF_OTYPER 0x00000000
664
#define VAL_GPIOF_OSPEEDR 0x00000000
665
#define VAL_GPIOF_PUPDR 0x55555555 // all pullup
666
#define VAL_GPIOF_ODR 0xFFFFFFFF
667
#define VAL_GPIOF_AFRL 0x00000000
668
#define VAL_GPIOF_AFRH 0x00000000
669
670
/*
671
* GPIOG setup:
672
*
673
*/
674
#define VAL_GPIOG_MODER 0x00000000
675
#define VAL_GPIOG_OTYPER 0x00000000
676
#define VAL_GPIOG_OSPEEDR 0x00000000
677
#define VAL_GPIOG_PUPDR 0x55555555 // all pullup
678
#define VAL_GPIOG_ODR 0xFFFFFFFF
679
#define VAL_GPIOG_AFRL 0x00000000
680
#define VAL_GPIOG_AFRH 0x00000000
681
/*
682
* GPIOH setup:
683
*
684
*/
685
#define VAL_GPIOH_MODER 0x00000000
686
#define VAL_GPIOH_OTYPER 0x00000000
687
#define VAL_GPIOH_OSPEEDR 0x00000000
688
#define VAL_GPIOH_PUPDR 0x55555555 // all pullup
689
#define VAL_GPIOH_ODR 0xFFFFFFFF
690
#define VAL_GPIOH_AFRL 0x00000000
691
#define VAL_GPIOH_AFRH 0x00000000
692
693
/*
694
* GPIOI setup:
695
*
696
*/
697
#define VAL_GPIOI_MODER 0x00000000
698
#define VAL_GPIOI_OTYPER 0x00000000
699
#define VAL_GPIOI_OSPEEDR 0x00000000
700
#define VAL_GPIOI_PUPDR 0x55555555 // all pullup
701
#define VAL_GPIOI_ODR 0xFFFFFFFF
702
#define VAL_GPIOI_AFRL 0x00000000
703
#define VAL_GPIOI_AFRH 0x00000000
704
705
706
707
/*
708
* AHB_CLK
709
*/
710
#define AHB_CLK STM32_HCLK
711
712
/*
713
* Onboard LEDs
714
*/
715
/* red, on PE12 */
716
#ifndef USE_LED_1
717
#define USE_LED_1 1
718
#endif
719
#define LED_1_GPIO GPIOE
720
#define LED_1_GPIO_PIN GPIO12
721
#define LED_1_GPIO_ON gpio_clear
722
#define LED_1_GPIO_OFF gpio_set
723
#define LED_1_AFIO_REMAP ((void)0)
724
725
/*
726
* ADCs TODO
727
*/
728
// AUX 1
729
#if USE_ADC_1
730
#define AD1_1_CHANNEL ADC_CHANNEL_IN9
731
#define ADC_1 AD1_1
732
#define ADC_1_GPIO_PORT GPIOB
733
#define ADC_1_GPIO_PIN GPIO1
734
#endif
735
736
// AUX 2
737
#if USE_ADC_2
738
#define AD1_2_CHANNEL ADC_CHANNEL_IN15
739
#define ADC_2 AD1_2
740
#define ADC_2_GPIO_PORT GPIOC
741
#define ADC_2_GPIO_PIN GPIO5
742
#endif
743
744
// AUX 3
745
#if USE_ADC_3
746
#define AD1_3_CHANNEL ADC_CHANNEL_IN14
747
#define ADC_3 AD1_3
748
#define ADC_3_GPIO_PORT GPIOC
749
#define ADC_3_GPIO_PIN GPIO4
750
#endif
751
752
// Internal ADC for battery enabled by default
753
#ifndef USE_ADC_4
754
#define USE_ADC_4 1
755
#endif
756
#if USE_ADC_4
757
#define AD1_4_CHANNEL ADC_CHANNEL_IN4
758
#define ADC_4 AD1_4
759
#define ADC_4_GPIO_PORT GPIOA
760
#define ADC_4_GPIO_PIN GPIO4
761
#endif
762
763
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
764
#ifndef ADC_CHANNEL_VSUPPLY
765
#define ADC_CHANNEL_VSUPPLY ADC_4
766
#endif
767
768
#define DefaultVoltageOfAdc(adc) (0.006185*adc)
769
770
/*
771
* PWM defines TODO
772
*/
773
#ifndef USE_PWM0
774
#define USE_PWM0 1
775
#endif
776
#if USE_PWM0
777
#define PWM_SERVO_0 0
778
#define PWM_SERVO_0_GPIO GPIOB
779
#define PWM_SERVO_0_PIN GPIO0
780
#define PWM_SERVO_0_AF GPIO_AF2
781
#define PWM_SERVO_0_DRIVER PWMD3
782
#define PWM_SERVO_0_CHANNEL 2
783
#define PWM_SERVO_0_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
784
#else
785
#define PWM_SERVO_0_ACTIVE PWM_OUTPUT_DISABLED
786
#endif
787
788
#ifndef USE_PWM1
789
#define USE_PWM1 1
790
#endif
791
#if USE_PWM1
792
#define PWM_SERVO_1 1
793
#define PWM_SERVO_1_GPIO GPIOA
794
#define PWM_SERVO_1_PIN GPIO2
795
#define PWM_SERVO_1_AF GPIO_AF1
796
#define PWM_SERVO_1_DRIVER PWMD2
797
#define PWM_SERVO_1_CHANNEL 2
798
#define PWM_SERVO_1_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
799
#else
800
#define PWM_SERVO_1_ACTIVE PWM_OUTPUT_DISABLED
801
#endif
802
803
#ifndef USE_PWM2
804
#define USE_PWM2 1
805
#endif
806
#if USE_PWM2
807
#define PWM_SERVO_2 2
808
#define PWM_SERVO_2_GPIO GPIOB
809
#define PWM_SERVO_2_PIN GPIO5
810
#define PWM_SERVO_2_AF GPIO_AF2
811
#define PWM_SERVO_2_DRIVER PWMD3
812
#define PWM_SERVO_2_CHANNEL 1
813
#define PWM_SERVO_2_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
814
#else
815
#define PWM_SERVO_2_ACTIVE PWM_OUTPUT_DISABLED
816
#endif
817
818
#ifndef USE_PWM3
819
#define USE_PWM3 1
820
#endif
821
#if USE_PWM3
822
#define PWM_SERVO_3 3
823
#define PWM_SERVO_3_GPIO GPIOB
824
#define PWM_SERVO_3_PIN GPIO4
825
#define PWM_SERVO_3_AF GPIO_AF2
826
#define PWM_SERVO_3_DRIVER PWMD3
827
#define PWM_SERVO_3_CHANNEL 0
828
#define PWM_SERVO_3_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
829
#else
830
#define PWM_SERVO_3_ACTIVE PWM_OUTPUT_DISABLED
831
#endif
832
833
#ifndef USE_PWM4
834
#define USE_PWM4 1
835
#endif
836
#if USE_PWM4
837
#define PWM_SERVO_4 4
838
#define PWM_SERVO_4_GPIO GPIOB
839
#define PWM_SERVO_4_PIN GPIO3
840
#define PWM_SERVO_4_AF GPIO_AF1
841
#define PWM_SERVO_4_DRIVER PWMD2
842
#define PWM_SERVO_4_CHANNEL 1
843
#define PWM_SERVO_4_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
844
#else
845
#define PWM_SERVO_4_ACTIVE PWM_OUTPUT_DISABLED
846
#endif
847
848
#ifndef USE_PWM5
849
#define USE_PWM5 1
850
#endif
851
#if USE_PWM5
852
#define PWM_SERVO_5 5
853
#define PWM_SERVO_5_GPIO GPIOA
854
#define PWM_SERVO_5_PIN GPIO15
855
#define PWM_SERVO_5_AF GPIO_AF1
856
#define PWM_SERVO_5_DRIVER PWMD2
857
#define PWM_SERVO_5_CHANNEL 0
858
#define PWM_SERVO_5_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
859
#else
860
#define PWM_SERVO_5_ACTIVE PWM_OUTPUT_DISABLED
861
#endif
862
863
#if USE_PWM6
864
#define PWM_SERVO_6 6
865
#define PWM_SERVO_6_GPIO GPIOB
866
#define PWM_SERVO_6_PIN GPIO1
867
#define PWM_SERVO_6_AF GPIO_AF2
868
#define PWM_SERVO_6_DRIVER PWMD3
869
#define PWM_SERVO_6_CHANNEL 3
870
#define PWM_SERVO_6_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
871
#else
872
#define PWM_SERVO_6_ACTIVE PWM_OUTPUT_DISABLED
873
#endif
874
875
876
#ifdef STM32_PWM_USE_TIM2
877
#define PWM_CONF_TIM2 STM32_PWM_USE_TIM2
878
#else
879
#define PWM_CONF_TIM2 1
880
#endif
881
#define PWM_CONF2_DEF { \
882
PWM_FREQUENCY, \
883
PWM_FREQUENCY/TIM2_SERVO_HZ, \
884
NULL, \
885
{ \
886
{ PWM_SERVO_5_ACTIVE, NULL }, \
887
{ PWM_SERVO_4_ACTIVE, NULL }, \
888
{ PWM_SERVO_1_ACTIVE, NULL }, \
889
{ PWM_OUTPUT_DISABLED, NULL }, \
890
}, \
891
0, \
892
0 \
893
}
894
895
#ifdef STM32_PWM_USE_TIM3
896
#define PWM_CONF_TIM3 STM32_PWM_USE_TIM3
897
#else
898
#define PWM_CONF_TIM3 1
899
#endif
900
#define PWM_CONF3_DEF { \
901
PWM_FREQUENCY, \
902
PWM_FREQUENCY/TIM3_SERVO_HZ, \
903
NULL, \
904
{ \
905
{ PWM_SERVO_3_ACTIVE, NULL }, \
906
{ PWM_SERVO_2_ACTIVE, NULL }, \
907
{ PWM_SERVO_0_ACTIVE, NULL }, \
908
{ PWM_SERVO_6_ACTIVE, NULL }, \
909
}, \
910
0, \
911
0 \
912
}
913
917
#define RC_PPM_TICKS_PER_USEC 2
918
#define PPM_TIMER_FREQUENCY 2000000
919
#define PPM_CHANNEL ICU_CHANNEL_1
920
#define PPM_TIMER ICUD1
921
922
/*
923
* PWM input TODO
924
*/
925
// PWM_INPUT 1 on PA8 (also PPM IN)
926
#define PWM_INPUT1_ICU ICUD1
927
#define PWM_INPUT1_CHANNEL ICU_CHANNEL_1
928
// PPM in (aka PA8) is used: not compatible with PPM RC receiver
929
#define PWM_INPUT1_GPIO_PORT GPIOA
930
#define PWM_INPUT1_GPIO_PIN GPIO8
931
#define PWM_INPUT1_GPIO_AF GPIO_AF1
932
933
// PWM_INPUT 2 on PA3 (also SERVO 1)
934
#if (USE_PWM1 && USE_PWM_INPUT2)
935
#error "PW1 and PWM_INPUT2 are not compatible"
936
#endif
937
#define PWM_INPUT2_ICU ICUD2
938
#define PWM_INPUT2_CHANNEL ICU_CHANNEL_1
939
#define PWM_INPUT2_GPIO_PORT GPIOA
940
#define PWM_INPUT2_GPIO_PIN GPIO2
941
#define PWM_INPUT2_GPIO_AF GPIO_AF3
942
943
947
#ifndef I2C1_CLOCK_SPEED
948
#define I2C1_CLOCK_SPEED 400000
949
#endif
950
#if I2C1_CLOCK_SPEED == 400000
951
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
952
#elif I2C1_CLOCK_SPEED == 100000
953
#define I2C1_DUTY_CYCLE STD_DUTY_CYCLE
954
#else
955
#error Invalid I2C1 clock speed
956
#endif
957
#define I2C1_CFG_DEF { \
958
OPMODE_I2C, \
959
I2C1_CLOCK_SPEED, \
960
I2C1_DUTY_CYCLE, \
961
}
962
963
#ifndef I2C2_CLOCK_SPEED
964
#define I2C2_CLOCK_SPEED 400000
965
#endif
966
#if I2C2_CLOCK_SPEED == 400000
967
#define I2C2_DUTY_CYCLE FAST_DUTY_CYCLE_2
968
#elif I2C2_CLOCK_SPEED == 100000
969
#define I2C2_DUTY_CYCLE STD_DUTY_CYCLE
970
#else
971
#error Invalid I2C2 clock speed
972
#endif
973
#define I2C2_CFG_DEF { \
974
OPMODE_I2C, \
975
I2C2_CLOCK_SPEED, \
976
I2C2_DUTY_CYCLE, \
977
}
978
986
// SPI1_SLAVE0 -> slave select pin for the L3GD20 (gyro)
987
#define SPI_SELECT_SLAVE0_PORT GPIOC
988
#define SPI_SELECT_SLAVE0_PIN GPIO13
989
// SPI1_SLAVE1 -> slave select pin for the LSM303D (accel/mag)
990
#define SPI_SELECT_SLAVE1_PORT GPIOC
991
#define SPI_SELECT_SLAVE1_PIN GPIO15
992
// SPI1_SLAVE3 -> slave select pin for the MS5611 baro
993
#define SPI_SELECT_SLAVE3_PORT GPIOD
994
#define SPI_SELECT_SLAVE3_PIN GPIO7
995
1002
#ifndef USE_BARO_BOARD
1003
#define USE_BARO_BOARD 1
1004
#endif
1005
1010
#define GPIOA_OTG_FS_VBUS 9
1011
1012
#define GPIOD_SDIO_CMD 2
1013
#define GPIOC_SDIO_D0 8
1014
#define GPIOC_SDIO_D1 9
1015
#define GPIOC_SDIO_D2 10
1016
#define GPIOC_SDIO_D3 11
1017
#define GPIOC_SDIO_CK 12
1018
1019
/*
1020
* Actuators for fixedwing
1021
*/
1022
/* Default actuators driver */
1023
#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_pwm.h"
1024
#define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
1025
#define ActuatorsDefaultInit() ActuatorsPwmInit()
1026
#define ActuatorsDefaultCommit() ActuatorsPwmCommit()
1027
1028
#if !defined(_FROM_ASM_)
1029
#ifdef __cplusplus
1030
extern
"C"
{
1031
#endif
1032
void
boardInit
(
void
);
1033
#ifdef __cplusplus
1034
}
1035
#endif
1036
#endif
/* _FROM_ASM_ */
1037
1038
#endif
/* _BOARD_H_ */
boardInit
void boardInit(void)
Board-specific initialization code.
Definition:
board.c:261
sw
airborne
boards
px4fmu
chibios
v2.4
board.h
Generated on Tue Feb 1 2022 13:51:13 for Paparazzi UAS by
1.8.17