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