Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
board.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006..2015 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
#pragma once
18
19
/*
20
* Board identifier.
21
*/
22
#define BOARD_TAWAKI
23
#define BOARD_NAME "Tawaki Autopilot"
24
25
/*
26
* Board oscillators-related settings.
27
*/
28
#if !defined(STM32_LSECLK)
29
#define STM32_LSECLK 32768U
30
#endif
31
32
#define STM32_LSEDRV (3U << 3U)
33
34
#if !defined(STM32_HSECLK)
35
#define STM32_HSECLK 16000000U
36
#endif
37
38
/*
39
* Board voltages.
40
* Required for performance limits calculation.
41
*/
42
#define STM32_VDD 300U
43
44
/*
45
* MCU type as defined in the ST header.
46
*/
47
#define STM32F777xx
48
49
/*
50
* IO pins assignments.
51
*/
52
#define AUX_A1 0U
53
#define AUX_A2 1U
54
#define AUX_A3 2U
55
#define AUX_A4 3U
56
#define PA04 4U
57
#define PA05 5U
58
#define AUX_B1 6U
59
#define AUX_B2 7U
60
#define PA08 8U
61
#define USB_VBUS 9U
62
#define LED2 10U
63
#define OTG_FS_DM 11U
64
#define OTG_FS_DP 12U
65
#define SWDIO 13U
66
#define SWCLK 14U
67
#define UART7_TX 15U
68
69
#define AUX_B3 0U
70
#define AUX_B4 1U
71
#define PB02 2U
72
#define UART7_RX 3U
73
#define PB04 4U
74
#define DSHOT_RX 5U
75
#define SRVB1 6U
76
#define SRVB2 7U
77
#define SRVB3 8U
78
#define SRVB4 9U
79
#define I2C2_SCL 10U
80
#define I2C2_SDA 11U
81
#define SPI2_EXTERNAL_CS 12U
82
#define PB13 13U
83
#define SPI2_EXTERNAL_MISO 14U
84
#define SPI2_EXTERNAL_MOSI 15U
85
86
#define VBAT_MEAS 0U
87
#define PC01 1U
88
#define PC02 2U
89
#define PC03 3U
90
#define PC04 4U
91
#define PC05 5U
92
#define RC2 6U
93
#define LED3 7U
94
#define SDMMC1_D0 8U
95
#define SDMMC1_D1 9U
96
#define SDMMC1_D2 10U
97
#define SDMMC1_D3 11U
98
#define SDMMC1_CK 12U
99
#define APSW 13U
100
#define OSC32_IN 14U
101
#define OSC32_OUT 15U
102
103
#define CAN_RX 0U
104
#define CAN_TX 1U
105
#define SDMMC1_CMD 2U
106
#define SPI2_EXTERNAL_CLK 3U
107
#define PD04 4U
108
#define UART2_TX 5U
109
#define UART2_RX 6U
110
#define PD07 7U
111
#define UART3_TX 8U
112
#define UART3_RX 9U
113
#define LED4 10U
114
#define PD11 11U
115
#define I2C4_SCL 12U
116
#define I2C4_SDA 13U
117
#define PD14 14U
118
#define LED1 15U
119
120
#define RC1 0U
121
#define PE01 1U
122
#define SPI4_INTERNAL_CLK 2U
123
#define PE03 3U
124
#define SPI4_INTERNAL_CS 4U
125
#define SPI4_INTERNAL_MISO 5U
126
#define SPI4_INTERNAL_MOSI 6U
127
#define PE07 7U
128
#define PE08 8U
129
#define SRVA1 9U
130
#define PE10 10U
131
#define SRVA2 11U
132
#define PE12 12U
133
#define SRVA3 13U
134
#define SRVA4 14U
135
#define PE15 15U
136
137
#define PF00 0U
138
#define PF01 1U
139
#define PF02 2U
140
#define PF03 3U
141
#define PF04 4U
142
#define PF05 5U
143
#define PF06 6U
144
#define PF07 7U
145
#define PF08 8U
146
#define PF09 9U
147
#define PF10 10U
148
#define PF11 11U
149
#define PF12 12U
150
#define PF13 13U
151
#define PF14 14U
152
#define PF15 15U
153
154
#define PG00 0U
155
#define PG01 1U
156
#define PG02 2U
157
#define PG03 3U
158
#define PG04 4U
159
#define PG05 5U
160
#define PG06 6U
161
#define PG07 7U
162
#define PG08 8U
163
#define PG09 9U
164
#define PG10 10U
165
#define PG11 11U
166
#define PG12 12U
167
#define PG13 13U
168
#define PG14 14U
169
#define PG15 15U
170
171
#define OSC_IN 0U
172
#define OSC_OUT 1U
173
#define PH02 2U
174
#define PH03 3U
175
#define PH04 4U
176
#define PH05 5U
177
#define PH06 6U
178
#define PH07 7U
179
#define PH08 8U
180
#define PH09 9U
181
#define PH10 10U
182
#define PH11 11U
183
#define PH12 12U
184
#define PH13 13U
185
#define PH14 14U
186
#define PH15 15U
187
188
#define PI00 0U
189
#define PI01 1U
190
#define PI02 2U
191
#define PI03 3U
192
#define PI04 4U
193
#define PI05 5U
194
#define PI06 6U
195
#define PI07 7U
196
#define PI08 8U
197
#define PI09 9U
198
#define PI10 10U
199
#define PI11 11U
200
#define PI12 12U
201
#define PI13 13U
202
#define PI14 14U
203
#define PI15 15U
204
205
#define PJ00 0U
206
#define PJ01 1U
207
#define PJ02 2U
208
#define PJ03 3U
209
#define PJ04 4U
210
#define PJ05 5U
211
#define PJ06 6U
212
#define PJ07 7U
213
#define PJ08 8U
214
#define PJ09 9U
215
#define PJ10 10U
216
#define PJ11 11U
217
#define PJ12 12U
218
#define PJ13 13U
219
#define PJ14 14U
220
#define PJ15 15U
221
222
#define PK00 0U
223
#define PK01 1U
224
#define PK02 2U
225
#define PK03 3U
226
#define PK04 4U
227
#define PK05 5U
228
#define PK06 6U
229
#define PK07 7U
230
#define PK08 8U
231
#define PK09 9U
232
#define PK10 10U
233
#define PK11 11U
234
#define PK12 12U
235
#define PK13 13U
236
#define PK14 14U
237
#define PK15 15U
238
239
/*
240
* IO lines assignments.
241
*/
242
#define LINE_AUX_A1 PAL_LINE(GPIOA, 0U)
243
#define LINE_AUX_A2 PAL_LINE(GPIOA, 1U)
244
#define LINE_AUX_A3 PAL_LINE(GPIOA, 2U)
245
#define LINE_AUX_A4 PAL_LINE(GPIOA, 3U)
246
#define LINE_AUX_B1 PAL_LINE(GPIOA, 6U)
247
#define LINE_AUX_B2 PAL_LINE(GPIOA, 7U)
248
#define LINE_USB_VBUS PAL_LINE(GPIOA, 9U)
249
#define LINE_LED2 PAL_LINE(GPIOA, 10U)
250
#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U)
251
#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U)
252
#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
253
#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
254
#define LINE_UART7_TX PAL_LINE(GPIOA, 15U)
255
256
#define LINE_AUX_B3 PAL_LINE(GPIOB, 0U)
257
#define LINE_AUX_B4 PAL_LINE(GPIOB, 1U)
258
#define LINE_UART7_RX PAL_LINE(GPIOB, 3U)
259
#define LINE_DSHOT_RX PAL_LINE(GPIOB, 5U)
260
#define LINE_SRVB1 PAL_LINE(GPIOB, 6U)
261
#define LINE_SRVB2 PAL_LINE(GPIOB, 7U)
262
#define LINE_SRVB3 PAL_LINE(GPIOB, 8U)
263
#define LINE_SRVB4 PAL_LINE(GPIOB, 9U)
264
#define LINE_I2C2_SCL PAL_LINE(GPIOB, 10U)
265
#define LINE_I2C2_SDA PAL_LINE(GPIOB, 11U)
266
#define LINE_SPI2_EXTERNAL_CS PAL_LINE(GPIOB, 12U)
267
#define LINE_SPI2_EXTERNAL_MISO PAL_LINE(GPIOB, 14U)
268
#define LINE_SPI2_EXTERNAL_MOSI PAL_LINE(GPIOB, 15U)
269
270
#define LINE_VBAT_MEAS PAL_LINE(GPIOC, 0U)
271
#define LINE_RC2 PAL_LINE(GPIOC, 6U)
272
#define LINE_LED3 PAL_LINE(GPIOC, 7U)
273
#define LINE_SDMMC1_D0 PAL_LINE(GPIOC, 8U)
274
#define LINE_SDMMC1_D1 PAL_LINE(GPIOC, 9U)
275
#define LINE_SDMMC1_D2 PAL_LINE(GPIOC, 10U)
276
#define LINE_SDMMC1_D3 PAL_LINE(GPIOC, 11U)
277
#define LINE_SDMMC1_CK PAL_LINE(GPIOC, 12U)
278
#define LINE_APSW PAL_LINE(GPIOC, 13U)
279
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
280
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
281
282
#define LINE_CAN_RX PAL_LINE(GPIOD, 0U)
283
#define LINE_CAN_TX PAL_LINE(GPIOD, 1U)
284
#define LINE_SDMMC1_CMD PAL_LINE(GPIOD, 2U)
285
#define LINE_SPI2_EXTERNAL_CLK PAL_LINE(GPIOD, 3U)
286
#define LINE_UART2_TX PAL_LINE(GPIOD, 5U)
287
#define LINE_UART2_RX PAL_LINE(GPIOD, 6U)
288
#define LINE_UART3_TX PAL_LINE(GPIOD, 8U)
289
#define LINE_UART3_RX PAL_LINE(GPIOD, 9U)
290
#define LINE_LED4 PAL_LINE(GPIOD, 10U)
291
#define LINE_I2C4_SCL PAL_LINE(GPIOD, 12U)
292
#define LINE_I2C4_SDA PAL_LINE(GPIOD, 13U)
293
#define LINE_LED1 PAL_LINE(GPIOD, 15U)
294
295
#define LINE_RC1 PAL_LINE(GPIOE, 0U)
296
#define LINE_SPI4_INTERNAL_CLK PAL_LINE(GPIOE, 2U)
297
#define LINE_SPI4_INTERNAL_CS PAL_LINE(GPIOE, 4U)
298
#define LINE_SPI4_INTERNAL_MISO PAL_LINE(GPIOE, 5U)
299
#define LINE_SPI4_INTERNAL_MOSI PAL_LINE(GPIOE, 6U)
300
#define LINE_SRVA1 PAL_LINE(GPIOE, 9U)
301
#define LINE_SRVA2 PAL_LINE(GPIOE, 11U)
302
#define LINE_SRVA3 PAL_LINE(GPIOE, 13U)
303
#define LINE_SRVA4 PAL_LINE(GPIOE, 14U)
304
305
#define LINE_OSC_IN PAL_LINE(GPIOH, 0U)
306
#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U)
307
308
309
/*
310
* I/O ports initial setup, this configuration is established soon after reset
311
* in the initialization code.
312
* Please refer to the STM32 Reference Manual for details.
313
*/
314
#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
315
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
316
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
317
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
318
#define PIN_ODR_LEVEL_LOW(n) (0U << (n))
319
#define PIN_ODR_LEVEL_HIGH(n) (1U << (n))
320
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
321
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
322
#define PIN_OSPEED_SPEED_VERYLOW(n) (0U << ((n) * 2U))
323
#define PIN_OSPEED_SPEED_LOW(n) (1U << ((n) * 2U))
324
#define PIN_OSPEED_SPEED_MEDIUM(n) (2U << ((n) * 2U))
325
#define PIN_OSPEED_SPEED_HIGH(n) (3U << ((n) * 2U))
326
#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
327
#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
328
#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
329
#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
330
331
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(AUX_A1) | \
332
PIN_MODE_INPUT(AUX_A2) | \
333
PIN_MODE_INPUT(AUX_A3) | \
334
PIN_MODE_INPUT(AUX_A4) | \
335
PIN_MODE_INPUT(PA04) | \
336
PIN_MODE_INPUT(PA05) | \
337
PIN_MODE_INPUT(AUX_B1) | \
338
PIN_MODE_INPUT(AUX_B2) | \
339
PIN_MODE_INPUT(PA08) | \
340
PIN_MODE_INPUT(USB_VBUS) | \
341
PIN_MODE_OUTPUT(LED2) | \
342
PIN_MODE_ALTERNATE(OTG_FS_DM) | \
343
PIN_MODE_ALTERNATE(OTG_FS_DP) | \
344
PIN_MODE_ALTERNATE(SWDIO) | \
345
PIN_MODE_ALTERNATE(SWCLK) | \
346
PIN_MODE_ALTERNATE(UART7_TX))
347
348
#define VAL_GPIOA_OTYPER (PIN_OTYPE_OPENDRAIN(AUX_A1) | \
349
PIN_OTYPE_OPENDRAIN(AUX_A2) | \
350
PIN_OTYPE_OPENDRAIN(AUX_A3) | \
351
PIN_OTYPE_OPENDRAIN(AUX_A4) | \
352
PIN_OTYPE_PUSHPULL(PA04) | \
353
PIN_OTYPE_PUSHPULL(PA05) | \
354
PIN_OTYPE_OPENDRAIN(AUX_B1) | \
355
PIN_OTYPE_OPENDRAIN(AUX_B2) | \
356
PIN_OTYPE_PUSHPULL(PA08) | \
357
PIN_OTYPE_OPENDRAIN(USB_VBUS) | \
358
PIN_OTYPE_PUSHPULL(LED2) | \
359
PIN_OTYPE_PUSHPULL(OTG_FS_DM) | \
360
PIN_OTYPE_PUSHPULL(OTG_FS_DP) | \
361
PIN_OTYPE_PUSHPULL(SWDIO) | \
362
PIN_OTYPE_PUSHPULL(SWCLK) | \
363
PIN_OTYPE_PUSHPULL(UART7_TX))
364
365
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(AUX_A1) | \
366
PIN_OSPEED_SPEED_VERYLOW(AUX_A2) | \
367
PIN_OSPEED_SPEED_VERYLOW(AUX_A3) | \
368
PIN_OSPEED_SPEED_VERYLOW(AUX_A4) | \
369
PIN_OSPEED_SPEED_VERYLOW(PA04) | \
370
PIN_OSPEED_SPEED_VERYLOW(PA05) | \
371
PIN_OSPEED_SPEED_VERYLOW(AUX_B1) | \
372
PIN_OSPEED_SPEED_VERYLOW(AUX_B2) | \
373
PIN_OSPEED_SPEED_VERYLOW(PA08) | \
374
PIN_OSPEED_SPEED_VERYLOW(USB_VBUS) | \
375
PIN_OSPEED_SPEED_VERYLOW(LED2) | \
376
PIN_OSPEED_SPEED_HIGH(OTG_FS_DM) | \
377
PIN_OSPEED_SPEED_HIGH(OTG_FS_DP) | \
378
PIN_OSPEED_SPEED_HIGH(SWDIO) | \
379
PIN_OSPEED_SPEED_HIGH(SWCLK) | \
380
PIN_OSPEED_SPEED_HIGH(UART7_TX))
381
382
#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLDOWN(AUX_A1) | \
383
PIN_PUPDR_PULLDOWN(AUX_A2) | \
384
PIN_PUPDR_PULLDOWN(AUX_A3) | \
385
PIN_PUPDR_PULLDOWN(AUX_A4) | \
386
PIN_PUPDR_PULLDOWN(PA04) | \
387
PIN_PUPDR_PULLDOWN(PA05) | \
388
PIN_PUPDR_PULLDOWN(AUX_B1) | \
389
PIN_PUPDR_PULLDOWN(AUX_B2) | \
390
PIN_PUPDR_PULLDOWN(PA08) | \
391
PIN_PUPDR_PULLDOWN(USB_VBUS) | \
392
PIN_PUPDR_FLOATING(LED2) | \
393
PIN_PUPDR_FLOATING(OTG_FS_DM) | \
394
PIN_PUPDR_FLOATING(OTG_FS_DP) | \
395
PIN_PUPDR_FLOATING(SWDIO) | \
396
PIN_PUPDR_FLOATING(SWCLK) | \
397
PIN_PUPDR_FLOATING(UART7_TX))
398
399
#define VAL_GPIOA_ODR (PIN_ODR_LEVEL_HIGH(AUX_A1) | \
400
PIN_ODR_LEVEL_HIGH(AUX_A2) | \
401
PIN_ODR_LEVEL_HIGH(AUX_A3) | \
402
PIN_ODR_LEVEL_HIGH(AUX_A4) | \
403
PIN_ODR_LEVEL_LOW(PA04) | \
404
PIN_ODR_LEVEL_LOW(PA05) | \
405
PIN_ODR_LEVEL_HIGH(AUX_B1) | \
406
PIN_ODR_LEVEL_HIGH(AUX_B2) | \
407
PIN_ODR_LEVEL_LOW(PA08) | \
408
PIN_ODR_LEVEL_LOW(USB_VBUS) | \
409
PIN_ODR_LEVEL_LOW(LED2) | \
410
PIN_ODR_LEVEL_HIGH(OTG_FS_DM) | \
411
PIN_ODR_LEVEL_HIGH(OTG_FS_DP) | \
412
PIN_ODR_LEVEL_HIGH(SWDIO) | \
413
PIN_ODR_LEVEL_HIGH(SWCLK) | \
414
PIN_ODR_LEVEL_HIGH(UART7_TX))
415
416
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(AUX_A1, 0) | \
417
PIN_AFIO_AF(AUX_A2, 0) | \
418
PIN_AFIO_AF(AUX_A3, 0) | \
419
PIN_AFIO_AF(AUX_A4, 0) | \
420
PIN_AFIO_AF(PA04, 0) | \
421
PIN_AFIO_AF(PA05, 0) | \
422
PIN_AFIO_AF(AUX_B1, 0) | \
423
PIN_AFIO_AF(AUX_B2, 0))
424
425
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(PA08, 0) | \
426
PIN_AFIO_AF(USB_VBUS, 0) | \
427
PIN_AFIO_AF(LED2, 0) | \
428
PIN_AFIO_AF(OTG_FS_DM, 10) | \
429
PIN_AFIO_AF(OTG_FS_DP, 10) | \
430
PIN_AFIO_AF(SWDIO, 0) | \
431
PIN_AFIO_AF(SWCLK, 0) | \
432
PIN_AFIO_AF(UART7_TX, 12))
433
434
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(AUX_B3) | \
435
PIN_MODE_INPUT(AUX_B4) | \
436
PIN_MODE_INPUT(PB02) | \
437
PIN_MODE_ALTERNATE(UART7_RX) | \
438
PIN_MODE_INPUT(PB04) | \
439
PIN_MODE_ALTERNATE(DSHOT_RX) | \
440
PIN_MODE_ALTERNATE(SRVB1) | \
441
PIN_MODE_ALTERNATE(SRVB2) | \
442
PIN_MODE_ALTERNATE(SRVB3) | \
443
PIN_MODE_ALTERNATE(SRVB4) | \
444
PIN_MODE_ALTERNATE(I2C2_SCL) | \
445
PIN_MODE_ALTERNATE(I2C2_SDA) | \
446
PIN_MODE_OUTPUT(SPI2_EXTERNAL_CS) | \
447
PIN_MODE_INPUT(PB13) | \
448
PIN_MODE_ALTERNATE(SPI2_EXTERNAL_MISO) | \
449
PIN_MODE_ALTERNATE(SPI2_EXTERNAL_MOSI))
450
451
#define VAL_GPIOB_OTYPER (PIN_OTYPE_OPENDRAIN(AUX_B3) | \
452
PIN_OTYPE_OPENDRAIN(AUX_B4) | \
453
PIN_OTYPE_PUSHPULL(PB02) | \
454
PIN_OTYPE_PUSHPULL(UART7_RX) | \
455
PIN_OTYPE_PUSHPULL(PB04) | \
456
PIN_OTYPE_PUSHPULL(DSHOT_RX) | \
457
PIN_OTYPE_PUSHPULL(SRVB1) | \
458
PIN_OTYPE_PUSHPULL(SRVB2) | \
459
PIN_OTYPE_PUSHPULL(SRVB3) | \
460
PIN_OTYPE_PUSHPULL(SRVB4) | \
461
PIN_OTYPE_OPENDRAIN(I2C2_SCL) | \
462
PIN_OTYPE_OPENDRAIN(I2C2_SDA) | \
463
PIN_OTYPE_PUSHPULL(SPI2_EXTERNAL_CS) | \
464
PIN_OTYPE_PUSHPULL(PB13) | \
465
PIN_OTYPE_PUSHPULL(SPI2_EXTERNAL_MISO) | \
466
PIN_OTYPE_PUSHPULL(SPI2_EXTERNAL_MOSI))
467
468
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(AUX_B3) | \
469
PIN_OSPEED_SPEED_VERYLOW(AUX_B4) | \
470
PIN_OSPEED_SPEED_VERYLOW(PB02) | \
471
PIN_OSPEED_SPEED_HIGH(UART7_RX) | \
472
PIN_OSPEED_SPEED_VERYLOW(PB04) | \
473
PIN_OSPEED_SPEED_HIGH(DSHOT_RX) | \
474
PIN_OSPEED_SPEED_HIGH(SRVB1) | \
475
PIN_OSPEED_SPEED_HIGH(SRVB2) | \
476
PIN_OSPEED_SPEED_HIGH(SRVB3) | \
477
PIN_OSPEED_SPEED_HIGH(SRVB4) | \
478
PIN_OSPEED_SPEED_HIGH(I2C2_SCL) | \
479
PIN_OSPEED_SPEED_HIGH(I2C2_SDA) | \
480
PIN_OSPEED_SPEED_HIGH(SPI2_EXTERNAL_CS) | \
481
PIN_OSPEED_SPEED_VERYLOW(PB13) | \
482
PIN_OSPEED_SPEED_HIGH(SPI2_EXTERNAL_MISO) | \
483
PIN_OSPEED_SPEED_HIGH(SPI2_EXTERNAL_MOSI))
484
485
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLDOWN(AUX_B3) | \
486
PIN_PUPDR_PULLDOWN(AUX_B4) | \
487
PIN_PUPDR_PULLDOWN(PB02) | \
488
PIN_PUPDR_FLOATING(UART7_RX) | \
489
PIN_PUPDR_PULLDOWN(PB04) | \
490
PIN_PUPDR_FLOATING(DSHOT_RX) | \
491
PIN_PUPDR_FLOATING(SRVB1) | \
492
PIN_PUPDR_FLOATING(SRVB2) | \
493
PIN_PUPDR_FLOATING(SRVB3) | \
494
PIN_PUPDR_FLOATING(SRVB4) | \
495
PIN_PUPDR_PULLUP(I2C2_SCL) | \
496
PIN_PUPDR_PULLUP(I2C2_SDA) | \
497
PIN_PUPDR_FLOATING(SPI2_EXTERNAL_CS) | \
498
PIN_PUPDR_PULLDOWN(PB13) | \
499
PIN_PUPDR_FLOATING(SPI2_EXTERNAL_MISO) | \
500
PIN_PUPDR_FLOATING(SPI2_EXTERNAL_MOSI))
501
502
#define VAL_GPIOB_ODR (PIN_ODR_LEVEL_HIGH(AUX_B3) | \
503
PIN_ODR_LEVEL_HIGH(AUX_B4) | \
504
PIN_ODR_LEVEL_LOW(PB02) | \
505
PIN_ODR_LEVEL_HIGH(UART7_RX) | \
506
PIN_ODR_LEVEL_LOW(PB04) | \
507
PIN_ODR_LEVEL_HIGH(DSHOT_RX) | \
508
PIN_ODR_LEVEL_LOW(SRVB1) | \
509
PIN_ODR_LEVEL_LOW(SRVB2) | \
510
PIN_ODR_LEVEL_LOW(SRVB3) | \
511
PIN_ODR_LEVEL_LOW(SRVB4) | \
512
PIN_ODR_LEVEL_HIGH(I2C2_SCL) | \
513
PIN_ODR_LEVEL_HIGH(I2C2_SDA) | \
514
PIN_ODR_LEVEL_HIGH(SPI2_EXTERNAL_CS) | \
515
PIN_ODR_LEVEL_LOW(PB13) | \
516
PIN_ODR_LEVEL_HIGH(SPI2_EXTERNAL_MISO) | \
517
PIN_ODR_LEVEL_HIGH(SPI2_EXTERNAL_MOSI))
518
519
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(AUX_B3, 0) | \
520
PIN_AFIO_AF(AUX_B4, 0) | \
521
PIN_AFIO_AF(PB02, 0) | \
522
PIN_AFIO_AF(UART7_RX, 12) | \
523
PIN_AFIO_AF(PB04, 0) | \
524
PIN_AFIO_AF(DSHOT_RX, 1) | \
525
PIN_AFIO_AF(SRVB1, 2) | \
526
PIN_AFIO_AF(SRVB2, 2))
527
528
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(SRVB3, 2) | \
529
PIN_AFIO_AF(SRVB4, 2) | \
530
PIN_AFIO_AF(I2C2_SCL, 4) | \
531
PIN_AFIO_AF(I2C2_SDA, 4) | \
532
PIN_AFIO_AF(SPI2_EXTERNAL_CS, 0) | \
533
PIN_AFIO_AF(PB13, 0) | \
534
PIN_AFIO_AF(SPI2_EXTERNAL_MISO, 5) | \
535
PIN_AFIO_AF(SPI2_EXTERNAL_MOSI, 5))
536
537
#define VAL_GPIOC_MODER (PIN_MODE_ANALOG(VBAT_MEAS) | \
538
PIN_MODE_INPUT(PC01) | \
539
PIN_MODE_INPUT(PC02) | \
540
PIN_MODE_INPUT(PC03) | \
541
PIN_MODE_INPUT(PC04) | \
542
PIN_MODE_INPUT(PC05) | \
543
PIN_MODE_INPUT(RC2) | \
544
PIN_MODE_OUTPUT(LED3) | \
545
PIN_MODE_ALTERNATE(SDMMC1_D0) | \
546
PIN_MODE_ALTERNATE(SDMMC1_D1) | \
547
PIN_MODE_ALTERNATE(SDMMC1_D2) | \
548
PIN_MODE_ALTERNATE(SDMMC1_D3) | \
549
PIN_MODE_ALTERNATE(SDMMC1_CK) | \
550
PIN_MODE_OUTPUT(APSW) | \
551
PIN_MODE_ALTERNATE(OSC32_IN) | \
552
PIN_MODE_ALTERNATE(OSC32_OUT))
553
554
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(VBAT_MEAS) | \
555
PIN_OTYPE_PUSHPULL(PC01) | \
556
PIN_OTYPE_PUSHPULL(PC02) | \
557
PIN_OTYPE_PUSHPULL(PC03) | \
558
PIN_OTYPE_PUSHPULL(PC04) | \
559
PIN_OTYPE_PUSHPULL(PC05) | \
560
PIN_OTYPE_OPENDRAIN(RC2) | \
561
PIN_OTYPE_PUSHPULL(LED3) | \
562
PIN_OTYPE_PUSHPULL(SDMMC1_D0) | \
563
PIN_OTYPE_PUSHPULL(SDMMC1_D1) | \
564
PIN_OTYPE_PUSHPULL(SDMMC1_D2) | \
565
PIN_OTYPE_PUSHPULL(SDMMC1_D3) | \
566
PIN_OTYPE_PUSHPULL(SDMMC1_CK) | \
567
PIN_OTYPE_PUSHPULL(APSW) | \
568
PIN_OTYPE_PUSHPULL(OSC32_IN) | \
569
PIN_OTYPE_PUSHPULL(OSC32_OUT))
570
571
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(VBAT_MEAS) | \
572
PIN_OSPEED_SPEED_VERYLOW(PC01) | \
573
PIN_OSPEED_SPEED_VERYLOW(PC02) | \
574
PIN_OSPEED_SPEED_VERYLOW(PC03) | \
575
PIN_OSPEED_SPEED_VERYLOW(PC04) | \
576
PIN_OSPEED_SPEED_VERYLOW(PC05) | \
577
PIN_OSPEED_SPEED_VERYLOW(RC2) | \
578
PIN_OSPEED_SPEED_VERYLOW(LED3) | \
579
PIN_OSPEED_SPEED_HIGH(SDMMC1_D0) | \
580
PIN_OSPEED_SPEED_HIGH(SDMMC1_D1) | \
581
PIN_OSPEED_SPEED_HIGH(SDMMC1_D2) | \
582
PIN_OSPEED_SPEED_HIGH(SDMMC1_D3) | \
583
PIN_OSPEED_SPEED_HIGH(SDMMC1_CK) | \
584
PIN_OSPEED_SPEED_VERYLOW(APSW) | \
585
PIN_OSPEED_SPEED_HIGH(OSC32_IN) | \
586
PIN_OSPEED_SPEED_HIGH(OSC32_OUT))
587
588
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(VBAT_MEAS) | \
589
PIN_PUPDR_PULLDOWN(PC01) | \
590
PIN_PUPDR_PULLDOWN(PC02) | \
591
PIN_PUPDR_PULLDOWN(PC03) | \
592
PIN_PUPDR_PULLDOWN(PC04) | \
593
PIN_PUPDR_PULLDOWN(PC05) | \
594
PIN_PUPDR_PULLDOWN(RC2) | \
595
PIN_PUPDR_FLOATING(LED3) | \
596
PIN_PUPDR_PULLUP(SDMMC1_D0) | \
597
PIN_PUPDR_PULLUP(SDMMC1_D1) | \
598
PIN_PUPDR_PULLUP(SDMMC1_D2) | \
599
PIN_PUPDR_PULLUP(SDMMC1_D3) | \
600
PIN_PUPDR_PULLUP(SDMMC1_CK) | \
601
PIN_PUPDR_FLOATING(APSW) | \
602
PIN_PUPDR_FLOATING(OSC32_IN) | \
603
PIN_PUPDR_FLOATING(OSC32_OUT))
604
605
#define VAL_GPIOC_ODR (PIN_ODR_LEVEL_LOW(VBAT_MEAS) | \
606
PIN_ODR_LEVEL_LOW(PC01) | \
607
PIN_ODR_LEVEL_LOW(PC02) | \
608
PIN_ODR_LEVEL_LOW(PC03) | \
609
PIN_ODR_LEVEL_LOW(PC04) | \
610
PIN_ODR_LEVEL_LOW(PC05) | \
611
PIN_ODR_LEVEL_HIGH(RC2) | \
612
PIN_ODR_LEVEL_LOW(LED3) | \
613
PIN_ODR_LEVEL_HIGH(SDMMC1_D0) | \
614
PIN_ODR_LEVEL_HIGH(SDMMC1_D1) | \
615
PIN_ODR_LEVEL_HIGH(SDMMC1_D2) | \
616
PIN_ODR_LEVEL_HIGH(SDMMC1_D3) | \
617
PIN_ODR_LEVEL_HIGH(SDMMC1_CK) | \
618
PIN_ODR_LEVEL_HIGH(APSW) | \
619
PIN_ODR_LEVEL_HIGH(OSC32_IN) | \
620
PIN_ODR_LEVEL_HIGH(OSC32_OUT))
621
622
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(VBAT_MEAS, 0) | \
623
PIN_AFIO_AF(PC01, 0) | \
624
PIN_AFIO_AF(PC02, 0) | \
625
PIN_AFIO_AF(PC03, 0) | \
626
PIN_AFIO_AF(PC04, 0) | \
627
PIN_AFIO_AF(PC05, 0) | \
628
PIN_AFIO_AF(RC2, 0) | \
629
PIN_AFIO_AF(LED3, 0))
630
631
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(SDMMC1_D0, 12) | \
632
PIN_AFIO_AF(SDMMC1_D1, 12) | \
633
PIN_AFIO_AF(SDMMC1_D2, 12) | \
634
PIN_AFIO_AF(SDMMC1_D3, 12) | \
635
PIN_AFIO_AF(SDMMC1_CK, 12) | \
636
PIN_AFIO_AF(APSW, 0) | \
637
PIN_AFIO_AF(OSC32_IN, 0) | \
638
PIN_AFIO_AF(OSC32_OUT, 0))
639
640
#define VAL_GPIOD_MODER (PIN_MODE_ALTERNATE(CAN_RX) | \
641
PIN_MODE_ALTERNATE(CAN_TX) | \
642
PIN_MODE_ALTERNATE(SDMMC1_CMD) | \
643
PIN_MODE_ALTERNATE(SPI2_EXTERNAL_CLK) | \
644
PIN_MODE_INPUT(PD04) | \
645
PIN_MODE_ALTERNATE(UART2_TX) | \
646
PIN_MODE_ALTERNATE(UART2_RX) | \
647
PIN_MODE_INPUT(PD07) | \
648
PIN_MODE_ALTERNATE(UART3_TX) | \
649
PIN_MODE_ALTERNATE(UART3_RX) | \
650
PIN_MODE_OUTPUT(LED4) | \
651
PIN_MODE_INPUT(PD11) | \
652
PIN_MODE_ALTERNATE(I2C4_SCL) | \
653
PIN_MODE_ALTERNATE(I2C4_SDA) | \
654
PIN_MODE_INPUT(PD14) | \
655
PIN_MODE_OUTPUT(LED1))
656
657
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(CAN_RX) | \
658
PIN_OTYPE_PUSHPULL(CAN_TX) | \
659
PIN_OTYPE_PUSHPULL(SDMMC1_CMD) | \
660
PIN_OTYPE_PUSHPULL(SPI2_EXTERNAL_CLK) | \
661
PIN_OTYPE_PUSHPULL(PD04) | \
662
PIN_OTYPE_PUSHPULL(UART2_TX) | \
663
PIN_OTYPE_PUSHPULL(UART2_RX) | \
664
PIN_OTYPE_PUSHPULL(PD07) | \
665
PIN_OTYPE_PUSHPULL(UART3_TX) | \
666
PIN_OTYPE_PUSHPULL(UART3_RX) | \
667
PIN_OTYPE_PUSHPULL(LED4) | \
668
PIN_OTYPE_PUSHPULL(PD11) | \
669
PIN_OTYPE_OPENDRAIN(I2C4_SCL) | \
670
PIN_OTYPE_OPENDRAIN(I2C4_SDA) | \
671
PIN_OTYPE_PUSHPULL(PD14) | \
672
PIN_OTYPE_PUSHPULL(LED1))
673
674
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_SPEED_HIGH(CAN_RX) | \
675
PIN_OSPEED_SPEED_HIGH(CAN_TX) | \
676
PIN_OSPEED_SPEED_HIGH(SDMMC1_CMD) | \
677
PIN_OSPEED_SPEED_HIGH(SPI2_EXTERNAL_CLK) | \
678
PIN_OSPEED_SPEED_VERYLOW(PD04) | \
679
PIN_OSPEED_SPEED_HIGH(UART2_TX) | \
680
PIN_OSPEED_SPEED_HIGH(UART2_RX) | \
681
PIN_OSPEED_SPEED_VERYLOW(PD07) | \
682
PIN_OSPEED_SPEED_HIGH(UART3_TX) | \
683
PIN_OSPEED_SPEED_HIGH(UART3_RX) | \
684
PIN_OSPEED_SPEED_VERYLOW(LED4) | \
685
PIN_OSPEED_SPEED_VERYLOW(PD11) | \
686
PIN_OSPEED_SPEED_HIGH(I2C4_SCL) | \
687
PIN_OSPEED_SPEED_HIGH(I2C4_SDA) | \
688
PIN_OSPEED_SPEED_VERYLOW(PD14) | \
689
PIN_OSPEED_SPEED_VERYLOW(LED1))
690
691
#define VAL_GPIOD_PUPDR (PIN_PUPDR_FLOATING(CAN_RX) | \
692
PIN_PUPDR_FLOATING(CAN_TX) | \
693
PIN_PUPDR_PULLUP(SDMMC1_CMD) | \
694
PIN_PUPDR_FLOATING(SPI2_EXTERNAL_CLK) | \
695
PIN_PUPDR_PULLDOWN(PD04) | \
696
PIN_PUPDR_FLOATING(UART2_TX) | \
697
PIN_PUPDR_FLOATING(UART2_RX) | \
698
PIN_PUPDR_PULLDOWN(PD07) | \
699
PIN_PUPDR_FLOATING(UART3_TX) | \
700
PIN_PUPDR_FLOATING(UART3_RX) | \
701
PIN_PUPDR_FLOATING(LED4) | \
702
PIN_PUPDR_PULLDOWN(PD11) | \
703
PIN_PUPDR_PULLUP(I2C4_SCL) | \
704
PIN_PUPDR_PULLUP(I2C4_SDA) | \
705
PIN_PUPDR_PULLDOWN(PD14) | \
706
PIN_PUPDR_FLOATING(LED1))
707
708
#define VAL_GPIOD_ODR (PIN_ODR_LEVEL_HIGH(CAN_RX) | \
709
PIN_ODR_LEVEL_HIGH(CAN_TX) | \
710
PIN_ODR_LEVEL_HIGH(SDMMC1_CMD) | \
711
PIN_ODR_LEVEL_HIGH(SPI2_EXTERNAL_CLK) | \
712
PIN_ODR_LEVEL_LOW(PD04) | \
713
PIN_ODR_LEVEL_HIGH(UART2_TX) | \
714
PIN_ODR_LEVEL_HIGH(UART2_RX) | \
715
PIN_ODR_LEVEL_LOW(PD07) | \
716
PIN_ODR_LEVEL_HIGH(UART3_TX) | \
717
PIN_ODR_LEVEL_HIGH(UART3_RX) | \
718
PIN_ODR_LEVEL_LOW(LED4) | \
719
PIN_ODR_LEVEL_LOW(PD11) | \
720
PIN_ODR_LEVEL_HIGH(I2C4_SCL) | \
721
PIN_ODR_LEVEL_HIGH(I2C4_SDA) | \
722
PIN_ODR_LEVEL_LOW(PD14) | \
723
PIN_ODR_LEVEL_LOW(LED1))
724
725
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(CAN_RX, 9) | \
726
PIN_AFIO_AF(CAN_TX, 9) | \
727
PIN_AFIO_AF(SDMMC1_CMD, 12) | \
728
PIN_AFIO_AF(SPI2_EXTERNAL_CLK, 5) | \
729
PIN_AFIO_AF(PD04, 0) | \
730
PIN_AFIO_AF(UART2_TX, 7) | \
731
PIN_AFIO_AF(UART2_RX, 7) | \
732
PIN_AFIO_AF(PD07, 0))
733
734
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(UART3_TX, 7) | \
735
PIN_AFIO_AF(UART3_RX, 7) | \
736
PIN_AFIO_AF(LED4, 0) | \
737
PIN_AFIO_AF(PD11, 0) | \
738
PIN_AFIO_AF(I2C4_SCL, 4) | \
739
PIN_AFIO_AF(I2C4_SDA, 4) | \
740
PIN_AFIO_AF(PD14, 0) | \
741
PIN_AFIO_AF(LED1, 0))
742
743
#define VAL_GPIOE_MODER (PIN_MODE_ALTERNATE(RC1) | \
744
PIN_MODE_INPUT(PE01) | \
745
PIN_MODE_ALTERNATE(SPI4_INTERNAL_CLK) | \
746
PIN_MODE_INPUT(PE03) | \
747
PIN_MODE_OUTPUT(SPI4_INTERNAL_CS) | \
748
PIN_MODE_ALTERNATE(SPI4_INTERNAL_MISO) | \
749
PIN_MODE_ALTERNATE(SPI4_INTERNAL_MOSI) | \
750
PIN_MODE_INPUT(PE07) | \
751
PIN_MODE_INPUT(PE08) | \
752
PIN_MODE_ALTERNATE(SRVA1) | \
753
PIN_MODE_INPUT(PE10) | \
754
PIN_MODE_ALTERNATE(SRVA2) | \
755
PIN_MODE_INPUT(PE12) | \
756
PIN_MODE_ALTERNATE(SRVA3) | \
757
PIN_MODE_ALTERNATE(SRVA4) | \
758
PIN_MODE_INPUT(PE15))
759
760
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(RC1) | \
761
PIN_OTYPE_PUSHPULL(PE01) | \
762
PIN_OTYPE_PUSHPULL(SPI4_INTERNAL_CLK) | \
763
PIN_OTYPE_PUSHPULL(PE03) | \
764
PIN_OTYPE_PUSHPULL(SPI4_INTERNAL_CS) | \
765
PIN_OTYPE_PUSHPULL(SPI4_INTERNAL_MISO) | \
766
PIN_OTYPE_PUSHPULL(SPI4_INTERNAL_MOSI) | \
767
PIN_OTYPE_PUSHPULL(PE07) | \
768
PIN_OTYPE_PUSHPULL(PE08) | \
769
PIN_OTYPE_PUSHPULL(SRVA1) | \
770
PIN_OTYPE_PUSHPULL(PE10) | \
771
PIN_OTYPE_PUSHPULL(SRVA2) | \
772
PIN_OTYPE_PUSHPULL(PE12) | \
773
PIN_OTYPE_PUSHPULL(SRVA3) | \
774
PIN_OTYPE_PUSHPULL(SRVA4) | \
775
PIN_OTYPE_PUSHPULL(PE15))
776
777
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_SPEED_HIGH(RC1) | \
778
PIN_OSPEED_SPEED_VERYLOW(PE01) | \
779
PIN_OSPEED_SPEED_HIGH(SPI4_INTERNAL_CLK) | \
780
PIN_OSPEED_SPEED_VERYLOW(PE03) | \
781
PIN_OSPEED_SPEED_HIGH(SPI4_INTERNAL_CS) | \
782
PIN_OSPEED_SPEED_HIGH(SPI4_INTERNAL_MISO) | \
783
PIN_OSPEED_SPEED_HIGH(SPI4_INTERNAL_MOSI) | \
784
PIN_OSPEED_SPEED_VERYLOW(PE07) | \
785
PIN_OSPEED_SPEED_VERYLOW(PE08) | \
786
PIN_OSPEED_SPEED_HIGH(SRVA1) | \
787
PIN_OSPEED_SPEED_VERYLOW(PE10) | \
788
PIN_OSPEED_SPEED_HIGH(SRVA2) | \
789
PIN_OSPEED_SPEED_VERYLOW(PE12) | \
790
PIN_OSPEED_SPEED_HIGH(SRVA3) | \
791
PIN_OSPEED_SPEED_HIGH(SRVA4) | \
792
PIN_OSPEED_SPEED_VERYLOW(PE15))
793
794
#define VAL_GPIOE_PUPDR (PIN_PUPDR_FLOATING(RC1) | \
795
PIN_PUPDR_PULLDOWN(PE01) | \
796
PIN_PUPDR_FLOATING(SPI4_INTERNAL_CLK) | \
797
PIN_PUPDR_PULLDOWN(PE03) | \
798
PIN_PUPDR_FLOATING(SPI4_INTERNAL_CS) | \
799
PIN_PUPDR_FLOATING(SPI4_INTERNAL_MISO) | \
800
PIN_PUPDR_FLOATING(SPI4_INTERNAL_MOSI) | \
801
PIN_PUPDR_PULLDOWN(PE07) | \
802
PIN_PUPDR_PULLDOWN(PE08) | \
803
PIN_PUPDR_FLOATING(SRVA1) | \
804
PIN_PUPDR_PULLDOWN(PE10) | \
805
PIN_PUPDR_FLOATING(SRVA2) | \
806
PIN_PUPDR_PULLDOWN(PE12) | \
807
PIN_PUPDR_FLOATING(SRVA3) | \
808
PIN_PUPDR_FLOATING(SRVA4) | \
809
PIN_PUPDR_PULLDOWN(PE15))
810
811
#define VAL_GPIOE_ODR (PIN_ODR_LEVEL_HIGH(RC1) | \
812
PIN_ODR_LEVEL_LOW(PE01) | \
813
PIN_ODR_LEVEL_HIGH(SPI4_INTERNAL_CLK) | \
814
PIN_ODR_LEVEL_LOW(PE03) | \
815
PIN_ODR_LEVEL_HIGH(SPI4_INTERNAL_CS) | \
816
PIN_ODR_LEVEL_HIGH(SPI4_INTERNAL_MISO) | \
817
PIN_ODR_LEVEL_HIGH(SPI4_INTERNAL_MOSI) | \
818
PIN_ODR_LEVEL_LOW(PE07) | \
819
PIN_ODR_LEVEL_LOW(PE08) | \
820
PIN_ODR_LEVEL_LOW(SRVA1) | \
821
PIN_ODR_LEVEL_LOW(PE10) | \
822
PIN_ODR_LEVEL_LOW(SRVA2) | \
823
PIN_ODR_LEVEL_LOW(PE12) | \
824
PIN_ODR_LEVEL_LOW(SRVA3) | \
825
PIN_ODR_LEVEL_LOW(SRVA4) | \
826
PIN_ODR_LEVEL_LOW(PE15))
827
828
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(RC1, 8) | \
829
PIN_AFIO_AF(PE01, 0) | \
830
PIN_AFIO_AF(SPI4_INTERNAL_CLK, 5) | \
831
PIN_AFIO_AF(PE03, 0) | \
832
PIN_AFIO_AF(SPI4_INTERNAL_CS, 0) | \
833
PIN_AFIO_AF(SPI4_INTERNAL_MISO, 5) | \
834
PIN_AFIO_AF(SPI4_INTERNAL_MOSI, 5) | \
835
PIN_AFIO_AF(PE07, 0))
836
837
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(PE08, 0) | \
838
PIN_AFIO_AF(SRVA1, 1) | \
839
PIN_AFIO_AF(PE10, 0) | \
840
PIN_AFIO_AF(SRVA2, 1) | \
841
PIN_AFIO_AF(PE12, 0) | \
842
PIN_AFIO_AF(SRVA3, 1) | \
843
PIN_AFIO_AF(SRVA4, 1) | \
844
PIN_AFIO_AF(PE15, 0))
845
846
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(PF00) | \
847
PIN_MODE_INPUT(PF01) | \
848
PIN_MODE_INPUT(PF02) | \
849
PIN_MODE_INPUT(PF03) | \
850
PIN_MODE_INPUT(PF04) | \
851
PIN_MODE_INPUT(PF05) | \
852
PIN_MODE_INPUT(PF06) | \
853
PIN_MODE_INPUT(PF07) | \
854
PIN_MODE_INPUT(PF08) | \
855
PIN_MODE_INPUT(PF09) | \
856
PIN_MODE_INPUT(PF10) | \
857
PIN_MODE_INPUT(PF11) | \
858
PIN_MODE_INPUT(PF12) | \
859
PIN_MODE_INPUT(PF13) | \
860
PIN_MODE_INPUT(PF14) | \
861
PIN_MODE_INPUT(PF15))
862
863
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(PF00) | \
864
PIN_OTYPE_PUSHPULL(PF01) | \
865
PIN_OTYPE_PUSHPULL(PF02) | \
866
PIN_OTYPE_PUSHPULL(PF03) | \
867
PIN_OTYPE_PUSHPULL(PF04) | \
868
PIN_OTYPE_PUSHPULL(PF05) | \
869
PIN_OTYPE_PUSHPULL(PF06) | \
870
PIN_OTYPE_PUSHPULL(PF07) | \
871
PIN_OTYPE_PUSHPULL(PF08) | \
872
PIN_OTYPE_PUSHPULL(PF09) | \
873
PIN_OTYPE_PUSHPULL(PF10) | \
874
PIN_OTYPE_PUSHPULL(PF11) | \
875
PIN_OTYPE_PUSHPULL(PF12) | \
876
PIN_OTYPE_PUSHPULL(PF13) | \
877
PIN_OTYPE_PUSHPULL(PF14) | \
878
PIN_OTYPE_PUSHPULL(PF15))
879
880
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(PF00) | \
881
PIN_OSPEED_SPEED_VERYLOW(PF01) | \
882
PIN_OSPEED_SPEED_VERYLOW(PF02) | \
883
PIN_OSPEED_SPEED_VERYLOW(PF03) | \
884
PIN_OSPEED_SPEED_VERYLOW(PF04) | \
885
PIN_OSPEED_SPEED_VERYLOW(PF05) | \
886
PIN_OSPEED_SPEED_VERYLOW(PF06) | \
887
PIN_OSPEED_SPEED_VERYLOW(PF07) | \
888
PIN_OSPEED_SPEED_VERYLOW(PF08) | \
889
PIN_OSPEED_SPEED_VERYLOW(PF09) | \
890
PIN_OSPEED_SPEED_VERYLOW(PF10) | \
891
PIN_OSPEED_SPEED_VERYLOW(PF11) | \
892
PIN_OSPEED_SPEED_VERYLOW(PF12) | \
893
PIN_OSPEED_SPEED_VERYLOW(PF13) | \
894
PIN_OSPEED_SPEED_VERYLOW(PF14) | \
895
PIN_OSPEED_SPEED_VERYLOW(PF15))
896
897
#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLDOWN(PF00) | \
898
PIN_PUPDR_PULLDOWN(PF01) | \
899
PIN_PUPDR_PULLDOWN(PF02) | \
900
PIN_PUPDR_PULLDOWN(PF03) | \
901
PIN_PUPDR_PULLDOWN(PF04) | \
902
PIN_PUPDR_PULLDOWN(PF05) | \
903
PIN_PUPDR_PULLDOWN(PF06) | \
904
PIN_PUPDR_PULLDOWN(PF07) | \
905
PIN_PUPDR_PULLDOWN(PF08) | \
906
PIN_PUPDR_PULLDOWN(PF09) | \
907
PIN_PUPDR_PULLDOWN(PF10) | \
908
PIN_PUPDR_PULLDOWN(PF11) | \
909
PIN_PUPDR_PULLDOWN(PF12) | \
910
PIN_PUPDR_PULLDOWN(PF13) | \
911
PIN_PUPDR_PULLDOWN(PF14) | \
912
PIN_PUPDR_PULLDOWN(PF15))
913
914
#define VAL_GPIOF_ODR (PIN_ODR_LEVEL_LOW(PF00) | \
915
PIN_ODR_LEVEL_LOW(PF01) | \
916
PIN_ODR_LEVEL_LOW(PF02) | \
917
PIN_ODR_LEVEL_LOW(PF03) | \
918
PIN_ODR_LEVEL_LOW(PF04) | \
919
PIN_ODR_LEVEL_LOW(PF05) | \
920
PIN_ODR_LEVEL_LOW(PF06) | \
921
PIN_ODR_LEVEL_LOW(PF07) | \
922
PIN_ODR_LEVEL_LOW(PF08) | \
923
PIN_ODR_LEVEL_LOW(PF09) | \
924
PIN_ODR_LEVEL_LOW(PF10) | \
925
PIN_ODR_LEVEL_LOW(PF11) | \
926
PIN_ODR_LEVEL_LOW(PF12) | \
927
PIN_ODR_LEVEL_LOW(PF13) | \
928
PIN_ODR_LEVEL_LOW(PF14) | \
929
PIN_ODR_LEVEL_LOW(PF15))
930
931
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(PF00, 0) | \
932
PIN_AFIO_AF(PF01, 0) | \
933
PIN_AFIO_AF(PF02, 0) | \
934
PIN_AFIO_AF(PF03, 0) | \
935
PIN_AFIO_AF(PF04, 0) | \
936
PIN_AFIO_AF(PF05, 0) | \
937
PIN_AFIO_AF(PF06, 0) | \
938
PIN_AFIO_AF(PF07, 0))
939
940
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(PF08, 0) | \
941
PIN_AFIO_AF(PF09, 0) | \
942
PIN_AFIO_AF(PF10, 0) | \
943
PIN_AFIO_AF(PF11, 0) | \
944
PIN_AFIO_AF(PF12, 0) | \
945
PIN_AFIO_AF(PF13, 0) | \
946
PIN_AFIO_AF(PF14, 0) | \
947
PIN_AFIO_AF(PF15, 0))
948
949
#define VAL_GPIOG_MODER (PIN_MODE_INPUT(PG00) | \
950
PIN_MODE_INPUT(PG01) | \
951
PIN_MODE_INPUT(PG02) | \
952
PIN_MODE_INPUT(PG03) | \
953
PIN_MODE_INPUT(PG04) | \
954
PIN_MODE_INPUT(PG05) | \
955
PIN_MODE_INPUT(PG06) | \
956
PIN_MODE_INPUT(PG07) | \
957
PIN_MODE_INPUT(PG08) | \
958
PIN_MODE_INPUT(PG09) | \
959
PIN_MODE_INPUT(PG10) | \
960
PIN_MODE_INPUT(PG11) | \
961
PIN_MODE_INPUT(PG12) | \
962
PIN_MODE_INPUT(PG13) | \
963
PIN_MODE_INPUT(PG14) | \
964
PIN_MODE_INPUT(PG15))
965
966
#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(PG00) | \
967
PIN_OTYPE_PUSHPULL(PG01) | \
968
PIN_OTYPE_PUSHPULL(PG02) | \
969
PIN_OTYPE_PUSHPULL(PG03) | \
970
PIN_OTYPE_PUSHPULL(PG04) | \
971
PIN_OTYPE_PUSHPULL(PG05) | \
972
PIN_OTYPE_PUSHPULL(PG06) | \
973
PIN_OTYPE_PUSHPULL(PG07) | \
974
PIN_OTYPE_PUSHPULL(PG08) | \
975
PIN_OTYPE_PUSHPULL(PG09) | \
976
PIN_OTYPE_PUSHPULL(PG10) | \
977
PIN_OTYPE_PUSHPULL(PG11) | \
978
PIN_OTYPE_PUSHPULL(PG12) | \
979
PIN_OTYPE_PUSHPULL(PG13) | \
980
PIN_OTYPE_PUSHPULL(PG14) | \
981
PIN_OTYPE_PUSHPULL(PG15))
982
983
#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(PG00) | \
984
PIN_OSPEED_SPEED_VERYLOW(PG01) | \
985
PIN_OSPEED_SPEED_VERYLOW(PG02) | \
986
PIN_OSPEED_SPEED_VERYLOW(PG03) | \
987
PIN_OSPEED_SPEED_VERYLOW(PG04) | \
988
PIN_OSPEED_SPEED_VERYLOW(PG05) | \
989
PIN_OSPEED_SPEED_VERYLOW(PG06) | \
990
PIN_OSPEED_SPEED_VERYLOW(PG07) | \
991
PIN_OSPEED_SPEED_VERYLOW(PG08) | \
992
PIN_OSPEED_SPEED_VERYLOW(PG09) | \
993
PIN_OSPEED_SPEED_VERYLOW(PG10) | \
994
PIN_OSPEED_SPEED_VERYLOW(PG11) | \
995
PIN_OSPEED_SPEED_VERYLOW(PG12) | \
996
PIN_OSPEED_SPEED_VERYLOW(PG13) | \
997
PIN_OSPEED_SPEED_VERYLOW(PG14) | \
998
PIN_OSPEED_SPEED_VERYLOW(PG15))
999
1000
#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLDOWN(PG00) | \
1001
PIN_PUPDR_PULLDOWN(PG01) | \
1002
PIN_PUPDR_PULLDOWN(PG02) | \
1003
PIN_PUPDR_PULLDOWN(PG03) | \
1004
PIN_PUPDR_PULLDOWN(PG04) | \
1005
PIN_PUPDR_PULLDOWN(PG05) | \
1006
PIN_PUPDR_PULLDOWN(PG06) | \
1007
PIN_PUPDR_PULLDOWN(PG07) | \
1008
PIN_PUPDR_PULLDOWN(PG08) | \
1009
PIN_PUPDR_PULLDOWN(PG09) | \
1010
PIN_PUPDR_PULLDOWN(PG10) | \
1011
PIN_PUPDR_PULLDOWN(PG11) | \
1012
PIN_PUPDR_PULLDOWN(PG12) | \
1013
PIN_PUPDR_PULLDOWN(PG13) | \
1014
PIN_PUPDR_PULLDOWN(PG14) | \
1015
PIN_PUPDR_PULLDOWN(PG15))
1016
1017
#define VAL_GPIOG_ODR (PIN_ODR_LEVEL_LOW(PG00) | \
1018
PIN_ODR_LEVEL_LOW(PG01) | \
1019
PIN_ODR_LEVEL_LOW(PG02) | \
1020
PIN_ODR_LEVEL_LOW(PG03) | \
1021
PIN_ODR_LEVEL_LOW(PG04) | \
1022
PIN_ODR_LEVEL_LOW(PG05) | \
1023
PIN_ODR_LEVEL_LOW(PG06) | \
1024
PIN_ODR_LEVEL_LOW(PG07) | \
1025
PIN_ODR_LEVEL_LOW(PG08) | \
1026
PIN_ODR_LEVEL_LOW(PG09) | \
1027
PIN_ODR_LEVEL_LOW(PG10) | \
1028
PIN_ODR_LEVEL_LOW(PG11) | \
1029
PIN_ODR_LEVEL_LOW(PG12) | \
1030
PIN_ODR_LEVEL_LOW(PG13) | \
1031
PIN_ODR_LEVEL_LOW(PG14) | \
1032
PIN_ODR_LEVEL_LOW(PG15))
1033
1034
#define VAL_GPIOG_AFRL (PIN_AFIO_AF(PG00, 0) | \
1035
PIN_AFIO_AF(PG01, 0) | \
1036
PIN_AFIO_AF(PG02, 0) | \
1037
PIN_AFIO_AF(PG03, 0) | \
1038
PIN_AFIO_AF(PG04, 0) | \
1039
PIN_AFIO_AF(PG05, 0) | \
1040
PIN_AFIO_AF(PG06, 0) | \
1041
PIN_AFIO_AF(PG07, 0))
1042
1043
#define VAL_GPIOG_AFRH (PIN_AFIO_AF(PG08, 0) | \
1044
PIN_AFIO_AF(PG09, 0) | \
1045
PIN_AFIO_AF(PG10, 0) | \
1046
PIN_AFIO_AF(PG11, 0) | \
1047
PIN_AFIO_AF(PG12, 0) | \
1048
PIN_AFIO_AF(PG13, 0) | \
1049
PIN_AFIO_AF(PG14, 0) | \
1050
PIN_AFIO_AF(PG15, 0))
1051
1052
#define VAL_GPIOH_MODER (PIN_MODE_ALTERNATE(OSC_IN) | \
1053
PIN_MODE_ALTERNATE(OSC_OUT) | \
1054
PIN_MODE_INPUT(PH02) | \
1055
PIN_MODE_INPUT(PH03) | \
1056
PIN_MODE_INPUT(PH04) | \
1057
PIN_MODE_INPUT(PH05) | \
1058
PIN_MODE_INPUT(PH06) | \
1059
PIN_MODE_INPUT(PH07) | \
1060
PIN_MODE_INPUT(PH08) | \
1061
PIN_MODE_INPUT(PH09) | \
1062
PIN_MODE_INPUT(PH10) | \
1063
PIN_MODE_INPUT(PH11) | \
1064
PIN_MODE_INPUT(PH12) | \
1065
PIN_MODE_INPUT(PH13) | \
1066
PIN_MODE_INPUT(PH14) | \
1067
PIN_MODE_INPUT(PH15))
1068
1069
#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(OSC_IN) | \
1070
PIN_OTYPE_PUSHPULL(OSC_OUT) | \
1071
PIN_OTYPE_PUSHPULL(PH02) | \
1072
PIN_OTYPE_PUSHPULL(PH03) | \
1073
PIN_OTYPE_PUSHPULL(PH04) | \
1074
PIN_OTYPE_PUSHPULL(PH05) | \
1075
PIN_OTYPE_PUSHPULL(PH06) | \
1076
PIN_OTYPE_PUSHPULL(PH07) | \
1077
PIN_OTYPE_PUSHPULL(PH08) | \
1078
PIN_OTYPE_PUSHPULL(PH09) | \
1079
PIN_OTYPE_PUSHPULL(PH10) | \
1080
PIN_OTYPE_PUSHPULL(PH11) | \
1081
PIN_OTYPE_PUSHPULL(PH12) | \
1082
PIN_OTYPE_PUSHPULL(PH13) | \
1083
PIN_OTYPE_PUSHPULL(PH14) | \
1084
PIN_OTYPE_PUSHPULL(PH15))
1085
1086
#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_SPEED_HIGH(OSC_IN) | \
1087
PIN_OSPEED_SPEED_HIGH(OSC_OUT) | \
1088
PIN_OSPEED_SPEED_VERYLOW(PH02) | \
1089
PIN_OSPEED_SPEED_VERYLOW(PH03) | \
1090
PIN_OSPEED_SPEED_VERYLOW(PH04) | \
1091
PIN_OSPEED_SPEED_VERYLOW(PH05) | \
1092
PIN_OSPEED_SPEED_VERYLOW(PH06) | \
1093
PIN_OSPEED_SPEED_VERYLOW(PH07) | \
1094
PIN_OSPEED_SPEED_VERYLOW(PH08) | \
1095
PIN_OSPEED_SPEED_VERYLOW(PH09) | \
1096
PIN_OSPEED_SPEED_VERYLOW(PH10) | \
1097
PIN_OSPEED_SPEED_VERYLOW(PH11) | \
1098
PIN_OSPEED_SPEED_VERYLOW(PH12) | \
1099
PIN_OSPEED_SPEED_VERYLOW(PH13) | \
1100
PIN_OSPEED_SPEED_VERYLOW(PH14) | \
1101
PIN_OSPEED_SPEED_VERYLOW(PH15))
1102
1103
#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(OSC_IN) | \
1104
PIN_PUPDR_FLOATING(OSC_OUT) | \
1105
PIN_PUPDR_PULLDOWN(PH02) | \
1106
PIN_PUPDR_PULLDOWN(PH03) | \
1107
PIN_PUPDR_PULLDOWN(PH04) | \
1108
PIN_PUPDR_PULLDOWN(PH05) | \
1109
PIN_PUPDR_PULLDOWN(PH06) | \
1110
PIN_PUPDR_PULLDOWN(PH07) | \
1111
PIN_PUPDR_PULLDOWN(PH08) | \
1112
PIN_PUPDR_PULLDOWN(PH09) | \
1113
PIN_PUPDR_PULLDOWN(PH10) | \
1114
PIN_PUPDR_PULLDOWN(PH11) | \
1115
PIN_PUPDR_PULLDOWN(PH12) | \
1116
PIN_PUPDR_PULLDOWN(PH13) | \
1117
PIN_PUPDR_PULLDOWN(PH14) | \
1118
PIN_PUPDR_PULLDOWN(PH15))
1119
1120
#define VAL_GPIOH_ODR (PIN_ODR_LEVEL_HIGH(OSC_IN) | \
1121
PIN_ODR_LEVEL_HIGH(OSC_OUT) | \
1122
PIN_ODR_LEVEL_LOW(PH02) | \
1123
PIN_ODR_LEVEL_LOW(PH03) | \
1124
PIN_ODR_LEVEL_LOW(PH04) | \
1125
PIN_ODR_LEVEL_LOW(PH05) | \
1126
PIN_ODR_LEVEL_LOW(PH06) | \
1127
PIN_ODR_LEVEL_LOW(PH07) | \
1128
PIN_ODR_LEVEL_LOW(PH08) | \
1129
PIN_ODR_LEVEL_LOW(PH09) | \
1130
PIN_ODR_LEVEL_LOW(PH10) | \
1131
PIN_ODR_LEVEL_LOW(PH11) | \
1132
PIN_ODR_LEVEL_LOW(PH12) | \
1133
PIN_ODR_LEVEL_LOW(PH13) | \
1134
PIN_ODR_LEVEL_LOW(PH14) | \
1135
PIN_ODR_LEVEL_LOW(PH15))
1136
1137
#define VAL_GPIOH_AFRL (PIN_AFIO_AF(OSC_IN, 0) | \
1138
PIN_AFIO_AF(OSC_OUT, 0) | \
1139
PIN_AFIO_AF(PH02, 0) | \
1140
PIN_AFIO_AF(PH03, 0) | \
1141
PIN_AFIO_AF(PH04, 0) | \
1142
PIN_AFIO_AF(PH05, 0) | \
1143
PIN_AFIO_AF(PH06, 0) | \
1144
PIN_AFIO_AF(PH07, 0))
1145
1146
#define VAL_GPIOH_AFRH (PIN_AFIO_AF(PH08, 0) | \
1147
PIN_AFIO_AF(PH09, 0) | \
1148
PIN_AFIO_AF(PH10, 0) | \
1149
PIN_AFIO_AF(PH11, 0) | \
1150
PIN_AFIO_AF(PH12, 0) | \
1151
PIN_AFIO_AF(PH13, 0) | \
1152
PIN_AFIO_AF(PH14, 0) | \
1153
PIN_AFIO_AF(PH15, 0))
1154
1155
#define VAL_GPIOI_MODER (PIN_MODE_INPUT(PI00) | \
1156
PIN_MODE_INPUT(PI01) | \
1157
PIN_MODE_INPUT(PI02) | \
1158
PIN_MODE_INPUT(PI03) | \
1159
PIN_MODE_INPUT(PI04) | \
1160
PIN_MODE_INPUT(PI05) | \
1161
PIN_MODE_INPUT(PI06) | \
1162
PIN_MODE_INPUT(PI07) | \
1163
PIN_MODE_INPUT(PI08) | \
1164
PIN_MODE_INPUT(PI09) | \
1165
PIN_MODE_INPUT(PI10) | \
1166
PIN_MODE_INPUT(PI11) | \
1167
PIN_MODE_INPUT(PI12) | \
1168
PIN_MODE_INPUT(PI13) | \
1169
PIN_MODE_INPUT(PI14) | \
1170
PIN_MODE_INPUT(PI15))
1171
1172
#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(PI00) | \
1173
PIN_OTYPE_PUSHPULL(PI01) | \
1174
PIN_OTYPE_PUSHPULL(PI02) | \
1175
PIN_OTYPE_PUSHPULL(PI03) | \
1176
PIN_OTYPE_PUSHPULL(PI04) | \
1177
PIN_OTYPE_PUSHPULL(PI05) | \
1178
PIN_OTYPE_PUSHPULL(PI06) | \
1179
PIN_OTYPE_PUSHPULL(PI07) | \
1180
PIN_OTYPE_PUSHPULL(PI08) | \
1181
PIN_OTYPE_PUSHPULL(PI09) | \
1182
PIN_OTYPE_PUSHPULL(PI10) | \
1183
PIN_OTYPE_PUSHPULL(PI11) | \
1184
PIN_OTYPE_PUSHPULL(PI12) | \
1185
PIN_OTYPE_PUSHPULL(PI13) | \
1186
PIN_OTYPE_PUSHPULL(PI14) | \
1187
PIN_OTYPE_PUSHPULL(PI15))
1188
1189
#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(PI00) | \
1190
PIN_OSPEED_SPEED_VERYLOW(PI01) | \
1191
PIN_OSPEED_SPEED_VERYLOW(PI02) | \
1192
PIN_OSPEED_SPEED_VERYLOW(PI03) | \
1193
PIN_OSPEED_SPEED_VERYLOW(PI04) | \
1194
PIN_OSPEED_SPEED_VERYLOW(PI05) | \
1195
PIN_OSPEED_SPEED_VERYLOW(PI06) | \
1196
PIN_OSPEED_SPEED_VERYLOW(PI07) | \
1197
PIN_OSPEED_SPEED_VERYLOW(PI08) | \
1198
PIN_OSPEED_SPEED_VERYLOW(PI09) | \
1199
PIN_OSPEED_SPEED_VERYLOW(PI10) | \
1200
PIN_OSPEED_SPEED_VERYLOW(PI11) | \
1201
PIN_OSPEED_SPEED_VERYLOW(PI12) | \
1202
PIN_OSPEED_SPEED_VERYLOW(PI13) | \
1203
PIN_OSPEED_SPEED_VERYLOW(PI14) | \
1204
PIN_OSPEED_SPEED_VERYLOW(PI15))
1205
1206
#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLDOWN(PI00) | \
1207
PIN_PUPDR_PULLDOWN(PI01) | \
1208
PIN_PUPDR_PULLDOWN(PI02) | \
1209
PIN_PUPDR_PULLDOWN(PI03) | \
1210
PIN_PUPDR_PULLDOWN(PI04) | \
1211
PIN_PUPDR_PULLDOWN(PI05) | \
1212
PIN_PUPDR_PULLDOWN(PI06) | \
1213
PIN_PUPDR_PULLDOWN(PI07) | \
1214
PIN_PUPDR_PULLDOWN(PI08) | \
1215
PIN_PUPDR_PULLDOWN(PI09) | \
1216
PIN_PUPDR_PULLDOWN(PI10) | \
1217
PIN_PUPDR_PULLDOWN(PI11) | \
1218
PIN_PUPDR_PULLDOWN(PI12) | \
1219
PIN_PUPDR_PULLDOWN(PI13) | \
1220
PIN_PUPDR_PULLDOWN(PI14) | \
1221
PIN_PUPDR_PULLDOWN(PI15))
1222
1223
#define VAL_GPIOI_ODR (PIN_ODR_LEVEL_LOW(PI00) | \
1224
PIN_ODR_LEVEL_LOW(PI01) | \
1225
PIN_ODR_LEVEL_LOW(PI02) | \
1226
PIN_ODR_LEVEL_LOW(PI03) | \
1227
PIN_ODR_LEVEL_LOW(PI04) | \
1228
PIN_ODR_LEVEL_LOW(PI05) | \
1229
PIN_ODR_LEVEL_LOW(PI06) | \
1230
PIN_ODR_LEVEL_LOW(PI07) | \
1231
PIN_ODR_LEVEL_LOW(PI08) | \
1232
PIN_ODR_LEVEL_LOW(PI09) | \
1233
PIN_ODR_LEVEL_LOW(PI10) | \
1234
PIN_ODR_LEVEL_LOW(PI11) | \
1235
PIN_ODR_LEVEL_LOW(PI12) | \
1236
PIN_ODR_LEVEL_LOW(PI13) | \
1237
PIN_ODR_LEVEL_LOW(PI14) | \
1238
PIN_ODR_LEVEL_LOW(PI15))
1239
1240
#define VAL_GPIOI_AFRL (PIN_AFIO_AF(PI00, 0) | \
1241
PIN_AFIO_AF(PI01, 0) | \
1242
PIN_AFIO_AF(PI02, 0) | \
1243
PIN_AFIO_AF(PI03, 0) | \
1244
PIN_AFIO_AF(PI04, 0) | \
1245
PIN_AFIO_AF(PI05, 0) | \
1246
PIN_AFIO_AF(PI06, 0) | \
1247
PIN_AFIO_AF(PI07, 0))
1248
1249
#define VAL_GPIOI_AFRH (PIN_AFIO_AF(PI08, 0) | \
1250
PIN_AFIO_AF(PI09, 0) | \
1251
PIN_AFIO_AF(PI10, 0) | \
1252
PIN_AFIO_AF(PI11, 0) | \
1253
PIN_AFIO_AF(PI12, 0) | \
1254
PIN_AFIO_AF(PI13, 0) | \
1255
PIN_AFIO_AF(PI14, 0) | \
1256
PIN_AFIO_AF(PI15, 0))
1257
1258
#define VAL_GPIOJ_MODER (PIN_MODE_INPUT(PJ00) | \
1259
PIN_MODE_INPUT(PJ01) | \
1260
PIN_MODE_INPUT(PJ02) | \
1261
PIN_MODE_INPUT(PJ03) | \
1262
PIN_MODE_INPUT(PJ04) | \
1263
PIN_MODE_INPUT(PJ05) | \
1264
PIN_MODE_INPUT(PJ06) | \
1265
PIN_MODE_INPUT(PJ07) | \
1266
PIN_MODE_INPUT(PJ08) | \
1267
PIN_MODE_INPUT(PJ09) | \
1268
PIN_MODE_INPUT(PJ10) | \
1269
PIN_MODE_INPUT(PJ11) | \
1270
PIN_MODE_INPUT(PJ12) | \
1271
PIN_MODE_INPUT(PJ13) | \
1272
PIN_MODE_INPUT(PJ14) | \
1273
PIN_MODE_INPUT(PJ15))
1274
1275
#define VAL_GPIOJ_OTYPER (PIN_OTYPE_PUSHPULL(PJ00) | \
1276
PIN_OTYPE_PUSHPULL(PJ01) | \
1277
PIN_OTYPE_PUSHPULL(PJ02) | \
1278
PIN_OTYPE_PUSHPULL(PJ03) | \
1279
PIN_OTYPE_PUSHPULL(PJ04) | \
1280
PIN_OTYPE_PUSHPULL(PJ05) | \
1281
PIN_OTYPE_PUSHPULL(PJ06) | \
1282
PIN_OTYPE_PUSHPULL(PJ07) | \
1283
PIN_OTYPE_PUSHPULL(PJ08) | \
1284
PIN_OTYPE_PUSHPULL(PJ09) | \
1285
PIN_OTYPE_PUSHPULL(PJ10) | \
1286
PIN_OTYPE_PUSHPULL(PJ11) | \
1287
PIN_OTYPE_PUSHPULL(PJ12) | \
1288
PIN_OTYPE_PUSHPULL(PJ13) | \
1289
PIN_OTYPE_PUSHPULL(PJ14) | \
1290
PIN_OTYPE_PUSHPULL(PJ15))
1291
1292
#define VAL_GPIOJ_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(PJ00) | \
1293
PIN_OSPEED_SPEED_VERYLOW(PJ01) | \
1294
PIN_OSPEED_SPEED_VERYLOW(PJ02) | \
1295
PIN_OSPEED_SPEED_VERYLOW(PJ03) | \
1296
PIN_OSPEED_SPEED_VERYLOW(PJ04) | \
1297
PIN_OSPEED_SPEED_VERYLOW(PJ05) | \
1298
PIN_OSPEED_SPEED_VERYLOW(PJ06) | \
1299
PIN_OSPEED_SPEED_VERYLOW(PJ07) | \
1300
PIN_OSPEED_SPEED_VERYLOW(PJ08) | \
1301
PIN_OSPEED_SPEED_VERYLOW(PJ09) | \
1302
PIN_OSPEED_SPEED_VERYLOW(PJ10) | \
1303
PIN_OSPEED_SPEED_VERYLOW(PJ11) | \
1304
PIN_OSPEED_SPEED_VERYLOW(PJ12) | \
1305
PIN_OSPEED_SPEED_VERYLOW(PJ13) | \
1306
PIN_OSPEED_SPEED_VERYLOW(PJ14) | \
1307
PIN_OSPEED_SPEED_VERYLOW(PJ15))
1308
1309
#define VAL_GPIOJ_PUPDR (PIN_PUPDR_PULLDOWN(PJ00) | \
1310
PIN_PUPDR_PULLDOWN(PJ01) | \
1311
PIN_PUPDR_PULLDOWN(PJ02) | \
1312
PIN_PUPDR_PULLDOWN(PJ03) | \
1313
PIN_PUPDR_PULLDOWN(PJ04) | \
1314
PIN_PUPDR_PULLDOWN(PJ05) | \
1315
PIN_PUPDR_PULLDOWN(PJ06) | \
1316
PIN_PUPDR_PULLDOWN(PJ07) | \
1317
PIN_PUPDR_PULLDOWN(PJ08) | \
1318
PIN_PUPDR_PULLDOWN(PJ09) | \
1319
PIN_PUPDR_PULLDOWN(PJ10) | \
1320
PIN_PUPDR_PULLDOWN(PJ11) | \
1321
PIN_PUPDR_PULLDOWN(PJ12) | \
1322
PIN_PUPDR_PULLDOWN(PJ13) | \
1323
PIN_PUPDR_PULLDOWN(PJ14) | \
1324
PIN_PUPDR_PULLDOWN(PJ15))
1325
1326
#define VAL_GPIOJ_ODR (PIN_ODR_LEVEL_LOW(PJ00) | \
1327
PIN_ODR_LEVEL_LOW(PJ01) | \
1328
PIN_ODR_LEVEL_LOW(PJ02) | \
1329
PIN_ODR_LEVEL_LOW(PJ03) | \
1330
PIN_ODR_LEVEL_LOW(PJ04) | \
1331
PIN_ODR_LEVEL_LOW(PJ05) | \
1332
PIN_ODR_LEVEL_LOW(PJ06) | \
1333
PIN_ODR_LEVEL_LOW(PJ07) | \
1334
PIN_ODR_LEVEL_LOW(PJ08) | \
1335
PIN_ODR_LEVEL_LOW(PJ09) | \
1336
PIN_ODR_LEVEL_LOW(PJ10) | \
1337
PIN_ODR_LEVEL_LOW(PJ11) | \
1338
PIN_ODR_LEVEL_LOW(PJ12) | \
1339
PIN_ODR_LEVEL_LOW(PJ13) | \
1340
PIN_ODR_LEVEL_LOW(PJ14) | \
1341
PIN_ODR_LEVEL_LOW(PJ15))
1342
1343
#define VAL_GPIOJ_AFRL (PIN_AFIO_AF(PJ00, 0) | \
1344
PIN_AFIO_AF(PJ01, 0) | \
1345
PIN_AFIO_AF(PJ02, 0) | \
1346
PIN_AFIO_AF(PJ03, 0) | \
1347
PIN_AFIO_AF(PJ04, 0) | \
1348
PIN_AFIO_AF(PJ05, 0) | \
1349
PIN_AFIO_AF(PJ06, 0) | \
1350
PIN_AFIO_AF(PJ07, 0))
1351
1352
#define VAL_GPIOJ_AFRH (PIN_AFIO_AF(PJ08, 0) | \
1353
PIN_AFIO_AF(PJ09, 0) | \
1354
PIN_AFIO_AF(PJ10, 0) | \
1355
PIN_AFIO_AF(PJ11, 0) | \
1356
PIN_AFIO_AF(PJ12, 0) | \
1357
PIN_AFIO_AF(PJ13, 0) | \
1358
PIN_AFIO_AF(PJ14, 0) | \
1359
PIN_AFIO_AF(PJ15, 0))
1360
1361
#define VAL_GPIOK_MODER (PIN_MODE_INPUT(PK00) | \
1362
PIN_MODE_INPUT(PK01) | \
1363
PIN_MODE_INPUT(PK02) | \
1364
PIN_MODE_INPUT(PK03) | \
1365
PIN_MODE_INPUT(PK04) | \
1366
PIN_MODE_INPUT(PK05) | \
1367
PIN_MODE_INPUT(PK06) | \
1368
PIN_MODE_INPUT(PK07) | \
1369
PIN_MODE_INPUT(PK08) | \
1370
PIN_MODE_INPUT(PK09) | \
1371
PIN_MODE_INPUT(PK10) | \
1372
PIN_MODE_INPUT(PK11) | \
1373
PIN_MODE_INPUT(PK12) | \
1374
PIN_MODE_INPUT(PK13) | \
1375
PIN_MODE_INPUT(PK14) | \
1376
PIN_MODE_INPUT(PK15))
1377
1378
#define VAL_GPIOK_OTYPER (PIN_OTYPE_PUSHPULL(PK00) | \
1379
PIN_OTYPE_PUSHPULL(PK01) | \
1380
PIN_OTYPE_PUSHPULL(PK02) | \
1381
PIN_OTYPE_PUSHPULL(PK03) | \
1382
PIN_OTYPE_PUSHPULL(PK04) | \
1383
PIN_OTYPE_PUSHPULL(PK05) | \
1384
PIN_OTYPE_PUSHPULL(PK06) | \
1385
PIN_OTYPE_PUSHPULL(PK07) | \
1386
PIN_OTYPE_PUSHPULL(PK08) | \
1387
PIN_OTYPE_PUSHPULL(PK09) | \
1388
PIN_OTYPE_PUSHPULL(PK10) | \
1389
PIN_OTYPE_PUSHPULL(PK11) | \
1390
PIN_OTYPE_PUSHPULL(PK12) | \
1391
PIN_OTYPE_PUSHPULL(PK13) | \
1392
PIN_OTYPE_PUSHPULL(PK14) | \
1393
PIN_OTYPE_PUSHPULL(PK15))
1394
1395
#define VAL_GPIOK_OSPEEDR (PIN_OSPEED_SPEED_VERYLOW(PK00) | \
1396
PIN_OSPEED_SPEED_VERYLOW(PK01) | \
1397
PIN_OSPEED_SPEED_VERYLOW(PK02) | \
1398
PIN_OSPEED_SPEED_VERYLOW(PK03) | \
1399
PIN_OSPEED_SPEED_VERYLOW(PK04) | \
1400
PIN_OSPEED_SPEED_VERYLOW(PK05) | \
1401
PIN_OSPEED_SPEED_VERYLOW(PK06) | \
1402
PIN_OSPEED_SPEED_VERYLOW(PK07) | \
1403
PIN_OSPEED_SPEED_VERYLOW(PK08) | \
1404
PIN_OSPEED_SPEED_VERYLOW(PK09) | \
1405
PIN_OSPEED_SPEED_VERYLOW(PK10) | \
1406
PIN_OSPEED_SPEED_VERYLOW(PK11) | \
1407
PIN_OSPEED_SPEED_VERYLOW(PK12) | \
1408
PIN_OSPEED_SPEED_VERYLOW(PK13) | \
1409
PIN_OSPEED_SPEED_VERYLOW(PK14) | \
1410
PIN_OSPEED_SPEED_VERYLOW(PK15))
1411
1412
#define VAL_GPIOK_PUPDR (PIN_PUPDR_PULLDOWN(PK00) | \
1413
PIN_PUPDR_PULLDOWN(PK01) | \
1414
PIN_PUPDR_PULLDOWN(PK02) | \
1415
PIN_PUPDR_PULLDOWN(PK03) | \
1416
PIN_PUPDR_PULLDOWN(PK04) | \
1417
PIN_PUPDR_PULLDOWN(PK05) | \
1418
PIN_PUPDR_PULLDOWN(PK06) | \
1419
PIN_PUPDR_PULLDOWN(PK07) | \
1420
PIN_PUPDR_PULLDOWN(PK08) | \
1421
PIN_PUPDR_PULLDOWN(PK09) | \
1422
PIN_PUPDR_PULLDOWN(PK10) | \
1423
PIN_PUPDR_PULLDOWN(PK11) | \
1424
PIN_PUPDR_PULLDOWN(PK12) | \
1425
PIN_PUPDR_PULLDOWN(PK13) | \
1426
PIN_PUPDR_PULLDOWN(PK14) | \
1427
PIN_PUPDR_PULLDOWN(PK15))
1428
1429
#define VAL_GPIOK_ODR (PIN_ODR_LEVEL_LOW(PK00) | \
1430
PIN_ODR_LEVEL_LOW(PK01) | \
1431
PIN_ODR_LEVEL_LOW(PK02) | \
1432
PIN_ODR_LEVEL_LOW(PK03) | \
1433
PIN_ODR_LEVEL_LOW(PK04) | \
1434
PIN_ODR_LEVEL_LOW(PK05) | \
1435
PIN_ODR_LEVEL_LOW(PK06) | \
1436
PIN_ODR_LEVEL_LOW(PK07) | \
1437
PIN_ODR_LEVEL_LOW(PK08) | \
1438
PIN_ODR_LEVEL_LOW(PK09) | \
1439
PIN_ODR_LEVEL_LOW(PK10) | \
1440
PIN_ODR_LEVEL_LOW(PK11) | \
1441
PIN_ODR_LEVEL_LOW(PK12) | \
1442
PIN_ODR_LEVEL_LOW(PK13) | \
1443
PIN_ODR_LEVEL_LOW(PK14) | \
1444
PIN_ODR_LEVEL_LOW(PK15))
1445
1446
#define VAL_GPIOK_AFRL (PIN_AFIO_AF(PK00, 0) | \
1447
PIN_AFIO_AF(PK01, 0) | \
1448
PIN_AFIO_AF(PK02, 0) | \
1449
PIN_AFIO_AF(PK03, 0) | \
1450
PIN_AFIO_AF(PK04, 0) | \
1451
PIN_AFIO_AF(PK05, 0) | \
1452
PIN_AFIO_AF(PK06, 0) | \
1453
PIN_AFIO_AF(PK07, 0))
1454
1455
#define VAL_GPIOK_AFRH (PIN_AFIO_AF(PK08, 0) | \
1456
PIN_AFIO_AF(PK09, 0) | \
1457
PIN_AFIO_AF(PK10, 0) | \
1458
PIN_AFIO_AF(PK11, 0) | \
1459
PIN_AFIO_AF(PK12, 0) | \
1460
PIN_AFIO_AF(PK13, 0) | \
1461
PIN_AFIO_AF(PK14, 0) | \
1462
PIN_AFIO_AF(PK15, 0))
1463
1464
#define AF_OTG_FS_DM 10U
1465
#define AF_LINE_OTG_FS_DM 10U
1466
#define AF_OTG_FS_DP 10U
1467
#define AF_LINE_OTG_FS_DP 10U
1468
#define AF_SWDIO 0U
1469
#define AF_LINE_SWDIO 0U
1470
#define AF_SWCLK 0U
1471
#define AF_LINE_SWCLK 0U
1472
#define AF_UART7_TX 12U
1473
#define AF_LINE_UART7_TX 12U
1474
#define AF_UART7_RX 12U
1475
#define AF_LINE_UART7_RX 12U
1476
#define AF_DSHOT_RX 1U
1477
#define AF_LINE_DSHOT_RX 1U
1478
#define AF_SRVB1 2U
1479
#define AF_LINE_SRVB1 2U
1480
#define AF_SRVB2 2U
1481
#define AF_LINE_SRVB2 2U
1482
#define AF_SRVB3 2U
1483
#define AF_LINE_SRVB3 2U
1484
#define AF_SRVB4 2U
1485
#define AF_LINE_SRVB4 2U
1486
#define AF_I2C2_SCL 4U
1487
#define AF_LINE_I2C2_SCL 4U
1488
#define AF_I2C2_SDA 4U
1489
#define AF_LINE_I2C2_SDA 4U
1490
#define AF_SPI2_EXTERNAL_MISO 5U
1491
#define AF_LINE_SPI2_EXTERNAL_MISO 5U
1492
#define AF_SPI2_EXTERNAL_MOSI 5U
1493
#define AF_LINE_SPI2_EXTERNAL_MOSI 5U
1494
#define AF_SDMMC1_D0 12U
1495
#define AF_LINE_SDMMC1_D0 12U
1496
#define AF_SDMMC1_D1 12U
1497
#define AF_LINE_SDMMC1_D1 12U
1498
#define AF_SDMMC1_D2 12U
1499
#define AF_LINE_SDMMC1_D2 12U
1500
#define AF_SDMMC1_D3 12U
1501
#define AF_LINE_SDMMC1_D3 12U
1502
#define AF_SDMMC1_CK 12U
1503
#define AF_LINE_SDMMC1_CK 12U
1504
#define AF_OSC32_IN 0U
1505
#define AF_LINE_OSC32_IN 0U
1506
#define AF_OSC32_OUT 0U
1507
#define AF_LINE_OSC32_OUT 0U
1508
#define AF_CAN_RX 9U
1509
#define AF_LINE_CAN_RX 9U
1510
#define AF_CAN_TX 9U
1511
#define AF_LINE_CAN_TX 9U
1512
#define AF_SDMMC1_CMD 12U
1513
#define AF_LINE_SDMMC1_CMD 12U
1514
#define AF_SPI2_EXTERNAL_CLK 5U
1515
#define AF_LINE_SPI2_EXTERNAL_CLK 5U
1516
#define AF_UART2_TX 7U
1517
#define AF_LINE_UART2_TX 7U
1518
#define AF_UART2_RX 7U
1519
#define AF_LINE_UART2_RX 7U
1520
#define AF_UART3_TX 7U
1521
#define AF_LINE_UART3_TX 7U
1522
#define AF_UART3_RX 7U
1523
#define AF_LINE_UART3_RX 7U
1524
#define AF_I2C4_SCL 4U
1525
#define AF_LINE_I2C4_SCL 4U
1526
#define AF_I2C4_SDA 4U
1527
#define AF_LINE_I2C4_SDA 4U
1528
#define AF_RC1 8U
1529
#define AF_LINE_RC1 8U
1530
#define AF_SPI4_INTERNAL_CLK 5U
1531
#define AF_LINE_SPI4_INTERNAL_CLK 5U
1532
#define AF_SPI4_INTERNAL_MISO 5U
1533
#define AF_LINE_SPI4_INTERNAL_MISO 5U
1534
#define AF_SPI4_INTERNAL_MOSI 5U
1535
#define AF_LINE_SPI4_INTERNAL_MOSI 5U
1536
#define AF_SRVA1 1U
1537
#define AF_LINE_SRVA1 1U
1538
#define AF_SRVA2 1U
1539
#define AF_LINE_SRVA2 1U
1540
#define AF_SRVA3 1U
1541
#define AF_LINE_SRVA3 1U
1542
#define AF_SRVA4 1U
1543
#define AF_LINE_SRVA4 1U
1544
#define AF_OSC_IN 0U
1545
#define AF_LINE_OSC_IN 0U
1546
#define AF_OSC_OUT 0U
1547
#define AF_LINE_OSC_OUT 0U
1548
1549
1550
#define AUX_A1_ADC 1
1551
#define AUX_A1_ADC_FN IN
1552
#define AUX_A1_ADC_IN 0
1553
#define AUX_A1_TIM 5
1554
#define AUX_A1_TIM_FN CH
1555
#define AUX_A1_TIM_CH 1
1556
#define AUX_A1_TIM_AF 2
1557
#define AUX_A1_UART 4
1558
#define AUX_A1_UART_FN TX
1559
#define AUX_A1_UART_AF 8
1560
#define AUX_A1_USART 2
1561
#define AUX_A1_USART_FN CTS
1562
#define AUX_A1_USART_AF 7
1563
#define AUX_A2_ADC 1
1564
#define AUX_A2_ADC_FN IN
1565
#define AUX_A2_ADC_IN 1
1566
#define AUX_A2_TIM 5
1567
#define AUX_A2_TIM_FN CH
1568
#define AUX_A2_TIM_CH 2
1569
#define AUX_A2_TIM_AF 2
1570
#define AUX_A2_UART 4
1571
#define AUX_A2_UART_FN RX
1572
#define AUX_A2_UART_AF 8
1573
#define AUX_A2_USART 2
1574
#define AUX_A2_USART_FN RTS
1575
#define AUX_A2_USART_AF 7
1576
#define AUX_A3_ADC 1
1577
#define AUX_A3_ADC_FN IN
1578
#define AUX_A3_ADC_IN 2
1579
#define AUX_A3_TIM 5
1580
#define AUX_A3_TIM_FN CH
1581
#define AUX_A3_TIM_CH 3
1582
#define AUX_A3_TIM_AF 2
1583
#define AUX_A4_ADC 1
1584
#define AUX_A4_ADC_FN IN
1585
#define AUX_A4_ADC_IN 3
1586
#define AUX_A4_TIM 5
1587
#define AUX_A4_TIM_FN CH
1588
#define AUX_A4_TIM_CH 4
1589
#define AUX_A4_TIM_AF 2
1590
#define AUX_B1_ADC 1
1591
#define AUX_B1_ADC_FN IN
1592
#define AUX_B1_ADC_IN 6
1593
#define AUX_B1_TIM 3
1594
#define AUX_B1_TIM_FN CH
1595
#define AUX_B1_TIM_CH 1
1596
#define AUX_B1_TIM_AF 2
1597
#define AUX_B2_ADC 1
1598
#define AUX_B2_ADC_FN IN
1599
#define AUX_B2_ADC_IN 7
1600
#define AUX_B2_TIM 3
1601
#define AUX_B2_TIM_FN CH
1602
#define AUX_B2_TIM_CH 2
1603
#define AUX_B2_TIM_AF 2
1604
#define AUX_B3_ADC 1
1605
#define AUX_B3_ADC_FN IN
1606
#define AUX_B3_ADC_IN 8
1607
#define AUX_B3_TIM 3
1608
#define AUX_B3_TIM_FN CH
1609
#define AUX_B3_TIM_CH 3
1610
#define AUX_B3_TIM_AF 2
1611
#define AUX_B4_ADC 1
1612
#define AUX_B4_ADC_FN IN
1613
#define AUX_B4_ADC_IN 9
1614
#define AUX_B4_TIM 3
1615
#define AUX_B4_TIM_FN CH
1616
#define AUX_B4_TIM_CH 4
1617
#define AUX_B4_TIM_AF 2
1618
#define SRVB1_TIM 4
1619
#define SRVB1_TIM_FN CH
1620
#define SRVB1_TIM_CH 1
1621
#define SRVB1_TIM_AF 2
1622
#define SRVB2_TIM 4
1623
#define SRVB2_TIM_FN CH
1624
#define SRVB2_TIM_CH 2
1625
#define SRVB2_TIM_AF 2
1626
#define SRVB3_TIM 4
1627
#define SRVB3_TIM_FN CH
1628
#define SRVB3_TIM_CH 3
1629
#define SRVB3_TIM_AF 2
1630
#define SRVB4_TIM 4
1631
#define SRVB4_TIM_FN CH
1632
#define SRVB4_TIM_CH 4
1633
#define SRVB4_TIM_AF 2
1634
#define VBAT_MEAS_ADC 1
1635
#define VBAT_MEAS_ADC_FN IN
1636
#define VBAT_MEAS_ADC_IN 10
1637
#define RC2_TIM 8
1638
#define RC2_TIM_FN CH
1639
#define RC2_TIM_CH 1
1640
#define RC2_TIM_AF 3
1641
#define RC2_USART 6
1642
#define RC2_USART_FN TX
1643
#define RC2_USART_AF 8
1644
#define RC1_UART 8
1645
#define RC1_UART_FN RX
1646
#define RC1_UART_AF 8
1647
#define SRVA1_TIM 1
1648
#define SRVA1_TIM_FN CH
1649
#define SRVA1_TIM_CH 1
1650
#define SRVA1_TIM_AF 1
1651
#define SRVA2_TIM 1
1652
#define SRVA2_TIM_FN CH
1653
#define SRVA2_TIM_CH 2
1654
#define SRVA2_TIM_AF 1
1655
#define SRVA3_TIM 1
1656
#define SRVA3_TIM_FN CH
1657
#define SRVA3_TIM_CH 3
1658
#define SRVA3_TIM_AF 1
1659
#define SRVA4_TIM 1
1660
#define SRVA4_TIM_FN CH
1661
#define SRVA4_TIM_CH 4
1662
#define SRVA4_TIM_AF 1
1663
1664
#define BOARD_GROUP_DECLFOREACH(line, group) \
1665
static const ioline_t group ## _ARRAY[] = {group}; \
1666
for (ioline_t i=0, line = group ## _ARRAY[i]; (i < group ## _SIZE) && (line = group ## _ARRAY[i]); i++)
1667
1668
#define BOARD_GROUP_FOREACH(line, group) \
1669
for (ioline_t i=0, line = group ## _ARRAY[i]; (i < group ## _SIZE) && (line = group ## _ARRAY[i]); i++)
1670
1671
1672
#define BOARD_GROUP_DECLFOR(array, index, group) \
1673
static const ioline_t group ## _ARRAY[] = {group}; \
1674
for (ioline_t index=0, *array = (ioline_t *) group ## _ARRAY; index < group ## _SIZE; index++)
1675
1676
#define BOARD_GROUP_FOR(array, index, group) \
1677
for (ioline_t index=0, *array = (ioline_t *) group ## _ARRAY; index < group ## _SIZE; index++)
1678
1679
#define ENERGY_SAVE_INPUT \
1680
LINE_AUX_A1, \
1681
LINE_AUX_A2, \
1682
LINE_AUX_A3, \
1683
LINE_AUX_A4, \
1684
LINE_AUX_B1, \
1685
LINE_AUX_B2, \
1686
LINE_LED2, \
1687
LINE_AUX_B3, \
1688
LINE_AUX_B4, \
1689
LINE_SPI2_EXTERNAL_CS, \
1690
LINE_LED3, \
1691
LINE_LED4, \
1692
LINE_LED1, \
1693
LINE_SPI4_INTERNAL_CS
1694
#define ENERGY_SAVE_INPUT_SIZE 14
1695
1696
#if !defined(_FROM_ASM_)
1697
#ifdef __cplusplus
1698
extern
"C"
{
1699
#endif
1700
void
boardInit
(
void
);
1701
#ifdef __cplusplus
1702
}
1703
#endif
1704
#endif
/* _FROM_ASM_ */
1705
boardInit
void boardInit(void)
Board-specific initialization code.
Definition:
board.c:317
sw
airborne
boards
tawaki
chibios
v1.1
board.h
Generated on Thu Dec 5 2024 13:05:29 for Paparazzi UAS by
1.9.1