aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h')
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h1486
1 files changed, 1486 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h b/lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h
new file mode 100644
index 000000000..228ce8042
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO32_L432KC/board.h
@@ -0,0 +1,1486 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 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/*
18 * This file has been automatically generated using ChibiStudio board
19 * generator plugin. Do not edit manually.
20 */
21
22#ifndef BOARD_H
23#define BOARD_H
24
25/*===========================================================================*/
26/* Driver constants. */
27/*===========================================================================*/
28
29/*
30 * Setup for STMicroelectronics STM32 Nucleo32-L432KC board.
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_ST_NUCLEO32_L432KC
37#define BOARD_NAME "STMicroelectronics STM32 Nucleo32-L432KC"
38
39/*
40 * Board oscillators-related settings.
41 * NOTE: HSE not fitted.
42 */
43#if !defined(STM32_LSECLK)
44#define STM32_LSECLK 32768U
45#endif
46
47#define STM32_LSEDRV (2U << 3U)
48
49#if !defined(STM32_HSECLK)
50#define STM32_HSECLK 0U
51#endif
52
53/*
54 * Board voltages.
55 * Required for performance limits calculation.
56 */
57#define STM32_VDD 300U
58
59/*
60 * MCU type as defined in the ST header.
61 */
62#define STM32L432xx
63
64/*
65 * IO pins assignments.
66 */
67#define GPIOA_ARD_A0 0U
68#define GPIOA_ARD_A1 1U
69#define GPIOA_VCP_TX 2U
70#define GPIOA_ARD_A2 3U
71#define GPIOA_ARD_A3 4U
72#define GPIOA_ARD_A4 5U
73#define GPIOA_ARD_A5 6U
74#define GPIOA_ARD_A6 7U
75#define GPIOA_ARD_D9 8U
76#define GPIOA_ARD_D1 9U
77#define GPIOA_ARD_D0 10U
78#define GPIOA_ARD_D10 11U
79#define GPIOA_ARD_D2 12U
80#define GPIOA_SWDIO 13U
81#define GPIOA_SWCLK 14U
82#define GPIOA_VCP_RX 15U
83
84#define GPIOB_ARD_D3 0U
85#define GPIOB_ARD_D6 1U
86#define GPIOB_PIN2 2U
87#define GPIOB_ARD_D13 3U
88#define GPIOB_LED_GREEN 3U
89#define GPIOB_ARD_D12 4U
90#define GPIOB_ARD_D11 5U
91#define GPIOB_ARD_D5 6U
92#define GPIOB_ARD_A5_ALT 6U
93#define GPIOB_ARD_D4 7U
94#define GPIOB_ARD_A4_ALT 7U
95#define GPIOB_PIN8 8U
96#define GPIOB_PIN9 9U
97#define GPIOB_PIN10 10U
98#define GPIOB_PIN11 11U
99#define GPIOB_PIN12 12U
100#define GPIOB_PIN13 13U
101#define GPIOB_PIN14 14U
102#define GPIOB_PIN15 15U
103
104#define GPIOC_PIN0 0U
105#define GPIOC_PIN1 1U
106#define GPIOC_PIN2 2U
107#define GPIOC_PIN3 3U
108#define GPIOC_PIN4 4U
109#define GPIOC_PIN5 5U
110#define GPIOC_PIN6 6U
111#define GPIOC_PIN7 7U
112#define GPIOC_PIN8 8U
113#define GPIOC_PIN9 9U
114#define GPIOC_PIN10 10U
115#define GPIOC_PIN11 11U
116#define GPIOC_PIN12 12U
117#define GPIOC_PIN13 13U
118#define GPIOC_ARD_D7 14U
119#define GPIOC_ARD_D8 15U
120
121#define GPIOD_PIN0 0U
122#define GPIOD_PIN1 1U
123#define GPIOD_PIN2 2U
124#define GPIOD_PIN3 3U
125#define GPIOD_PIN4 4U
126#define GPIOD_PIN5 5U
127#define GPIOD_PIN6 6U
128#define GPIOD_PIN7 7U
129#define GPIOD_PIN8 8U
130#define GPIOD_PIN9 9U
131#define GPIOD_PIN10 10U
132#define GPIOD_PIN11 11U
133#define GPIOD_PIN12 12U
134#define GPIOD_PIN13 13U
135#define GPIOD_PIN14 14U
136#define GPIOD_PIN15 15U
137
138#define GPIOE_PIN0 0U
139#define GPIOE_PIN1 1U
140#define GPIOE_PIN2 2U
141#define GPIOE_PIN3 3U
142#define GPIOE_PIN4 4U
143#define GPIOE_PIN5 5U
144#define GPIOE_PIN6 6U
145#define GPIOE_PIN7 7U
146#define GPIOE_PIN8 8U
147#define GPIOE_PIN9 9U
148#define GPIOE_PIN10 10U
149#define GPIOE_PIN11 11U
150#define GPIOE_PIN12 12U
151#define GPIOE_PIN13 13U
152#define GPIOE_PIN14 14U
153#define GPIOE_PIN15 15U
154
155#define GPIOF_PIN0 0U
156#define GPIOF_PIN1 1U
157#define GPIOF_PIN2 2U
158#define GPIOF_PIN3 3U
159#define GPIOF_PIN4 4U
160#define GPIOF_PIN5 5U
161#define GPIOF_PIN6 6U
162#define GPIOF_PIN7 7U
163#define GPIOF_PIN8 8U
164#define GPIOF_PIN9 9U
165#define GPIOF_PIN10 10U
166#define GPIOF_PIN11 11U
167#define GPIOF_PIN12 12U
168#define GPIOF_PIN13 13U
169#define GPIOF_PIN14 14U
170#define GPIOF_PIN15 15U
171
172#define GPIOG_PIN0 0U
173#define GPIOG_PIN1 1U
174#define GPIOG_PIN2 2U
175#define GPIOG_PIN3 3U
176#define GPIOG_PIN4 4U
177#define GPIOG_PIN5 5U
178#define GPIOG_PIN6 6U
179#define GPIOG_PIN7 7U
180#define GPIOG_PIN8 8U
181#define GPIOG_PIN9 9U
182#define GPIOG_PIN10 10U
183#define GPIOG_PIN11 11U
184#define GPIOG_PIN12 12U
185#define GPIOG_PIN13 13U
186#define GPIOG_PIN14 14U
187#define GPIOG_PIN15 15U
188
189#define GPIOH_PIN0 0U
190#define GPIOH_PIN1 1U
191#define GPIOH_PIN2 2U
192#define GPIOH_PIN3 3U
193#define GPIOH_PIN4 4U
194#define GPIOH_PIN5 5U
195#define GPIOH_PIN6 6U
196#define GPIOH_PIN7 7U
197#define GPIOH_PIN8 8U
198#define GPIOH_PIN9 9U
199#define GPIOH_PIN10 10U
200#define GPIOH_PIN11 11U
201#define GPIOH_PIN12 12U
202#define GPIOH_PIN13 13U
203#define GPIOH_PIN14 14U
204#define GPIOH_PIN15 15U
205
206/*
207 * IO lines assignments.
208 */
209#define LINE_ARD_A0 PAL_LINE(GPIOA, 0U)
210#define LINE_ARD_A1 PAL_LINE(GPIOA, 1U)
211#define LINE_VCP_TX PAL_LINE(GPIOA, 2U)
212#define LINE_ARD_A2 PAL_LINE(GPIOA, 3U)
213#define LINE_ARD_A3 PAL_LINE(GPIOA, 4U)
214#define LINE_ARD_A4 PAL_LINE(GPIOA, 5U)
215#define LINE_ARD_A5 PAL_LINE(GPIOA, 6U)
216#define LINE_ARD_A6 PAL_LINE(GPIOA, 7U)
217#define LINE_ARD_D9 PAL_LINE(GPIOA, 8U)
218#define LINE_ARD_D1 PAL_LINE(GPIOA, 9U)
219#define LINE_ARD_D0 PAL_LINE(GPIOA, 10U)
220#define LINE_ARD_D10 PAL_LINE(GPIOA, 11U)
221#define LINE_ARD_D2 PAL_LINE(GPIOA, 12U)
222#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
223#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
224#define LINE_VCP_RX PAL_LINE(GPIOA, 15U)
225#define LINE_ARD_D3 PAL_LINE(GPIOB, 0U)
226#define LINE_ARD_D6 PAL_LINE(GPIOB, 1U)
227#define LINE_ARD_D13 PAL_LINE(GPIOB, 3U)
228#define LINE_LED_GREEN PAL_LINE(GPIOB, 3U)
229#define LINE_ARD_D12 PAL_LINE(GPIOB, 4U)
230#define LINE_ARD_D11 PAL_LINE(GPIOB, 5U)
231#define LINE_ARD_D5 PAL_LINE(GPIOB, 6U)
232#define LINE_ARD_A5_ALT PAL_LINE(GPIOB, 6U)
233#define LINE_ARD_D4 PAL_LINE(GPIOB, 7U)
234#define LINE_ARD_A4_ALT PAL_LINE(GPIOB, 7U)
235#define LINE_ARD_D7 PAL_LINE(GPIOC, 14U)
236#define LINE_ARD_D8 PAL_LINE(GPIOC, 15U)
237
238/*===========================================================================*/
239/* Driver pre-compile time settings. */
240/*===========================================================================*/
241
242/*===========================================================================*/
243/* Derived constants and error checks. */
244/*===========================================================================*/
245
246/*===========================================================================*/
247/* Driver data structures and types. */
248/*===========================================================================*/
249
250/*===========================================================================*/
251/* Driver macros. */
252/*===========================================================================*/
253
254/*
255 * I/O ports initial setup, this configuration is established soon after reset
256 * in the initialization code.
257 * Please refer to the STM32 Reference Manual for details.
258 */
259#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
260#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
261#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
262#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
263#define PIN_ODR_LOW(n) (0U << (n))
264#define PIN_ODR_HIGH(n) (1U << (n))
265#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
266#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
267#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
268#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
269#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
270#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
271#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
272#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
273#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
274#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
275#define PIN_ASCR_DISABLED(n) (0U << (n))
276#define PIN_ASCR_ENABLED(n) (1U << (n))
277#define PIN_LOCKR_DISABLED(n) (0U << (n))
278#define PIN_LOCKR_ENABLED(n) (1U << (n))
279
280/*
281 * GPIOA setup:
282 *
283 * PA0 - ARD_A0 (analog).
284 * PA1 - ARD_A1 (analog).
285 * PA2 - VCP_TX (alternate 7).
286 * PA3 - ARD_A2 (analog).
287 * PA4 - ARD_A3 (analog).
288 * PA5 - ARD_A4 (analog).
289 * PA6 - ARD_A5 (analog).
290 * PA7 - ARD_A6 (analog).
291 * PA8 - ARD_D9 (analog).
292 * PA9 - ARD_D1 (analog).
293 * PA10 - ARD_D0 (analog).
294 * PA11 - ARD_D10 (analog).
295 * PA12 - ARD_D2 (analog).
296 * PA13 - SWDIO (alternate 0).
297 * PA14 - SWCLK (alternate 0).
298 * PA15 - VCP_RX (alternate 3).
299 */
300#define VAL_GPIOA_MODER (PIN_MODE_ANALOG(GPIOA_ARD_A0) | \
301 PIN_MODE_ANALOG(GPIOA_ARD_A1) | \
302 PIN_MODE_ALTERNATE(GPIOA_VCP_TX) | \
303 PIN_MODE_ANALOG(GPIOA_ARD_A2) | \
304 PIN_MODE_ANALOG(GPIOA_ARD_A3) | \
305 PIN_MODE_ANALOG(GPIOA_ARD_A4) | \
306 PIN_MODE_ANALOG(GPIOA_ARD_A5) | \
307 PIN_MODE_ANALOG(GPIOA_ARD_A6) | \
308 PIN_MODE_ANALOG(GPIOA_ARD_D9) | \
309 PIN_MODE_ANALOG(GPIOA_ARD_D1) | \
310 PIN_MODE_ANALOG(GPIOA_ARD_D0) | \
311 PIN_MODE_ANALOG(GPIOA_ARD_D10) | \
312 PIN_MODE_ANALOG(GPIOA_ARD_D2) | \
313 PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
314 PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
315 PIN_MODE_ALTERNATE(GPIOA_VCP_RX))
316#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \
317 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | \
318 PIN_OTYPE_PUSHPULL(GPIOA_VCP_TX) | \
319 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | \
320 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A3) | \
321 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A4) | \
322 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A5) | \
323 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A6) | \
324 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D9) | \
325 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | \
326 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | \
327 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D10) | \
328 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | \
329 PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
330 PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
331 PIN_OTYPE_PUSHPULL(GPIOA_VCP_RX))
332#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \
333 PIN_OSPEED_HIGH(GPIOA_ARD_A1) | \
334 PIN_OSPEED_MEDIUM(GPIOA_VCP_TX) | \
335 PIN_OSPEED_MEDIUM(GPIOA_ARD_A2) | \
336 PIN_OSPEED_HIGH(GPIOA_ARD_A3) | \
337 PIN_OSPEED_HIGH(GPIOA_ARD_A4) | \
338 PIN_OSPEED_HIGH(GPIOA_ARD_A5) | \
339 PIN_OSPEED_HIGH(GPIOA_ARD_A6) | \
340 PIN_OSPEED_HIGH(GPIOA_ARD_D9) | \
341 PIN_OSPEED_HIGH(GPIOA_ARD_D1) | \
342 PIN_OSPEED_HIGH(GPIOA_ARD_D0) | \
343 PIN_OSPEED_HIGH(GPIOA_ARD_D10) | \
344 PIN_OSPEED_HIGH(GPIOA_ARD_D2) | \
345 PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
346 PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
347 PIN_OSPEED_HIGH(GPIOA_VCP_RX))
348#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_ARD_A0) | \
349 PIN_PUPDR_FLOATING(GPIOA_ARD_A1) | \
350 PIN_PUPDR_FLOATING(GPIOA_VCP_TX) | \
351 PIN_PUPDR_FLOATING(GPIOA_ARD_A2) | \
352 PIN_PUPDR_FLOATING(GPIOA_ARD_A3) | \
353 PIN_PUPDR_FLOATING(GPIOA_ARD_A4) | \
354 PIN_PUPDR_FLOATING(GPIOA_ARD_A5) | \
355 PIN_PUPDR_FLOATING(GPIOA_ARD_A6) | \
356 PIN_PUPDR_FLOATING(GPIOA_ARD_D9) | \
357 PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | \
358 PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | \
359 PIN_PUPDR_FLOATING(GPIOA_ARD_D10) | \
360 PIN_PUPDR_FLOATING(GPIOA_ARD_D2) | \
361 PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
362 PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
363 PIN_PUPDR_FLOATING(GPIOA_VCP_RX))
364#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | \
365 PIN_ODR_HIGH(GPIOA_ARD_A1) | \
366 PIN_ODR_HIGH(GPIOA_VCP_TX) | \
367 PIN_ODR_HIGH(GPIOA_ARD_A2) | \
368 PIN_ODR_HIGH(GPIOA_ARD_A3) | \
369 PIN_ODR_HIGH(GPIOA_ARD_A4) | \
370 PIN_ODR_HIGH(GPIOA_ARD_A5) | \
371 PIN_ODR_HIGH(GPIOA_ARD_A6) | \
372 PIN_ODR_HIGH(GPIOA_ARD_D9) | \
373 PIN_ODR_HIGH(GPIOA_ARD_D1) | \
374 PIN_ODR_HIGH(GPIOA_ARD_D0) | \
375 PIN_ODR_HIGH(GPIOA_ARD_D10) | \
376 PIN_ODR_HIGH(GPIOA_ARD_D2) | \
377 PIN_ODR_HIGH(GPIOA_SWDIO) | \
378 PIN_ODR_HIGH(GPIOA_SWCLK) | \
379 PIN_ODR_HIGH(GPIOA_VCP_RX))
380#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \
381 PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | \
382 PIN_AFIO_AF(GPIOA_VCP_TX, 7U) | \
383 PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | \
384 PIN_AFIO_AF(GPIOA_ARD_A3, 0U) | \
385 PIN_AFIO_AF(GPIOA_ARD_A4, 0U) | \
386 PIN_AFIO_AF(GPIOA_ARD_A5, 0U) | \
387 PIN_AFIO_AF(GPIOA_ARD_A6, 0U))
388#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D9, 0U) | \
389 PIN_AFIO_AF(GPIOA_ARD_D1, 0U) | \
390 PIN_AFIO_AF(GPIOA_ARD_D0, 0U) | \
391 PIN_AFIO_AF(GPIOA_ARD_D10, 0U) | \
392 PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | \
393 PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
394 PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
395 PIN_AFIO_AF(GPIOA_VCP_RX, 3U))
396#define VAL_GPIOA_ASCR (PIN_ASCR_DISABLED(GPIOA_ARD_A0) | \
397 PIN_ASCR_DISABLED(GPIOA_ARD_A1) | \
398 PIN_ASCR_DISABLED(GPIOA_VCP_TX) | \
399 PIN_ASCR_DISABLED(GPIOA_ARD_A2) | \
400 PIN_ASCR_DISABLED(GPIOA_ARD_A3) | \
401 PIN_ASCR_DISABLED(GPIOA_ARD_A4) | \
402 PIN_ASCR_DISABLED(GPIOA_ARD_A5) | \
403 PIN_ASCR_DISABLED(GPIOA_ARD_A6) | \
404 PIN_ASCR_DISABLED(GPIOA_ARD_D9) | \
405 PIN_ASCR_DISABLED(GPIOA_ARD_D1) | \
406 PIN_ASCR_DISABLED(GPIOA_ARD_D0) | \
407 PIN_ASCR_DISABLED(GPIOA_ARD_D10) | \
408 PIN_ASCR_DISABLED(GPIOA_ARD_D2) | \
409 PIN_ASCR_DISABLED(GPIOA_SWDIO) | \
410 PIN_ASCR_DISABLED(GPIOA_SWCLK) | \
411 PIN_ASCR_DISABLED(GPIOA_VCP_RX))
412#define VAL_GPIOA_LOCKR (PIN_LOCKR_DISABLED(GPIOA_ARD_A0) | \
413 PIN_LOCKR_DISABLED(GPIOA_ARD_A1) | \
414 PIN_LOCKR_DISABLED(GPIOA_VCP_TX) | \
415 PIN_LOCKR_DISABLED(GPIOA_ARD_A2) | \
416 PIN_LOCKR_DISABLED(GPIOA_ARD_A3) | \
417 PIN_LOCKR_DISABLED(GPIOA_ARD_A4) | \
418 PIN_LOCKR_DISABLED(GPIOA_ARD_A5) | \
419 PIN_LOCKR_DISABLED(GPIOA_ARD_A6) | \
420 PIN_LOCKR_DISABLED(GPIOA_ARD_D9) | \
421 PIN_LOCKR_DISABLED(GPIOA_ARD_D1) | \
422 PIN_LOCKR_DISABLED(GPIOA_ARD_D0) | \
423 PIN_LOCKR_DISABLED(GPIOA_ARD_D10) | \
424 PIN_LOCKR_DISABLED(GPIOA_ARD_D2) | \
425 PIN_LOCKR_DISABLED(GPIOA_SWDIO) | \
426 PIN_LOCKR_DISABLED(GPIOA_SWCLK) | \
427 PIN_LOCKR_DISABLED(GPIOA_VCP_RX))
428
429/*
430 * GPIOB setup:
431 *
432 * PB0 - ARD_D3 (input pullup).
433 * PB1 - ARD_D6 (analog).
434 * PB2 - PIN2 (analog).
435 * PB3 - ARD_D13 LED_GREEN (output pushpull maximum).
436 * PB4 - ARD_D12 (analog).
437 * PB5 - ARD_D11 (analog).
438 * PB6 - ARD_D5 ARD_A5_ALT (analog).
439 * PB7 - ARD_D4 ARD_A4_ALT (analog).
440 * PB8 - PIN8 (analog).
441 * PB9 - PIN9 (analog).
442 * PB10 - PIN10 (analog).
443 * PB11 - PIN11 (analog).
444 * PB12 - PIN12 (analog).
445 * PB13 - PIN13 (analog).
446 * PB14 - PIN14 (analog).
447 * PB15 - PIN15 (analog).
448 */
449#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_D3) | \
450 PIN_MODE_ANALOG(GPIOB_ARD_D6) | \
451 PIN_MODE_ANALOG(GPIOB_PIN2) | \
452 PIN_MODE_OUTPUT(GPIOB_ARD_D13) | \
453 PIN_MODE_ANALOG(GPIOB_ARD_D12) | \
454 PIN_MODE_ANALOG(GPIOB_ARD_D11) | \
455 PIN_MODE_ANALOG(GPIOB_ARD_D5) | \
456 PIN_MODE_ANALOG(GPIOB_ARD_D4) | \
457 PIN_MODE_ANALOG(GPIOB_PIN8) | \
458 PIN_MODE_ANALOG(GPIOB_PIN9) | \
459 PIN_MODE_ANALOG(GPIOB_PIN10) | \
460 PIN_MODE_ANALOG(GPIOB_PIN11) | \
461 PIN_MODE_ANALOG(GPIOB_PIN12) | \
462 PIN_MODE_ANALOG(GPIOB_PIN13) | \
463 PIN_MODE_ANALOG(GPIOB_PIN14) | \
464 PIN_MODE_ANALOG(GPIOB_PIN15))
465#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_D3) | \
466 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | \
467 PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
468 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D13) | \
469 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D12) | \
470 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D11) | \
471 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | \
472 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | \
473 PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
474 PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
475 PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
476 PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
477 PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
478 PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \
479 PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \
480 PIN_OTYPE_PUSHPULL(GPIOB_PIN15))
481#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_D3) | \
482 PIN_OSPEED_HIGH(GPIOB_ARD_D6) | \
483 PIN_OSPEED_HIGH(GPIOB_PIN2) | \
484 PIN_OSPEED_HIGH(GPIOB_ARD_D13) | \
485 PIN_OSPEED_HIGH(GPIOB_ARD_D12) | \
486 PIN_OSPEED_HIGH(GPIOB_ARD_D11) | \
487 PIN_OSPEED_HIGH(GPIOB_ARD_D5) | \
488 PIN_OSPEED_HIGH(GPIOB_ARD_D4) | \
489 PIN_OSPEED_HIGH(GPIOB_PIN8) | \
490 PIN_OSPEED_HIGH(GPIOB_PIN9) | \
491 PIN_OSPEED_HIGH(GPIOB_PIN10) | \
492 PIN_OSPEED_HIGH(GPIOB_PIN11) | \
493 PIN_OSPEED_HIGH(GPIOB_PIN12) | \
494 PIN_OSPEED_HIGH(GPIOB_PIN13) | \
495 PIN_OSPEED_HIGH(GPIOB_PIN14) | \
496 PIN_OSPEED_HIGH(GPIOB_PIN15))
497#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_D3) | \
498 PIN_PUPDR_FLOATING(GPIOB_ARD_D6) | \
499 PIN_PUPDR_FLOATING(GPIOB_PIN2) | \
500 PIN_PUPDR_FLOATING(GPIOB_ARD_D13) | \
501 PIN_PUPDR_FLOATING(GPIOB_ARD_D12) | \
502 PIN_PUPDR_FLOATING(GPIOB_ARD_D11) | \
503 PIN_PUPDR_FLOATING(GPIOB_ARD_D5) | \
504 PIN_PUPDR_FLOATING(GPIOB_ARD_D4) | \
505 PIN_PUPDR_FLOATING(GPIOB_PIN8) | \
506 PIN_PUPDR_FLOATING(GPIOB_PIN9) | \
507 PIN_PUPDR_FLOATING(GPIOB_PIN10) | \
508 PIN_PUPDR_FLOATING(GPIOB_PIN11) | \
509 PIN_PUPDR_FLOATING(GPIOB_PIN12) | \
510 PIN_PUPDR_FLOATING(GPIOB_PIN13) | \
511 PIN_PUPDR_FLOATING(GPIOB_PIN14) | \
512 PIN_PUPDR_FLOATING(GPIOB_PIN15))
513#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_D3) | \
514 PIN_ODR_HIGH(GPIOB_ARD_D6) | \
515 PIN_ODR_HIGH(GPIOB_PIN2) | \
516 PIN_ODR_LOW(GPIOB_ARD_D13) | \
517 PIN_ODR_HIGH(GPIOB_ARD_D12) | \
518 PIN_ODR_HIGH(GPIOB_ARD_D11) | \
519 PIN_ODR_HIGH(GPIOB_ARD_D5) | \
520 PIN_ODR_HIGH(GPIOB_ARD_D4) | \
521 PIN_ODR_HIGH(GPIOB_PIN8) | \
522 PIN_ODR_HIGH(GPIOB_PIN9) | \
523 PIN_ODR_HIGH(GPIOB_PIN10) | \
524 PIN_ODR_HIGH(GPIOB_PIN11) | \
525 PIN_ODR_HIGH(GPIOB_PIN12) | \
526 PIN_ODR_HIGH(GPIOB_PIN13) | \
527 PIN_ODR_HIGH(GPIOB_PIN14) | \
528 PIN_ODR_HIGH(GPIOB_PIN15))
529#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_D3, 0U) | \
530 PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | \
531 PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
532 PIN_AFIO_AF(GPIOB_ARD_D13, 0U) | \
533 PIN_AFIO_AF(GPIOB_ARD_D12, 0U) | \
534 PIN_AFIO_AF(GPIOB_ARD_D11, 0U) | \
535 PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | \
536 PIN_AFIO_AF(GPIOB_ARD_D4, 0U))
537#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
538 PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
539 PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
540 PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
541 PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
542 PIN_AFIO_AF(GPIOB_PIN13, 0U) | \
543 PIN_AFIO_AF(GPIOB_PIN14, 0U) | \
544 PIN_AFIO_AF(GPIOB_PIN15, 0U))
545#define VAL_GPIOB_ASCR (PIN_ASCR_DISABLED(GPIOB_ARD_D3) | \
546 PIN_ASCR_DISABLED(GPIOB_ARD_D6) | \
547 PIN_ASCR_DISABLED(GPIOB_PIN2) | \
548 PIN_ASCR_DISABLED(GPIOB_ARD_D13) | \
549 PIN_ASCR_DISABLED(GPIOB_ARD_D12) | \
550 PIN_ASCR_DISABLED(GPIOB_ARD_D11) | \
551 PIN_ASCR_DISABLED(GPIOB_ARD_D5) | \
552 PIN_ASCR_DISABLED(GPIOB_ARD_D4) | \
553 PIN_ASCR_DISABLED(GPIOB_PIN8) | \
554 PIN_ASCR_DISABLED(GPIOB_PIN9) | \
555 PIN_ASCR_DISABLED(GPIOB_PIN10) | \
556 PIN_ASCR_DISABLED(GPIOB_PIN11) | \
557 PIN_ASCR_DISABLED(GPIOB_PIN12) | \
558 PIN_ASCR_DISABLED(GPIOB_PIN13) | \
559 PIN_ASCR_DISABLED(GPIOB_PIN14) | \
560 PIN_ASCR_DISABLED(GPIOB_PIN15))
561#define VAL_GPIOB_LOCKR (PIN_LOCKR_DISABLED(GPIOB_ARD_D3) | \
562 PIN_LOCKR_DISABLED(GPIOB_ARD_D6) | \
563 PIN_LOCKR_DISABLED(GPIOB_PIN2) | \
564 PIN_LOCKR_DISABLED(GPIOB_ARD_D13) | \
565 PIN_LOCKR_DISABLED(GPIOB_ARD_D12) | \
566 PIN_LOCKR_DISABLED(GPIOB_ARD_D11) | \
567 PIN_LOCKR_DISABLED(GPIOB_ARD_D5) | \
568 PIN_LOCKR_DISABLED(GPIOB_ARD_D4) | \
569 PIN_LOCKR_DISABLED(GPIOB_PIN8) | \
570 PIN_LOCKR_DISABLED(GPIOB_PIN9) | \
571 PIN_LOCKR_DISABLED(GPIOB_PIN10) | \
572 PIN_LOCKR_DISABLED(GPIOB_PIN11) | \
573 PIN_LOCKR_DISABLED(GPIOB_PIN12) | \
574 PIN_LOCKR_DISABLED(GPIOB_PIN13) | \
575 PIN_LOCKR_DISABLED(GPIOB_PIN14) | \
576 PIN_LOCKR_DISABLED(GPIOB_PIN15))
577
578/*
579 * GPIOC setup:
580 *
581 * PC0 - PIN0 (analog).
582 * PC1 - PIN1 (analog).
583 * PC2 - PIN2 (analog).
584 * PC3 - PIN3 (analog).
585 * PC4 - PIN4 (analog).
586 * PC5 - PIN5 (analog).
587 * PC6 - PIN6 (analog).
588 * PC7 - PIN7 (analog).
589 * PC8 - PIN8 (analog).
590 * PC9 - PIN9 (analog).
591 * PC10 - PIN10 (analog).
592 * PC11 - PIN11 (analog).
593 * PC12 - PIN12 (analog).
594 * PC13 - PIN13 (analog).
595 * PC14 - ARD_D7 (analog).
596 * PC15 - ARD_D8 (analog).
597 */
598#define VAL_GPIOC_MODER (PIN_MODE_ANALOG(GPIOC_PIN0) | \
599 PIN_MODE_ANALOG(GPIOC_PIN1) | \
600 PIN_MODE_ANALOG(GPIOC_PIN2) | \
601 PIN_MODE_ANALOG(GPIOC_PIN3) | \
602 PIN_MODE_ANALOG(GPIOC_PIN4) | \
603 PIN_MODE_ANALOG(GPIOC_PIN5) | \
604 PIN_MODE_ANALOG(GPIOC_PIN6) | \
605 PIN_MODE_ANALOG(GPIOC_PIN7) | \
606 PIN_MODE_ANALOG(GPIOC_PIN8) | \
607 PIN_MODE_ANALOG(GPIOC_PIN9) | \
608 PIN_MODE_ANALOG(GPIOC_PIN10) | \
609 PIN_MODE_ANALOG(GPIOC_PIN11) | \
610 PIN_MODE_ANALOG(GPIOC_PIN12) | \
611 PIN_MODE_ANALOG(GPIOC_PIN13) | \
612 PIN_MODE_ANALOG(GPIOC_ARD_D7) | \
613 PIN_MODE_ANALOG(GPIOC_ARD_D8))
614#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \
615 PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
616 PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
617 PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
618 PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
619 PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
620 PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \
621 PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \
622 PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \
623 PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \
624 PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
625 PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
626 PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
627 PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
628 PIN_OTYPE_PUSHPULL(GPIOC_ARD_D7) | \
629 PIN_OTYPE_PUSHPULL(GPIOC_ARD_D8))
630#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \
631 PIN_OSPEED_HIGH(GPIOC_PIN1) | \
632 PIN_OSPEED_HIGH(GPIOC_PIN2) | \
633 PIN_OSPEED_HIGH(GPIOC_PIN3) | \
634 PIN_OSPEED_HIGH(GPIOC_PIN4) | \
635 PIN_OSPEED_HIGH(GPIOC_PIN5) | \
636 PIN_OSPEED_HIGH(GPIOC_PIN6) | \
637 PIN_OSPEED_HIGH(GPIOC_PIN7) | \
638 PIN_OSPEED_HIGH(GPIOC_PIN8) | \
639 PIN_OSPEED_HIGH(GPIOC_PIN9) | \
640 PIN_OSPEED_HIGH(GPIOC_PIN10) | \
641 PIN_OSPEED_HIGH(GPIOC_PIN11) | \
642 PIN_OSPEED_HIGH(GPIOC_PIN12) | \
643 PIN_OSPEED_HIGH(GPIOC_PIN13) | \
644 PIN_OSPEED_HIGH(GPIOC_ARD_D7) | \
645 PIN_OSPEED_HIGH(GPIOC_ARD_D8))
646#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_PIN0) | \
647 PIN_PUPDR_FLOATING(GPIOC_PIN1) | \
648 PIN_PUPDR_FLOATING(GPIOC_PIN2) | \
649 PIN_PUPDR_FLOATING(GPIOC_PIN3) | \
650 PIN_PUPDR_FLOATING(GPIOC_PIN4) | \
651 PIN_PUPDR_FLOATING(GPIOC_PIN5) | \
652 PIN_PUPDR_FLOATING(GPIOC_PIN6) | \
653 PIN_PUPDR_FLOATING(GPIOC_PIN7) | \
654 PIN_PUPDR_FLOATING(GPIOC_PIN8) | \
655 PIN_PUPDR_FLOATING(GPIOC_PIN9) | \
656 PIN_PUPDR_FLOATING(GPIOC_PIN10) | \
657 PIN_PUPDR_FLOATING(GPIOC_PIN11) | \
658 PIN_PUPDR_FLOATING(GPIOC_PIN12) | \
659 PIN_PUPDR_FLOATING(GPIOC_PIN13) | \
660 PIN_PUPDR_FLOATING(GPIOC_ARD_D7) | \
661 PIN_PUPDR_FLOATING(GPIOC_ARD_D8))
662#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \
663 PIN_ODR_HIGH(GPIOC_PIN1) | \
664 PIN_ODR_HIGH(GPIOC_PIN2) | \
665 PIN_ODR_HIGH(GPIOC_PIN3) | \
666 PIN_ODR_HIGH(GPIOC_PIN4) | \
667 PIN_ODR_HIGH(GPIOC_PIN5) | \
668 PIN_ODR_HIGH(GPIOC_PIN6) | \
669 PIN_ODR_HIGH(GPIOC_PIN7) | \
670 PIN_ODR_HIGH(GPIOC_PIN8) | \
671 PIN_ODR_HIGH(GPIOC_PIN9) | \
672 PIN_ODR_HIGH(GPIOC_PIN10) | \
673 PIN_ODR_HIGH(GPIOC_PIN11) | \
674 PIN_ODR_HIGH(GPIOC_PIN12) | \
675 PIN_ODR_HIGH(GPIOC_PIN13) | \
676 PIN_ODR_HIGH(GPIOC_ARD_D7) | \
677 PIN_ODR_HIGH(GPIOC_ARD_D8))
678#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0U) | \
679 PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
680 PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
681 PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
682 PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
683 PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
684 PIN_AFIO_AF(GPIOC_PIN6, 0U) | \
685 PIN_AFIO_AF(GPIOC_PIN7, 0U))
686#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \
687 PIN_AFIO_AF(GPIOC_PIN9, 0U) | \
688 PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
689 PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
690 PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
691 PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
692 PIN_AFIO_AF(GPIOC_ARD_D7, 0U) | \
693 PIN_AFIO_AF(GPIOC_ARD_D8, 0U))
694#define VAL_GPIOC_ASCR (PIN_ASCR_DISABLED(GPIOC_PIN0) | \
695 PIN_ASCR_DISABLED(GPIOC_PIN1) | \
696 PIN_ASCR_DISABLED(GPIOC_PIN2) | \
697 PIN_ASCR_DISABLED(GPIOC_PIN3) | \
698 PIN_ASCR_DISABLED(GPIOC_PIN4) | \
699 PIN_ASCR_DISABLED(GPIOC_PIN5) | \
700 PIN_ASCR_DISABLED(GPIOC_PIN6) | \
701 PIN_ASCR_DISABLED(GPIOC_PIN7) | \
702 PIN_ASCR_DISABLED(GPIOC_PIN8) | \
703 PIN_ASCR_DISABLED(GPIOC_PIN9) | \
704 PIN_ASCR_DISABLED(GPIOC_PIN10) | \
705 PIN_ASCR_DISABLED(GPIOC_PIN11) | \
706 PIN_ASCR_DISABLED(GPIOC_PIN12) | \
707 PIN_ASCR_DISABLED(GPIOC_PIN13) | \
708 PIN_ASCR_DISABLED(GPIOC_ARD_D7) | \
709 PIN_ASCR_DISABLED(GPIOC_ARD_D8))
710#define VAL_GPIOC_LOCKR (PIN_LOCKR_DISABLED(GPIOC_PIN0) | \
711 PIN_LOCKR_DISABLED(GPIOC_PIN1) | \
712 PIN_LOCKR_DISABLED(GPIOC_PIN2) | \
713 PIN_LOCKR_DISABLED(GPIOC_PIN3) | \
714 PIN_LOCKR_DISABLED(GPIOC_PIN4) | \
715 PIN_LOCKR_DISABLED(GPIOC_PIN5) | \
716 PIN_LOCKR_DISABLED(GPIOC_PIN6) | \
717 PIN_LOCKR_DISABLED(GPIOC_PIN7) | \
718 PIN_LOCKR_DISABLED(GPIOC_PIN8) | \
719 PIN_LOCKR_DISABLED(GPIOC_PIN9) | \
720 PIN_LOCKR_DISABLED(GPIOC_PIN10) | \
721 PIN_LOCKR_DISABLED(GPIOC_PIN11) | \
722 PIN_LOCKR_DISABLED(GPIOC_PIN12) | \
723 PIN_LOCKR_DISABLED(GPIOC_PIN13) | \
724 PIN_LOCKR_DISABLED(GPIOC_ARD_D7) | \
725 PIN_LOCKR_DISABLED(GPIOC_ARD_D8))
726
727/*
728 * GPIOD setup:
729 *
730 * PD0 - PIN0 (analog).
731 * PD1 - PIN1 (analog).
732 * PD2 - PIN2 (analog).
733 * PD3 - PIN3 (analog).
734 * PD4 - PIN4 (analog).
735 * PD5 - PIN5 (analog).
736 * PD6 - PIN6 (analog).
737 * PD7 - PIN7 (analog).
738 * PD8 - PIN8 (analog).
739 * PD9 - PIN9 (analog).
740 * PD10 - PIN10 (analog).
741 * PD11 - PIN11 (analog).
742 * PD12 - PIN12 (analog).
743 * PD13 - PIN13 (analog).
744 * PD14 - PIN14 (analog).
745 * PD15 - PIN15 (analog).
746 */
747#define VAL_GPIOD_MODER (PIN_MODE_ANALOG(GPIOD_PIN0) | \
748 PIN_MODE_ANALOG(GPIOD_PIN1) | \
749 PIN_MODE_ANALOG(GPIOD_PIN2) | \
750 PIN_MODE_ANALOG(GPIOD_PIN3) | \
751 PIN_MODE_ANALOG(GPIOD_PIN4) | \
752 PIN_MODE_ANALOG(GPIOD_PIN5) | \
753 PIN_MODE_ANALOG(GPIOD_PIN6) | \
754 PIN_MODE_ANALOG(GPIOD_PIN7) | \
755 PIN_MODE_ANALOG(GPIOD_PIN8) | \
756 PIN_MODE_ANALOG(GPIOD_PIN9) | \
757 PIN_MODE_ANALOG(GPIOD_PIN10) | \
758 PIN_MODE_ANALOG(GPIOD_PIN11) | \
759 PIN_MODE_ANALOG(GPIOD_PIN12) | \
760 PIN_MODE_ANALOG(GPIOD_PIN13) | \
761 PIN_MODE_ANALOG(GPIOD_PIN14) | \
762 PIN_MODE_ANALOG(GPIOD_PIN15))
763#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
764 PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
765 PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
766 PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
767 PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
768 PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
769 PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
770 PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
771 PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
772 PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
773 PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
774 PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
775 PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
776 PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
777 PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
778 PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
779#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \
780 PIN_OSPEED_HIGH(GPIOD_PIN1) | \
781 PIN_OSPEED_HIGH(GPIOD_PIN2) | \
782 PIN_OSPEED_HIGH(GPIOD_PIN3) | \
783 PIN_OSPEED_HIGH(GPIOD_PIN4) | \
784 PIN_OSPEED_HIGH(GPIOD_PIN5) | \
785 PIN_OSPEED_HIGH(GPIOD_PIN6) | \
786 PIN_OSPEED_HIGH(GPIOD_PIN7) | \
787 PIN_OSPEED_HIGH(GPIOD_PIN8) | \
788 PIN_OSPEED_HIGH(GPIOD_PIN9) | \
789 PIN_OSPEED_HIGH(GPIOD_PIN10) | \
790 PIN_OSPEED_HIGH(GPIOD_PIN11) | \
791 PIN_OSPEED_HIGH(GPIOD_PIN12) | \
792 PIN_OSPEED_HIGH(GPIOD_PIN13) | \
793 PIN_OSPEED_HIGH(GPIOD_PIN14) | \
794 PIN_OSPEED_HIGH(GPIOD_PIN15))
795#define VAL_GPIOD_PUPDR (PIN_PUPDR_FLOATING(GPIOD_PIN0) | \
796 PIN_PUPDR_FLOATING(GPIOD_PIN1) | \
797 PIN_PUPDR_FLOATING(GPIOD_PIN2) | \
798 PIN_PUPDR_FLOATING(GPIOD_PIN3) | \
799 PIN_PUPDR_FLOATING(GPIOD_PIN4) | \
800 PIN_PUPDR_FLOATING(GPIOD_PIN5) | \
801 PIN_PUPDR_FLOATING(GPIOD_PIN6) | \
802 PIN_PUPDR_FLOATING(GPIOD_PIN7) | \
803 PIN_PUPDR_FLOATING(GPIOD_PIN8) | \
804 PIN_PUPDR_FLOATING(GPIOD_PIN9) | \
805 PIN_PUPDR_FLOATING(GPIOD_PIN10) | \
806 PIN_PUPDR_FLOATING(GPIOD_PIN11) | \
807 PIN_PUPDR_FLOATING(GPIOD_PIN12) | \
808 PIN_PUPDR_FLOATING(GPIOD_PIN13) | \
809 PIN_PUPDR_FLOATING(GPIOD_PIN14) | \
810 PIN_PUPDR_FLOATING(GPIOD_PIN15))
811#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
812 PIN_ODR_HIGH(GPIOD_PIN1) | \
813 PIN_ODR_HIGH(GPIOD_PIN2) | \
814 PIN_ODR_HIGH(GPIOD_PIN3) | \
815 PIN_ODR_HIGH(GPIOD_PIN4) | \
816 PIN_ODR_HIGH(GPIOD_PIN5) | \
817 PIN_ODR_HIGH(GPIOD_PIN6) | \
818 PIN_ODR_HIGH(GPIOD_PIN7) | \
819 PIN_ODR_HIGH(GPIOD_PIN8) | \
820 PIN_ODR_HIGH(GPIOD_PIN9) | \
821 PIN_ODR_HIGH(GPIOD_PIN10) | \
822 PIN_ODR_HIGH(GPIOD_PIN11) | \
823 PIN_ODR_HIGH(GPIOD_PIN12) | \
824 PIN_ODR_HIGH(GPIOD_PIN13) | \
825 PIN_ODR_HIGH(GPIOD_PIN14) | \
826 PIN_ODR_HIGH(GPIOD_PIN15))
827#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
828 PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
829 PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
830 PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
831 PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
832 PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
833 PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
834 PIN_AFIO_AF(GPIOD_PIN7, 0U))
835#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
836 PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
837 PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
838 PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
839 PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
840 PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
841 PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
842 PIN_AFIO_AF(GPIOD_PIN15, 0U))
843#define VAL_GPIOD_ASCR (PIN_ASCR_DISABLED(GPIOD_PIN0) | \
844 PIN_ASCR_DISABLED(GPIOD_PIN1) | \
845 PIN_ASCR_DISABLED(GPIOD_PIN2) | \
846 PIN_ASCR_DISABLED(GPIOD_PIN3) | \
847 PIN_ASCR_DISABLED(GPIOD_PIN4) | \
848 PIN_ASCR_DISABLED(GPIOD_PIN5) | \
849 PIN_ASCR_DISABLED(GPIOD_PIN6) | \
850 PIN_ASCR_DISABLED(GPIOD_PIN7) | \
851 PIN_ASCR_DISABLED(GPIOD_PIN8) | \
852 PIN_ASCR_DISABLED(GPIOD_PIN9) | \
853 PIN_ASCR_DISABLED(GPIOD_PIN10) | \
854 PIN_ASCR_DISABLED(GPIOD_PIN11) | \
855 PIN_ASCR_DISABLED(GPIOD_PIN12) | \
856 PIN_ASCR_DISABLED(GPIOD_PIN13) | \
857 PIN_ASCR_DISABLED(GPIOD_PIN14) | \
858 PIN_ASCR_DISABLED(GPIOD_PIN15))
859#define VAL_GPIOD_LOCKR (PIN_LOCKR_DISABLED(GPIOD_PIN0) | \
860 PIN_LOCKR_DISABLED(GPIOD_PIN1) | \
861 PIN_LOCKR_DISABLED(GPIOD_PIN2) | \
862 PIN_LOCKR_DISABLED(GPIOD_PIN3) | \
863 PIN_LOCKR_DISABLED(GPIOD_PIN4) | \
864 PIN_LOCKR_DISABLED(GPIOD_PIN5) | \
865 PIN_LOCKR_DISABLED(GPIOD_PIN6) | \
866 PIN_LOCKR_DISABLED(GPIOD_PIN7) | \
867 PIN_LOCKR_DISABLED(GPIOD_PIN8) | \
868 PIN_LOCKR_DISABLED(GPIOD_PIN9) | \
869 PIN_LOCKR_DISABLED(GPIOD_PIN10) | \
870 PIN_LOCKR_DISABLED(GPIOD_PIN11) | \
871 PIN_LOCKR_DISABLED(GPIOD_PIN12) | \
872 PIN_LOCKR_DISABLED(GPIOD_PIN13) | \
873 PIN_LOCKR_DISABLED(GPIOD_PIN14) | \
874 PIN_LOCKR_DISABLED(GPIOD_PIN15))
875
876/*
877 * GPIOE setup:
878 *
879 * PE0 - PIN0 (analog).
880 * PE1 - PIN1 (analog).
881 * PE2 - PIN2 (analog).
882 * PE3 - PIN3 (analog).
883 * PE4 - PIN4 (analog).
884 * PE5 - PIN5 (analog).
885 * PE6 - PIN6 (analog).
886 * PE7 - PIN7 (analog).
887 * PE8 - PIN8 (analog).
888 * PE9 - PIN9 (analog).
889 * PE10 - PIN10 (analog).
890 * PE11 - PIN11 (analog).
891 * PE12 - PIN12 (analog).
892 * PE13 - PIN13 (analog).
893 * PE14 - PIN14 (analog).
894 * PE15 - PIN15 (analog).
895 */
896#define VAL_GPIOE_MODER (PIN_MODE_ANALOG(GPIOE_PIN0) | \
897 PIN_MODE_ANALOG(GPIOE_PIN1) | \
898 PIN_MODE_ANALOG(GPIOE_PIN2) | \
899 PIN_MODE_ANALOG(GPIOE_PIN3) | \
900 PIN_MODE_ANALOG(GPIOE_PIN4) | \
901 PIN_MODE_ANALOG(GPIOE_PIN5) | \
902 PIN_MODE_ANALOG(GPIOE_PIN6) | \
903 PIN_MODE_ANALOG(GPIOE_PIN7) | \
904 PIN_MODE_ANALOG(GPIOE_PIN8) | \
905 PIN_MODE_ANALOG(GPIOE_PIN9) | \
906 PIN_MODE_ANALOG(GPIOE_PIN10) | \
907 PIN_MODE_ANALOG(GPIOE_PIN11) | \
908 PIN_MODE_ANALOG(GPIOE_PIN12) | \
909 PIN_MODE_ANALOG(GPIOE_PIN13) | \
910 PIN_MODE_ANALOG(GPIOE_PIN14) | \
911 PIN_MODE_ANALOG(GPIOE_PIN15))
912#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
913 PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
914 PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
915 PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
916 PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
917 PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
918 PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
919 PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
920 PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
921 PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
922 PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
923 PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
924 PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
925 PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
926 PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
927 PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
928#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | \
929 PIN_OSPEED_HIGH(GPIOE_PIN1) | \
930 PIN_OSPEED_HIGH(GPIOE_PIN2) | \
931 PIN_OSPEED_HIGH(GPIOE_PIN3) | \
932 PIN_OSPEED_HIGH(GPIOE_PIN4) | \
933 PIN_OSPEED_HIGH(GPIOE_PIN5) | \
934 PIN_OSPEED_HIGH(GPIOE_PIN6) | \
935 PIN_OSPEED_HIGH(GPIOE_PIN7) | \
936 PIN_OSPEED_HIGH(GPIOE_PIN8) | \
937 PIN_OSPEED_HIGH(GPIOE_PIN9) | \
938 PIN_OSPEED_HIGH(GPIOE_PIN10) | \
939 PIN_OSPEED_HIGH(GPIOE_PIN11) | \
940 PIN_OSPEED_HIGH(GPIOE_PIN12) | \
941 PIN_OSPEED_HIGH(GPIOE_PIN13) | \
942 PIN_OSPEED_HIGH(GPIOE_PIN14) | \
943 PIN_OSPEED_HIGH(GPIOE_PIN15))
944#define VAL_GPIOE_PUPDR (PIN_PUPDR_FLOATING(GPIOE_PIN0) | \
945 PIN_PUPDR_FLOATING(GPIOE_PIN1) | \
946 PIN_PUPDR_FLOATING(GPIOE_PIN2) | \
947 PIN_PUPDR_FLOATING(GPIOE_PIN3) | \
948 PIN_PUPDR_FLOATING(GPIOE_PIN4) | \
949 PIN_PUPDR_FLOATING(GPIOE_PIN5) | \
950 PIN_PUPDR_FLOATING(GPIOE_PIN6) | \
951 PIN_PUPDR_FLOATING(GPIOE_PIN7) | \
952 PIN_PUPDR_FLOATING(GPIOE_PIN8) | \
953 PIN_PUPDR_FLOATING(GPIOE_PIN9) | \
954 PIN_PUPDR_FLOATING(GPIOE_PIN10) | \
955 PIN_PUPDR_FLOATING(GPIOE_PIN11) | \
956 PIN_PUPDR_FLOATING(GPIOE_PIN12) | \
957 PIN_PUPDR_FLOATING(GPIOE_PIN13) | \
958 PIN_PUPDR_FLOATING(GPIOE_PIN14) | \
959 PIN_PUPDR_FLOATING(GPIOE_PIN15))
960#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
961 PIN_ODR_HIGH(GPIOE_PIN1) | \
962 PIN_ODR_HIGH(GPIOE_PIN2) | \
963 PIN_ODR_HIGH(GPIOE_PIN3) | \
964 PIN_ODR_HIGH(GPIOE_PIN4) | \
965 PIN_ODR_HIGH(GPIOE_PIN5) | \
966 PIN_ODR_HIGH(GPIOE_PIN6) | \
967 PIN_ODR_HIGH(GPIOE_PIN7) | \
968 PIN_ODR_HIGH(GPIOE_PIN8) | \
969 PIN_ODR_HIGH(GPIOE_PIN9) | \
970 PIN_ODR_HIGH(GPIOE_PIN10) | \
971 PIN_ODR_HIGH(GPIOE_PIN11) | \
972 PIN_ODR_HIGH(GPIOE_PIN12) | \
973 PIN_ODR_HIGH(GPIOE_PIN13) | \
974 PIN_ODR_HIGH(GPIOE_PIN14) | \
975 PIN_ODR_HIGH(GPIOE_PIN15))
976#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
977 PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
978 PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
979 PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
980 PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
981 PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
982 PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
983 PIN_AFIO_AF(GPIOE_PIN7, 0U))
984#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
985 PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
986 PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
987 PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
988 PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
989 PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
990 PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
991 PIN_AFIO_AF(GPIOE_PIN15, 0U))
992#define VAL_GPIOE_ASCR (PIN_ASCR_DISABLED(GPIOE_PIN0) | \
993 PIN_ASCR_DISABLED(GPIOE_PIN1) | \
994 PIN_ASCR_DISABLED(GPIOE_PIN2) | \
995 PIN_ASCR_DISABLED(GPIOE_PIN3) | \
996 PIN_ASCR_DISABLED(GPIOE_PIN4) | \
997 PIN_ASCR_DISABLED(GPIOE_PIN5) | \
998 PIN_ASCR_DISABLED(GPIOE_PIN6) | \
999 PIN_ASCR_DISABLED(GPIOE_PIN7) | \
1000 PIN_ASCR_DISABLED(GPIOE_PIN8) | \
1001 PIN_ASCR_DISABLED(GPIOE_PIN9) | \
1002 PIN_ASCR_DISABLED(GPIOE_PIN10) | \
1003 PIN_ASCR_DISABLED(GPIOE_PIN11) | \
1004 PIN_ASCR_DISABLED(GPIOE_PIN12) | \
1005 PIN_ASCR_DISABLED(GPIOE_PIN13) | \
1006 PIN_ASCR_DISABLED(GPIOE_PIN14) | \
1007 PIN_ASCR_DISABLED(GPIOE_PIN15))
1008#define VAL_GPIOE_LOCKR (PIN_LOCKR_DISABLED(GPIOE_PIN0) | \
1009 PIN_LOCKR_DISABLED(GPIOE_PIN1) | \
1010 PIN_LOCKR_DISABLED(GPIOE_PIN2) | \
1011 PIN_LOCKR_DISABLED(GPIOE_PIN3) | \
1012 PIN_LOCKR_DISABLED(GPIOE_PIN4) | \
1013 PIN_LOCKR_DISABLED(GPIOE_PIN5) | \
1014 PIN_LOCKR_DISABLED(GPIOE_PIN6) | \
1015 PIN_LOCKR_DISABLED(GPIOE_PIN7) | \
1016 PIN_LOCKR_DISABLED(GPIOE_PIN8) | \
1017 PIN_LOCKR_DISABLED(GPIOE_PIN9) | \
1018 PIN_LOCKR_DISABLED(GPIOE_PIN10) | \
1019 PIN_LOCKR_DISABLED(GPIOE_PIN11) | \
1020 PIN_LOCKR_DISABLED(GPIOE_PIN12) | \
1021 PIN_LOCKR_DISABLED(GPIOE_PIN13) | \
1022 PIN_LOCKR_DISABLED(GPIOE_PIN14) | \
1023 PIN_LOCKR_DISABLED(GPIOE_PIN15))
1024
1025/*
1026 * GPIOF setup:
1027 *
1028 * PF0 - PIN0 (analog).
1029 * PF1 - PIN1 (analog).
1030 * PF2 - PIN2 (analog).
1031 * PF3 - PIN3 (analog).
1032 * PF4 - PIN4 (analog).
1033 * PF5 - PIN5 (analog).
1034 * PF6 - PIN6 (analog).
1035 * PF7 - PIN7 (analog).
1036 * PF8 - PIN8 (analog).
1037 * PF9 - PIN9 (analog).
1038 * PF10 - PIN10 (analog).
1039 * PF11 - PIN11 (analog).
1040 * PF12 - PIN12 (analog).
1041 * PF13 - PIN13 (analog).
1042 * PF14 - PIN14 (analog).
1043 * PF15 - PIN15 (analog).
1044 */
1045#define VAL_GPIOF_MODER (PIN_MODE_ANALOG(GPIOF_PIN0) | \
1046 PIN_MODE_ANALOG(GPIOF_PIN1) | \
1047 PIN_MODE_ANALOG(GPIOF_PIN2) | \
1048 PIN_MODE_ANALOG(GPIOF_PIN3) | \
1049 PIN_MODE_ANALOG(GPIOF_PIN4) | \
1050 PIN_MODE_ANALOG(GPIOF_PIN5) | \
1051 PIN_MODE_ANALOG(GPIOF_PIN6) | \
1052 PIN_MODE_ANALOG(GPIOF_PIN7) | \
1053 PIN_MODE_ANALOG(GPIOF_PIN8) | \
1054 PIN_MODE_ANALOG(GPIOF_PIN9) | \
1055 PIN_MODE_ANALOG(GPIOF_PIN10) | \
1056 PIN_MODE_ANALOG(GPIOF_PIN11) | \
1057 PIN_MODE_ANALOG(GPIOF_PIN12) | \
1058 PIN_MODE_ANALOG(GPIOF_PIN13) | \
1059 PIN_MODE_ANALOG(GPIOF_PIN14) | \
1060 PIN_MODE_ANALOG(GPIOF_PIN15))
1061#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \
1062 PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \
1063 PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
1064 PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
1065 PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
1066 PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
1067 PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
1068 PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
1069 PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
1070 PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
1071 PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
1072 PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
1073 PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
1074 PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
1075 PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
1076 PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
1077#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | \
1078 PIN_OSPEED_HIGH(GPIOF_PIN1) | \
1079 PIN_OSPEED_HIGH(GPIOF_PIN2) | \
1080 PIN_OSPEED_HIGH(GPIOF_PIN3) | \
1081 PIN_OSPEED_HIGH(GPIOF_PIN4) | \
1082 PIN_OSPEED_HIGH(GPIOF_PIN5) | \
1083 PIN_OSPEED_HIGH(GPIOF_PIN6) | \
1084 PIN_OSPEED_HIGH(GPIOF_PIN7) | \
1085 PIN_OSPEED_HIGH(GPIOF_PIN8) | \
1086 PIN_OSPEED_HIGH(GPIOF_PIN9) | \
1087 PIN_OSPEED_HIGH(GPIOF_PIN10) | \
1088 PIN_OSPEED_HIGH(GPIOF_PIN11) | \
1089 PIN_OSPEED_HIGH(GPIOF_PIN12) | \
1090 PIN_OSPEED_HIGH(GPIOF_PIN13) | \
1091 PIN_OSPEED_HIGH(GPIOF_PIN14) | \
1092 PIN_OSPEED_HIGH(GPIOF_PIN15))
1093#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_PIN0) | \
1094 PIN_PUPDR_FLOATING(GPIOF_PIN1) | \
1095 PIN_PUPDR_FLOATING(GPIOF_PIN2) | \
1096 PIN_PUPDR_FLOATING(GPIOF_PIN3) | \
1097 PIN_PUPDR_FLOATING(GPIOF_PIN4) | \
1098 PIN_PUPDR_FLOATING(GPIOF_PIN5) | \
1099 PIN_PUPDR_FLOATING(GPIOF_PIN6) | \
1100 PIN_PUPDR_FLOATING(GPIOF_PIN7) | \
1101 PIN_PUPDR_FLOATING(GPIOF_PIN8) | \
1102 PIN_PUPDR_FLOATING(GPIOF_PIN9) | \
1103 PIN_PUPDR_FLOATING(GPIOF_PIN10) | \
1104 PIN_PUPDR_FLOATING(GPIOF_PIN11) | \
1105 PIN_PUPDR_FLOATING(GPIOF_PIN12) | \
1106 PIN_PUPDR_FLOATING(GPIOF_PIN13) | \
1107 PIN_PUPDR_FLOATING(GPIOF_PIN14) | \
1108 PIN_PUPDR_FLOATING(GPIOF_PIN15))
1109#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \
1110 PIN_ODR_HIGH(GPIOF_PIN1) | \
1111 PIN_ODR_HIGH(GPIOF_PIN2) | \
1112 PIN_ODR_HIGH(GPIOF_PIN3) | \
1113 PIN_ODR_HIGH(GPIOF_PIN4) | \
1114 PIN_ODR_HIGH(GPIOF_PIN5) | \
1115 PIN_ODR_HIGH(GPIOF_PIN6) | \
1116 PIN_ODR_HIGH(GPIOF_PIN7) | \
1117 PIN_ODR_HIGH(GPIOF_PIN8) | \
1118 PIN_ODR_HIGH(GPIOF_PIN9) | \
1119 PIN_ODR_HIGH(GPIOF_PIN10) | \
1120 PIN_ODR_HIGH(GPIOF_PIN11) | \
1121 PIN_ODR_HIGH(GPIOF_PIN12) | \
1122 PIN_ODR_HIGH(GPIOF_PIN13) | \
1123 PIN_ODR_HIGH(GPIOF_PIN14) | \
1124 PIN_ODR_HIGH(GPIOF_PIN15))
1125#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \
1126 PIN_AFIO_AF(GPIOF_PIN1, 0U) | \
1127 PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
1128 PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
1129 PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
1130 PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
1131 PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
1132 PIN_AFIO_AF(GPIOF_PIN7, 0U))
1133#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
1134 PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
1135 PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
1136 PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
1137 PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
1138 PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
1139 PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
1140 PIN_AFIO_AF(GPIOF_PIN15, 0U))
1141#define VAL_GPIOF_ASCR (PIN_ASCR_DISABLED(GPIOF_PIN0) | \
1142 PIN_ASCR_DISABLED(GPIOF_PIN1) | \
1143 PIN_ASCR_DISABLED(GPIOF_PIN2) | \
1144 PIN_ASCR_DISABLED(GPIOF_PIN3) | \
1145 PIN_ASCR_DISABLED(GPIOF_PIN4) | \
1146 PIN_ASCR_DISABLED(GPIOF_PIN5) | \
1147 PIN_ASCR_DISABLED(GPIOF_PIN6) | \
1148 PIN_ASCR_DISABLED(GPIOF_PIN7) | \
1149 PIN_ASCR_DISABLED(GPIOF_PIN8) | \
1150 PIN_ASCR_DISABLED(GPIOF_PIN9) | \
1151 PIN_ASCR_DISABLED(GPIOF_PIN10) | \
1152 PIN_ASCR_DISABLED(GPIOF_PIN11) | \
1153 PIN_ASCR_DISABLED(GPIOF_PIN12) | \
1154 PIN_ASCR_DISABLED(GPIOF_PIN13) | \
1155 PIN_ASCR_DISABLED(GPIOF_PIN14) | \
1156 PIN_ASCR_DISABLED(GPIOF_PIN15))
1157#define VAL_GPIOF_LOCKR (PIN_LOCKR_DISABLED(GPIOF_PIN0) | \
1158 PIN_LOCKR_DISABLED(GPIOF_PIN1) | \
1159 PIN_LOCKR_DISABLED(GPIOF_PIN2) | \
1160 PIN_LOCKR_DISABLED(GPIOF_PIN3) | \
1161 PIN_LOCKR_DISABLED(GPIOF_PIN4) | \
1162 PIN_LOCKR_DISABLED(GPIOF_PIN5) | \
1163 PIN_LOCKR_DISABLED(GPIOF_PIN6) | \
1164 PIN_LOCKR_DISABLED(GPIOF_PIN7) | \
1165 PIN_LOCKR_DISABLED(GPIOF_PIN8) | \
1166 PIN_LOCKR_DISABLED(GPIOF_PIN9) | \
1167 PIN_LOCKR_DISABLED(GPIOF_PIN10) | \
1168 PIN_LOCKR_DISABLED(GPIOF_PIN11) | \
1169 PIN_LOCKR_DISABLED(GPIOF_PIN12) | \
1170 PIN_LOCKR_DISABLED(GPIOF_PIN13) | \
1171 PIN_LOCKR_DISABLED(GPIOF_PIN14) | \
1172 PIN_LOCKR_DISABLED(GPIOF_PIN15))
1173
1174/*
1175 * GPIOG setup:
1176 *
1177 * PG0 - PIN0 (analog).
1178 * PG1 - PIN1 (analog).
1179 * PG2 - PIN2 (analog).
1180 * PG3 - PIN3 (analog).
1181 * PG4 - PIN4 (analog).
1182 * PG5 - PIN5 (analog).
1183 * PG6 - PIN6 (analog).
1184 * PG7 - PIN7 (analog).
1185 * PG8 - PIN8 (analog).
1186 * PG9 - PIN9 (analog).
1187 * PG10 - PIN10 (analog).
1188 * PG11 - PIN11 (analog).
1189 * PG12 - PIN12 (analog).
1190 * PG13 - PIN13 (analog).
1191 * PG14 - PIN14 (analog).
1192 * PG15 - PIN15 (analog).
1193 */
1194#define VAL_GPIOG_MODER (PIN_MODE_ANALOG(GPIOG_PIN0) | \
1195 PIN_MODE_ANALOG(GPIOG_PIN1) | \
1196 PIN_MODE_ANALOG(GPIOG_PIN2) | \
1197 PIN_MODE_ANALOG(GPIOG_PIN3) | \
1198 PIN_MODE_ANALOG(GPIOG_PIN4) | \
1199 PIN_MODE_ANALOG(GPIOG_PIN5) | \
1200 PIN_MODE_ANALOG(GPIOG_PIN6) | \
1201 PIN_MODE_ANALOG(GPIOG_PIN7) | \
1202 PIN_MODE_ANALOG(GPIOG_PIN8) | \
1203 PIN_MODE_ANALOG(GPIOG_PIN9) | \
1204 PIN_MODE_ANALOG(GPIOG_PIN10) | \
1205 PIN_MODE_ANALOG(GPIOG_PIN11) | \
1206 PIN_MODE_ANALOG(GPIOG_PIN12) | \
1207 PIN_MODE_ANALOG(GPIOG_PIN13) | \
1208 PIN_MODE_ANALOG(GPIOG_PIN14) | \
1209 PIN_MODE_ANALOG(GPIOG_PIN15))
1210#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \
1211 PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \
1212 PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \
1213 PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \
1214 PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \
1215 PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \
1216 PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \
1217 PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \
1218 PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \
1219 PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \
1220 PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \
1221 PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \
1222 PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \
1223 PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \
1224 PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \
1225 PIN_OTYPE_PUSHPULL(GPIOG_PIN15))
1226#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \
1227 PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \
1228 PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \
1229 PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \
1230 PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \
1231 PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \
1232 PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \
1233 PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \
1234 PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \
1235 PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \
1236 PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \
1237 PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \
1238 PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \
1239 PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \
1240 PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \
1241 PIN_OSPEED_VERYLOW(GPIOG_PIN15))
1242#define VAL_GPIOG_PUPDR (PIN_PUPDR_FLOATING(GPIOG_PIN0) | \
1243 PIN_PUPDR_FLOATING(GPIOG_PIN1) | \
1244 PIN_PUPDR_FLOATING(GPIOG_PIN2) | \
1245 PIN_PUPDR_FLOATING(GPIOG_PIN3) | \
1246 PIN_PUPDR_FLOATING(GPIOG_PIN4) | \
1247 PIN_PUPDR_FLOATING(GPIOG_PIN5) | \
1248 PIN_PUPDR_FLOATING(GPIOG_PIN6) | \
1249 PIN_PUPDR_FLOATING(GPIOG_PIN7) | \
1250 PIN_PUPDR_FLOATING(GPIOG_PIN8) | \
1251 PIN_PUPDR_FLOATING(GPIOG_PIN9) | \
1252 PIN_PUPDR_FLOATING(GPIOG_PIN10) | \
1253 PIN_PUPDR_FLOATING(GPIOG_PIN11) | \
1254 PIN_PUPDR_FLOATING(GPIOG_PIN12) | \
1255 PIN_PUPDR_FLOATING(GPIOG_PIN13) | \
1256 PIN_PUPDR_FLOATING(GPIOG_PIN14) | \
1257 PIN_PUPDR_FLOATING(GPIOG_PIN15))
1258#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \
1259 PIN_ODR_HIGH(GPIOG_PIN1) | \
1260 PIN_ODR_HIGH(GPIOG_PIN2) | \
1261 PIN_ODR_HIGH(GPIOG_PIN3) | \
1262 PIN_ODR_HIGH(GPIOG_PIN4) | \
1263 PIN_ODR_HIGH(GPIOG_PIN5) | \
1264 PIN_ODR_HIGH(GPIOG_PIN6) | \
1265 PIN_ODR_HIGH(GPIOG_PIN7) | \
1266 PIN_ODR_HIGH(GPIOG_PIN8) | \
1267 PIN_ODR_HIGH(GPIOG_PIN9) | \
1268 PIN_ODR_HIGH(GPIOG_PIN10) | \
1269 PIN_ODR_HIGH(GPIOG_PIN11) | \
1270 PIN_ODR_HIGH(GPIOG_PIN12) | \
1271 PIN_ODR_HIGH(GPIOG_PIN13) | \
1272 PIN_ODR_HIGH(GPIOG_PIN14) | \
1273 PIN_ODR_HIGH(GPIOG_PIN15))
1274#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | \
1275 PIN_AFIO_AF(GPIOG_PIN1, 0U) | \
1276 PIN_AFIO_AF(GPIOG_PIN2, 0U) | \
1277 PIN_AFIO_AF(GPIOG_PIN3, 0U) | \
1278 PIN_AFIO_AF(GPIOG_PIN4, 0U) | \
1279 PIN_AFIO_AF(GPIOG_PIN5, 0U) | \
1280 PIN_AFIO_AF(GPIOG_PIN6, 0U) | \
1281 PIN_AFIO_AF(GPIOG_PIN7, 0U))
1282#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \
1283 PIN_AFIO_AF(GPIOG_PIN9, 0U) | \
1284 PIN_AFIO_AF(GPIOG_PIN10, 0U) | \
1285 PIN_AFIO_AF(GPIOG_PIN11, 0U) | \
1286 PIN_AFIO_AF(GPIOG_PIN12, 0U) | \
1287 PIN_AFIO_AF(GPIOG_PIN13, 0U) | \
1288 PIN_AFIO_AF(GPIOG_PIN14, 0U) | \
1289 PIN_AFIO_AF(GPIOG_PIN15, 0U))
1290#define VAL_GPIOG_ASCR (PIN_ASCR_DISABLED(GPIOG_PIN0) | \
1291 PIN_ASCR_DISABLED(GPIOG_PIN1) | \
1292 PIN_ASCR_DISABLED(GPIOG_PIN2) | \
1293 PIN_ASCR_DISABLED(GPIOG_PIN3) | \
1294 PIN_ASCR_DISABLED(GPIOG_PIN4) | \
1295 PIN_ASCR_DISABLED(GPIOG_PIN5) | \
1296 PIN_ASCR_DISABLED(GPIOG_PIN6) | \
1297 PIN_ASCR_DISABLED(GPIOG_PIN7) | \
1298 PIN_ASCR_DISABLED(GPIOG_PIN8) | \
1299 PIN_ASCR_DISABLED(GPIOG_PIN9) | \
1300 PIN_ASCR_DISABLED(GPIOG_PIN10) | \
1301 PIN_ASCR_DISABLED(GPIOG_PIN11) | \
1302 PIN_ASCR_DISABLED(GPIOG_PIN12) | \
1303 PIN_ASCR_DISABLED(GPIOG_PIN13) | \
1304 PIN_ASCR_DISABLED(GPIOG_PIN14) | \
1305 PIN_ASCR_DISABLED(GPIOG_PIN15))
1306#define VAL_GPIOG_LOCKR (PIN_LOCKR_DISABLED(GPIOG_PIN0) | \
1307 PIN_LOCKR_DISABLED(GPIOG_PIN1) | \
1308 PIN_LOCKR_DISABLED(GPIOG_PIN2) | \
1309 PIN_LOCKR_DISABLED(GPIOG_PIN3) | \
1310 PIN_LOCKR_DISABLED(GPIOG_PIN4) | \
1311 PIN_LOCKR_DISABLED(GPIOG_PIN5) | \
1312 PIN_LOCKR_DISABLED(GPIOG_PIN6) | \
1313 PIN_LOCKR_DISABLED(GPIOG_PIN7) | \
1314 PIN_LOCKR_DISABLED(GPIOG_PIN8) | \
1315 PIN_LOCKR_DISABLED(GPIOG_PIN9) | \
1316 PIN_LOCKR_DISABLED(GPIOG_PIN10) | \
1317 PIN_LOCKR_DISABLED(GPIOG_PIN11) | \
1318 PIN_LOCKR_DISABLED(GPIOG_PIN12) | \
1319 PIN_LOCKR_DISABLED(GPIOG_PIN13) | \
1320 PIN_LOCKR_DISABLED(GPIOG_PIN14) | \
1321 PIN_LOCKR_DISABLED(GPIOG_PIN15))
1322
1323/*
1324 * GPIOH setup:
1325 *
1326 * PH0 - PIN0 (analog).
1327 * PH1 - PIN1 (analog).
1328 * PH2 - PIN2 (analog).
1329 * PH3 - PIN3 (analog).
1330 * PH4 - PIN4 (analog).
1331 * PH5 - PIN5 (analog).
1332 * PH6 - PIN6 (analog).
1333 * PH7 - PIN7 (analog).
1334 * PH8 - PIN8 (analog).
1335 * PH9 - PIN9 (analog).
1336 * PH10 - PIN10 (analog).
1337 * PH11 - PIN11 (analog).
1338 * PH12 - PIN12 (analog).
1339 * PH13 - PIN13 (analog).
1340 * PH14 - PIN14 (analog).
1341 * PH15 - PIN15 (analog).
1342 */
1343#define VAL_GPIOH_MODER (PIN_MODE_ANALOG(GPIOH_PIN0) | \
1344 PIN_MODE_ANALOG(GPIOH_PIN1) | \
1345 PIN_MODE_ANALOG(GPIOH_PIN2) | \
1346 PIN_MODE_ANALOG(GPIOH_PIN3) | \
1347 PIN_MODE_ANALOG(GPIOH_PIN4) | \
1348 PIN_MODE_ANALOG(GPIOH_PIN5) | \
1349 PIN_MODE_ANALOG(GPIOH_PIN6) | \
1350 PIN_MODE_ANALOG(GPIOH_PIN7) | \
1351 PIN_MODE_ANALOG(GPIOH_PIN8) | \
1352 PIN_MODE_ANALOG(GPIOH_PIN9) | \
1353 PIN_MODE_ANALOG(GPIOH_PIN10) | \
1354 PIN_MODE_ANALOG(GPIOH_PIN11) | \
1355 PIN_MODE_ANALOG(GPIOH_PIN12) | \
1356 PIN_MODE_ANALOG(GPIOH_PIN13) | \
1357 PIN_MODE_ANALOG(GPIOH_PIN14) | \
1358 PIN_MODE_ANALOG(GPIOH_PIN15))
1359#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \
1360 PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \
1361 PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \
1362 PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \
1363 PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \
1364 PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \
1365 PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \
1366 PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \
1367 PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \
1368 PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \
1369 PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \
1370 PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \
1371 PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \
1372 PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \
1373 PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \
1374 PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
1375#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_PIN0) | \
1376 PIN_OSPEED_HIGH(GPIOH_PIN1) | \
1377 PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \
1378 PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \
1379 PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \
1380 PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \
1381 PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \
1382 PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \
1383 PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \
1384 PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \
1385 PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \
1386 PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \
1387 PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \
1388 PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \
1389 PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \
1390 PIN_OSPEED_VERYLOW(GPIOH_PIN15))
1391#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_PIN0) | \
1392 PIN_PUPDR_FLOATING(GPIOH_PIN1) | \
1393 PIN_PUPDR_FLOATING(GPIOH_PIN2) | \
1394 PIN_PUPDR_FLOATING(GPIOH_PIN3) | \
1395 PIN_PUPDR_FLOATING(GPIOH_PIN4) | \
1396 PIN_PUPDR_FLOATING(GPIOH_PIN5) | \
1397 PIN_PUPDR_FLOATING(GPIOH_PIN6) | \
1398 PIN_PUPDR_FLOATING(GPIOH_PIN7) | \
1399 PIN_PUPDR_FLOATING(GPIOH_PIN8) | \
1400 PIN_PUPDR_FLOATING(GPIOH_PIN9) | \
1401 PIN_PUPDR_FLOATING(GPIOH_PIN10) | \
1402 PIN_PUPDR_FLOATING(GPIOH_PIN11) | \
1403 PIN_PUPDR_FLOATING(GPIOH_PIN12) | \
1404 PIN_PUPDR_FLOATING(GPIOH_PIN13) | \
1405 PIN_PUPDR_FLOATING(GPIOH_PIN14) | \
1406 PIN_PUPDR_FLOATING(GPIOH_PIN15))
1407#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \
1408 PIN_ODR_HIGH(GPIOH_PIN1) | \
1409 PIN_ODR_HIGH(GPIOH_PIN2) | \
1410 PIN_ODR_HIGH(GPIOH_PIN3) | \
1411 PIN_ODR_HIGH(GPIOH_PIN4) | \
1412 PIN_ODR_HIGH(GPIOH_PIN5) | \
1413 PIN_ODR_HIGH(GPIOH_PIN6) | \
1414 PIN_ODR_HIGH(GPIOH_PIN7) | \
1415 PIN_ODR_HIGH(GPIOH_PIN8) | \
1416 PIN_ODR_HIGH(GPIOH_PIN9) | \
1417 PIN_ODR_HIGH(GPIOH_PIN10) | \
1418 PIN_ODR_HIGH(GPIOH_PIN11) | \
1419 PIN_ODR_HIGH(GPIOH_PIN12) | \
1420 PIN_ODR_HIGH(GPIOH_PIN13) | \
1421 PIN_ODR_HIGH(GPIOH_PIN14) | \
1422 PIN_ODR_HIGH(GPIOH_PIN15))
1423#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0U) | \
1424 PIN_AFIO_AF(GPIOH_PIN1, 0U) | \
1425 PIN_AFIO_AF(GPIOH_PIN2, 0U) | \
1426 PIN_AFIO_AF(GPIOH_PIN3, 0U) | \
1427 PIN_AFIO_AF(GPIOH_PIN4, 0U) | \
1428 PIN_AFIO_AF(GPIOH_PIN5, 0U) | \
1429 PIN_AFIO_AF(GPIOH_PIN6, 0U) | \
1430 PIN_AFIO_AF(GPIOH_PIN7, 0U))
1431#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \
1432 PIN_AFIO_AF(GPIOH_PIN9, 0U) | \
1433 PIN_AFIO_AF(GPIOH_PIN10, 0U) | \
1434 PIN_AFIO_AF(GPIOH_PIN11, 0U) | \
1435 PIN_AFIO_AF(GPIOH_PIN12, 0U) | \
1436 PIN_AFIO_AF(GPIOH_PIN13, 0U) | \
1437 PIN_AFIO_AF(GPIOH_PIN14, 0U) | \
1438 PIN_AFIO_AF(GPIOH_PIN15, 0U))
1439#define VAL_GPIOH_ASCR (PIN_ASCR_DISABLED(GPIOH_PIN0) | \
1440 PIN_ASCR_DISABLED(GPIOH_PIN1) | \
1441 PIN_ASCR_DISABLED(GPIOH_PIN2) | \
1442 PIN_ASCR_DISABLED(GPIOH_PIN3) | \
1443 PIN_ASCR_DISABLED(GPIOH_PIN4) | \
1444 PIN_ASCR_DISABLED(GPIOH_PIN5) | \
1445 PIN_ASCR_DISABLED(GPIOH_PIN6) | \
1446 PIN_ASCR_DISABLED(GPIOH_PIN7) | \
1447 PIN_ASCR_DISABLED(GPIOH_PIN8) | \
1448 PIN_ASCR_DISABLED(GPIOH_PIN9) | \
1449 PIN_ASCR_DISABLED(GPIOH_PIN10) | \
1450 PIN_ASCR_DISABLED(GPIOH_PIN11) | \
1451 PIN_ASCR_DISABLED(GPIOH_PIN12) | \
1452 PIN_ASCR_DISABLED(GPIOH_PIN13) | \
1453 PIN_ASCR_DISABLED(GPIOH_PIN14) | \
1454 PIN_ASCR_DISABLED(GPIOH_PIN15))
1455#define VAL_GPIOH_LOCKR (PIN_LOCKR_DISABLED(GPIOH_PIN0) | \
1456 PIN_LOCKR_DISABLED(GPIOH_PIN1) | \
1457 PIN_LOCKR_DISABLED(GPIOH_PIN2) | \
1458 PIN_LOCKR_DISABLED(GPIOH_PIN3) | \
1459 PIN_LOCKR_DISABLED(GPIOH_PIN4) | \
1460 PIN_LOCKR_DISABLED(GPIOH_PIN5) | \
1461 PIN_LOCKR_DISABLED(GPIOH_PIN6) | \
1462 PIN_LOCKR_DISABLED(GPIOH_PIN7) | \
1463 PIN_LOCKR_DISABLED(GPIOH_PIN8) | \
1464 PIN_LOCKR_DISABLED(GPIOH_PIN9) | \
1465 PIN_LOCKR_DISABLED(GPIOH_PIN10) | \
1466 PIN_LOCKR_DISABLED(GPIOH_PIN11) | \
1467 PIN_LOCKR_DISABLED(GPIOH_PIN12) | \
1468 PIN_LOCKR_DISABLED(GPIOH_PIN13) | \
1469 PIN_LOCKR_DISABLED(GPIOH_PIN14) | \
1470 PIN_LOCKR_DISABLED(GPIOH_PIN15))
1471
1472/*===========================================================================*/
1473/* External declarations. */
1474/*===========================================================================*/
1475
1476#if !defined(_FROM_ASM_)
1477#ifdef __cplusplus
1478extern "C" {
1479#endif
1480 void boardInit(void);
1481#ifdef __cplusplus
1482}
1483#endif
1484#endif /* _FROM_ASM_ */
1485
1486#endif /* BOARD_H */