aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h')
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h838
1 files changed, 838 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h b/lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h
new file mode 100644
index 000000000..ffcb54ba5
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_F030R8/board.h
@@ -0,0 +1,838 @@
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 Nucleo64-F030R8 board.
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_ST_NUCLEO64_F030R8
37#define BOARD_NAME "STMicroelectronics STM32 Nucleo64-F030R8"
38
39/*
40 * Board oscillators-related settings.
41 * NOTE: LSE not fitted.
42 */
43#if !defined(STM32_LSECLK)
44#define STM32_LSECLK 0U
45#endif
46
47#define STM32_LSEDRV (3U << 3U)
48
49#if !defined(STM32_HSECLK)
50#define STM32_HSECLK 8000000U
51#endif
52
53#define STM32_HSE_BYPASS
54
55/*
56 * MCU type as defined in the ST header.
57 */
58#define STM32F030x8
59
60/*
61 * IO pins assignments.
62 */
63#define GPIOA_ARD_A0 0U
64#define GPIOA_ADC1_IN0 0U
65#define GPIOA_ARD_A1 1U
66#define GPIOA_ADC1_IN1 1U
67#define GPIOA_ARD_D1 2U
68#define GPIOA_USART2_TX 2U
69#define GPIOA_ARD_D0 3U
70#define GPIOA_USART2_RX 3U
71#define GPIOA_ARD_A2 4U
72#define GPIOA_ADC1_IN4 4U
73#define GPIOA_LED_GREEN 5U
74#define GPIOA_ARD_D13 5U
75#define GPIOA_ARD_D12 6U
76#define GPIOA_ARD_D11 7U
77#define GPIOA_ARD_D7 8U
78#define GPIOA_ARD_D8 9U
79#define GPIOA_ARD_D2 10U
80#define GPIOA_PIN11 11U
81#define GPIOA_PIN12 12U
82#define GPIOA_SWDIO 13U
83#define GPIOA_SWCLK 14U
84#define GPIOA_PIN15 15U
85
86#define GPIOB_ARD_A3 0U
87#define GPIOB_ADC1_IN8 0U
88#define GPIOB_PIN1 1U
89#define GPIOB_PIN2 2U
90#define GPIOB_SWO 3U
91#define GPIOB_ARD_D3 3U
92#define GPIOB_ARD_D5 4U
93#define GPIOB_ARD_D4 5U
94#define GPIOB_ARD_D10 6U
95#define GPIOB_PIN7 7U
96#define GPIOB_ARD_D15 8U
97#define GPIOB_ARD_D14 9U
98#define GPIOB_ARD_D6 10U
99#define GPIOB_PIN11 11U
100#define GPIOB_PIN12 12U
101#define GPIOB_PIN13 13U
102#define GPIOB_PIN14 14U
103#define GPIOB_PIN15 15U
104
105#define GPIOC_ARD_A5 0U
106#define GPIOC_ADC1_IN11 0U
107#define GPIOC_ARD_A4 1U
108#define GPIOC_ADC1_IN10 1U
109#define GPIOC_PIN2 2U
110#define GPIOC_PIN3 3U
111#define GPIOC_PIN4 4U
112#define GPIOC_PIN5 5U
113#define GPIOC_PIN6 6U
114#define GPIOC_ARD_D9 7U
115#define GPIOC_PIN8 8U
116#define GPIOC_PIN9 9U
117#define GPIOC_PIN10 10U
118#define GPIOC_PIN11 11U
119#define GPIOC_PIN12 12U
120#define GPIOC_BUTTON 13U
121#define GPIOC_OSC32_IN 14U
122#define GPIOC_OSC32_OUT 15U
123
124#define GPIOD_PIN0 0U
125#define GPIOD_PIN1 1U
126#define GPIOD_PIN2 2U
127#define GPIOD_PIN3 3U
128#define GPIOD_PIN4 4U
129#define GPIOD_PIN5 5U
130#define GPIOD_PIN6 6U
131#define GPIOD_PIN7 7U
132#define GPIOD_PIN8 8U
133#define GPIOD_PIN9 9U
134#define GPIOD_PIN10 10U
135#define GPIOD_PIN11 11U
136#define GPIOD_PIN12 12U
137#define GPIOD_PIN13 13U
138#define GPIOD_PIN14 14U
139#define GPIOD_PIN15 15U
140
141#define GPIOF_OSC_IN 0U
142#define GPIOF_OSC_OUT 1U
143#define GPIOF_PIN2 2U
144#define GPIOF_PIN3 3U
145#define GPIOF_PIN4 4U
146#define GPIOF_PIN5 5U
147#define GPIOF_PIN6 6U
148#define GPIOF_PIN7 7U
149#define GPIOF_PIN8 8U
150#define GPIOF_PIN9 9U
151#define GPIOF_PIN10 10U
152#define GPIOF_PIN11 11U
153#define GPIOF_PIN12 12U
154#define GPIOF_PIN13 13U
155#define GPIOF_PIN14 14U
156#define GPIOF_PIN15 15U
157
158/*
159 * IO lines assignments.
160 */
161#define LINE_ARD_A0 PAL_LINE(GPIOA, 0U)
162#define LINE_ADC1_IN0 PAL_LINE(GPIOA, 0U)
163#define LINE_ARD_A1 PAL_LINE(GPIOA, 1U)
164#define LINE_ADC1_IN1 PAL_LINE(GPIOA, 1U)
165#define LINE_ARD_D1 PAL_LINE(GPIOA, 2U)
166#define LINE_USART2_TX PAL_LINE(GPIOA, 2U)
167#define LINE_ARD_D0 PAL_LINE(GPIOA, 3U)
168#define LINE_USART2_RX PAL_LINE(GPIOA, 3U)
169#define LINE_ARD_A2 PAL_LINE(GPIOA, 4U)
170#define LINE_ADC1_IN4 PAL_LINE(GPIOA, 4U)
171#define LINE_LED_GREEN PAL_LINE(GPIOA, 5U)
172#define LINE_ARD_D13 PAL_LINE(GPIOA, 5U)
173#define LINE_ARD_D12 PAL_LINE(GPIOA, 6U)
174#define LINE_ARD_D11 PAL_LINE(GPIOA, 7U)
175#define LINE_ARD_D7 PAL_LINE(GPIOA, 8U)
176#define LINE_ARD_D8 PAL_LINE(GPIOA, 9U)
177#define LINE_ARD_D2 PAL_LINE(GPIOA, 10U)
178#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
179#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
180#define LINE_ARD_A3 PAL_LINE(GPIOB, 0U)
181#define LINE_ADC1_IN8 PAL_LINE(GPIOB, 0U)
182#define LINE_SWO PAL_LINE(GPIOB, 3U)
183#define LINE_ARD_D3 PAL_LINE(GPIOB, 3U)
184#define LINE_ARD_D5 PAL_LINE(GPIOB, 4U)
185#define LINE_ARD_D4 PAL_LINE(GPIOB, 5U)
186#define LINE_ARD_D10 PAL_LINE(GPIOB, 6U)
187#define LINE_ARD_D15 PAL_LINE(GPIOB, 8U)
188#define LINE_ARD_D14 PAL_LINE(GPIOB, 9U)
189#define LINE_ARD_D6 PAL_LINE(GPIOB, 10U)
190#define LINE_ARD_A5 PAL_LINE(GPIOC, 0U)
191#define LINE_ADC1_IN11 PAL_LINE(GPIOC, 0U)
192#define LINE_ARD_A4 PAL_LINE(GPIOC, 1U)
193#define LINE_ADC1_IN10 PAL_LINE(GPIOC, 1U)
194#define LINE_ARD_D9 PAL_LINE(GPIOC, 7U)
195#define LINE_BUTTON PAL_LINE(GPIOC, 13U)
196#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
197#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
198#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
199#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
200
201/*===========================================================================*/
202/* Driver pre-compile time settings. */
203/*===========================================================================*/
204
205/*===========================================================================*/
206/* Derived constants and error checks. */
207/*===========================================================================*/
208
209/*===========================================================================*/
210/* Driver data structures and types. */
211/*===========================================================================*/
212
213/*===========================================================================*/
214/* Driver macros. */
215/*===========================================================================*/
216
217/*
218 * I/O ports initial setup, this configuration is established soon after reset
219 * in the initialization code.
220 * Please refer to the STM32 Reference Manual for details.
221 */
222#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
223#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
224#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
225#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
226#define PIN_ODR_LOW(n) (0U << (n))
227#define PIN_ODR_HIGH(n) (1U << (n))
228#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
229#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
230#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
231#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
232#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
233#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
234#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
235#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
236#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
237#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
238
239/*
240 * GPIOA setup:
241 *
242 * PA0 - ARD_A0 ADC1_IN0 (input pullup).
243 * PA1 - ARD_A1 ADC1_IN1 (input pullup).
244 * PA2 - ARD_D1 USART2_TX (alternate 1).
245 * PA3 - ARD_D0 USART2_RX (alternate 1).
246 * PA4 - ARD_A2 ADC1_IN4 (input pullup).
247 * PA5 - LED_GREEN ARD_D13 (output pushpull high).
248 * PA6 - ARD_D12 (input pullup).
249 * PA7 - ARD_D11 (input pullup).
250 * PA8 - ARD_D7 (input pullup).
251 * PA9 - ARD_D8 (input pullup).
252 * PA10 - ARD_D2 (input pullup).
253 * PA11 - PIN11 (input pullup).
254 * PA12 - PIN12 (input pullup).
255 * PA13 - SWDIO (alternate 0).
256 * PA14 - SWCLK (alternate 0).
257 * PA15 - PIN15 (input pullup).
258 */
259#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | \
260 PIN_MODE_INPUT(GPIOA_ARD_A1) | \
261 PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | \
262 PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | \
263 PIN_MODE_INPUT(GPIOA_ARD_A2) | \
264 PIN_MODE_OUTPUT(GPIOA_LED_GREEN) | \
265 PIN_MODE_INPUT(GPIOA_ARD_D12) | \
266 PIN_MODE_INPUT(GPIOA_ARD_D11) | \
267 PIN_MODE_INPUT(GPIOA_ARD_D7) | \
268 PIN_MODE_INPUT(GPIOA_ARD_D8) | \
269 PIN_MODE_INPUT(GPIOA_ARD_D2) | \
270 PIN_MODE_INPUT(GPIOA_PIN11) | \
271 PIN_MODE_INPUT(GPIOA_PIN12) | \
272 PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
273 PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
274 PIN_MODE_INPUT(GPIOA_PIN15))
275#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \
276 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | \
277 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | \
278 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | \
279 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | \
280 PIN_OTYPE_PUSHPULL(GPIOA_LED_GREEN) | \
281 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | \
282 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | \
283 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D7) | \
284 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D8) | \
285 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | \
286 PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \
287 PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \
288 PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
289 PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
290 PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
291#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \
292 PIN_OSPEED_HIGH(GPIOA_ARD_A1) | \
293 PIN_OSPEED_LOW(GPIOA_ARD_D1) | \
294 PIN_OSPEED_LOW(GPIOA_ARD_D0) | \
295 PIN_OSPEED_HIGH(GPIOA_ARD_A2) | \
296 PIN_OSPEED_LOW(GPIOA_LED_GREEN) | \
297 PIN_OSPEED_HIGH(GPIOA_ARD_D12) | \
298 PIN_OSPEED_HIGH(GPIOA_ARD_D11) | \
299 PIN_OSPEED_HIGH(GPIOA_ARD_D7) | \
300 PIN_OSPEED_HIGH(GPIOA_ARD_D8) | \
301 PIN_OSPEED_HIGH(GPIOA_ARD_D2) | \
302 PIN_OSPEED_HIGH(GPIOA_PIN11) | \
303 PIN_OSPEED_HIGH(GPIOA_PIN12) | \
304 PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
305 PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
306 PIN_OSPEED_HIGH(GPIOA_PIN15))
307#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | \
308 PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | \
309 PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | \
310 PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | \
311 PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \
312 PIN_PUPDR_FLOATING(GPIOA_LED_GREEN) | \
313 PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | \
314 PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | \
315 PIN_PUPDR_PULLUP(GPIOA_ARD_D7) | \
316 PIN_PUPDR_PULLUP(GPIOA_ARD_D8) | \
317 PIN_PUPDR_PULLUP(GPIOA_ARD_D2) | \
318 PIN_PUPDR_PULLUP(GPIOA_PIN11) | \
319 PIN_PUPDR_PULLUP(GPIOA_PIN12) | \
320 PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
321 PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
322 PIN_PUPDR_PULLUP(GPIOA_PIN15))
323#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | \
324 PIN_ODR_HIGH(GPIOA_ARD_A1) | \
325 PIN_ODR_HIGH(GPIOA_ARD_D1) | \
326 PIN_ODR_HIGH(GPIOA_ARD_D0) | \
327 PIN_ODR_HIGH(GPIOA_ARD_A2) | \
328 PIN_ODR_LOW(GPIOA_LED_GREEN) | \
329 PIN_ODR_HIGH(GPIOA_ARD_D12) | \
330 PIN_ODR_HIGH(GPIOA_ARD_D11) | \
331 PIN_ODR_HIGH(GPIOA_ARD_D7) | \
332 PIN_ODR_HIGH(GPIOA_ARD_D8) | \
333 PIN_ODR_HIGH(GPIOA_ARD_D2) | \
334 PIN_ODR_HIGH(GPIOA_PIN11) | \
335 PIN_ODR_HIGH(GPIOA_PIN12) | \
336 PIN_ODR_HIGH(GPIOA_SWDIO) | \
337 PIN_ODR_HIGH(GPIOA_SWCLK) | \
338 PIN_ODR_HIGH(GPIOA_PIN15))
339#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \
340 PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | \
341 PIN_AFIO_AF(GPIOA_ARD_D1, 1U) | \
342 PIN_AFIO_AF(GPIOA_ARD_D0, 1U) | \
343 PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | \
344 PIN_AFIO_AF(GPIOA_LED_GREEN, 0U) | \
345 PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | \
346 PIN_AFIO_AF(GPIOA_ARD_D11, 0U))
347#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D7, 0U) | \
348 PIN_AFIO_AF(GPIOA_ARD_D8, 0U) | \
349 PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | \
350 PIN_AFIO_AF(GPIOA_PIN11, 0U) | \
351 PIN_AFIO_AF(GPIOA_PIN12, 0U) | \
352 PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
353 PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
354 PIN_AFIO_AF(GPIOA_PIN15, 0U))
355
356/*
357 * GPIOB setup:
358 *
359 * PB0 - ARD_A3 ADC1_IN8 (input pullup).
360 * PB1 - PIN1 (input pullup).
361 * PB2 - PIN2 (input pullup).
362 * PB3 - SWO ARD_D3 (alternate 0).
363 * PB4 - ARD_D5 (input pullup).
364 * PB5 - ARD_D4 (input pullup).
365 * PB6 - ARD_D10 (input pullup).
366 * PB7 - PIN7 (input pullup).
367 * PB8 - ARD_D15 (input pullup).
368 * PB9 - ARD_D14 (input pullup).
369 * PB10 - ARD_D6 (input pullup).
370 * PB11 - PIN11 (input pullup).
371 * PB12 - PIN12 (input pullup).
372 * PB13 - PIN13 (input pullup).
373 * PB14 - PIN14 (input pullup).
374 * PB15 - PIN15 (input pullup).
375 */
376#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_A3) | \
377 PIN_MODE_INPUT(GPIOB_PIN1) | \
378 PIN_MODE_INPUT(GPIOB_PIN2) | \
379 PIN_MODE_ALTERNATE(GPIOB_SWO) | \
380 PIN_MODE_INPUT(GPIOB_ARD_D5) | \
381 PIN_MODE_INPUT(GPIOB_ARD_D4) | \
382 PIN_MODE_INPUT(GPIOB_ARD_D10) | \
383 PIN_MODE_INPUT(GPIOB_PIN7) | \
384 PIN_MODE_INPUT(GPIOB_ARD_D15) | \
385 PIN_MODE_INPUT(GPIOB_ARD_D14) | \
386 PIN_MODE_INPUT(GPIOB_ARD_D6) | \
387 PIN_MODE_INPUT(GPIOB_PIN11) | \
388 PIN_MODE_INPUT(GPIOB_PIN12) | \
389 PIN_MODE_INPUT(GPIOB_PIN13) | \
390 PIN_MODE_INPUT(GPIOB_PIN14) | \
391 PIN_MODE_INPUT(GPIOB_PIN15))
392#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_A3) | \
393 PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
394 PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
395 PIN_OTYPE_PUSHPULL(GPIOB_SWO) | \
396 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | \
397 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | \
398 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D10) | \
399 PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
400 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | \
401 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | \
402 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | \
403 PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
404 PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
405 PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \
406 PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \
407 PIN_OTYPE_PUSHPULL(GPIOB_PIN15))
408#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_A3) | \
409 PIN_OSPEED_HIGH(GPIOB_PIN1) | \
410 PIN_OSPEED_HIGH(GPIOB_PIN2) | \
411 PIN_OSPEED_HIGH(GPIOB_SWO) | \
412 PIN_OSPEED_HIGH(GPIOB_ARD_D5) | \
413 PIN_OSPEED_HIGH(GPIOB_ARD_D4) | \
414 PIN_OSPEED_HIGH(GPIOB_ARD_D10) | \
415 PIN_OSPEED_HIGH(GPIOB_PIN7) | \
416 PIN_OSPEED_HIGH(GPIOB_ARD_D15) | \
417 PIN_OSPEED_HIGH(GPIOB_ARD_D14) | \
418 PIN_OSPEED_HIGH(GPIOB_ARD_D6) | \
419 PIN_OSPEED_HIGH(GPIOB_PIN11) | \
420 PIN_OSPEED_HIGH(GPIOB_PIN12) | \
421 PIN_OSPEED_HIGH(GPIOB_PIN13) | \
422 PIN_OSPEED_HIGH(GPIOB_PIN14) | \
423 PIN_OSPEED_HIGH(GPIOB_PIN15))
424#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_A3) | \
425 PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
426 PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
427 PIN_PUPDR_PULLUP(GPIOB_SWO) | \
428 PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | \
429 PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \
430 PIN_PUPDR_PULLUP(GPIOB_ARD_D10) | \
431 PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
432 PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | \
433 PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | \
434 PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | \
435 PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
436 PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
437 PIN_PUPDR_PULLUP(GPIOB_PIN13) | \
438 PIN_PUPDR_PULLUP(GPIOB_PIN14) | \
439 PIN_PUPDR_PULLUP(GPIOB_PIN15))
440#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_A3) | \
441 PIN_ODR_HIGH(GPIOB_PIN1) | \
442 PIN_ODR_HIGH(GPIOB_PIN2) | \
443 PIN_ODR_HIGH(GPIOB_SWO) | \
444 PIN_ODR_HIGH(GPIOB_ARD_D5) | \
445 PIN_ODR_HIGH(GPIOB_ARD_D4) | \
446 PIN_ODR_HIGH(GPIOB_ARD_D10) | \
447 PIN_ODR_HIGH(GPIOB_PIN7) | \
448 PIN_ODR_HIGH(GPIOB_ARD_D15) | \
449 PIN_ODR_HIGH(GPIOB_ARD_D14) | \
450 PIN_ODR_HIGH(GPIOB_ARD_D6) | \
451 PIN_ODR_HIGH(GPIOB_PIN11) | \
452 PIN_ODR_HIGH(GPIOB_PIN12) | \
453 PIN_ODR_HIGH(GPIOB_PIN13) | \
454 PIN_ODR_HIGH(GPIOB_PIN14) | \
455 PIN_ODR_HIGH(GPIOB_PIN15))
456#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_A3, 0U) | \
457 PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
458 PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
459 PIN_AFIO_AF(GPIOB_SWO, 0U) | \
460 PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | \
461 PIN_AFIO_AF(GPIOB_ARD_D4, 0U) | \
462 PIN_AFIO_AF(GPIOB_ARD_D10, 0U) | \
463 PIN_AFIO_AF(GPIOB_PIN7, 0U))
464#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | \
465 PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | \
466 PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | \
467 PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
468 PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
469 PIN_AFIO_AF(GPIOB_PIN13, 0U) | \
470 PIN_AFIO_AF(GPIOB_PIN14, 0U) | \
471 PIN_AFIO_AF(GPIOB_PIN15, 0U))
472
473/*
474 * GPIOC setup:
475 *
476 * PC0 - ARD_A5 ADC1_IN11 (input pullup).
477 * PC1 - ARD_A4 ADC1_IN10 (input pullup).
478 * PC2 - PIN2 (input pullup).
479 * PC3 - PIN3 (input pullup).
480 * PC4 - PIN4 (input pullup).
481 * PC5 - PIN5 (input pullup).
482 * PC6 - PIN6 (input pullup).
483 * PC7 - ARD_D9 (input pullup).
484 * PC8 - PIN8 (input pullup).
485 * PC9 - PIN9 (input pullup).
486 * PC10 - PIN10 (input pullup).
487 * PC11 - PIN11 (input pullup).
488 * PC12 - PIN12 (input pullup).
489 * PC13 - BUTTON (input floating).
490 * PC14 - OSC32_IN (input floating).
491 * PC15 - OSC32_OUT (input floating).
492 */
493#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A5) | \
494 PIN_MODE_INPUT(GPIOC_ARD_A4) | \
495 PIN_MODE_INPUT(GPIOC_PIN2) | \
496 PIN_MODE_INPUT(GPIOC_PIN3) | \
497 PIN_MODE_INPUT(GPIOC_PIN4) | \
498 PIN_MODE_INPUT(GPIOC_PIN5) | \
499 PIN_MODE_INPUT(GPIOC_PIN6) | \
500 PIN_MODE_INPUT(GPIOC_ARD_D9) | \
501 PIN_MODE_INPUT(GPIOC_PIN8) | \
502 PIN_MODE_INPUT(GPIOC_PIN9) | \
503 PIN_MODE_INPUT(GPIOC_PIN10) | \
504 PIN_MODE_INPUT(GPIOC_PIN11) | \
505 PIN_MODE_INPUT(GPIOC_PIN12) | \
506 PIN_MODE_INPUT(GPIOC_BUTTON) | \
507 PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
508 PIN_MODE_INPUT(GPIOC_OSC32_OUT))
509#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A5) | \
510 PIN_OTYPE_PUSHPULL(GPIOC_ARD_A4) | \
511 PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
512 PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
513 PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
514 PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
515 PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \
516 PIN_OTYPE_PUSHPULL(GPIOC_ARD_D9) | \
517 PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \
518 PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \
519 PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
520 PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
521 PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
522 PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | \
523 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
524 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
525#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A5) | \
526 PIN_OSPEED_HIGH(GPIOC_ARD_A4) | \
527 PIN_OSPEED_HIGH(GPIOC_PIN2) | \
528 PIN_OSPEED_HIGH(GPIOC_PIN3) | \
529 PIN_OSPEED_HIGH(GPIOC_PIN4) | \
530 PIN_OSPEED_HIGH(GPIOC_PIN5) | \
531 PIN_OSPEED_HIGH(GPIOC_PIN6) | \
532 PIN_OSPEED_HIGH(GPIOC_ARD_D9) | \
533 PIN_OSPEED_HIGH(GPIOC_PIN8) | \
534 PIN_OSPEED_HIGH(GPIOC_PIN9) | \
535 PIN_OSPEED_HIGH(GPIOC_PIN10) | \
536 PIN_OSPEED_HIGH(GPIOC_PIN11) | \
537 PIN_OSPEED_HIGH(GPIOC_PIN12) | \
538 PIN_OSPEED_HIGH(GPIOC_BUTTON) | \
539 PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
540 PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
541#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A5) | \
542 PIN_PUPDR_PULLUP(GPIOC_ARD_A4) | \
543 PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
544 PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
545 PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
546 PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
547 PIN_PUPDR_PULLUP(GPIOC_PIN6) | \
548 PIN_PUPDR_PULLUP(GPIOC_ARD_D9) | \
549 PIN_PUPDR_PULLUP(GPIOC_PIN8) | \
550 PIN_PUPDR_PULLUP(GPIOC_PIN9) | \
551 PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
552 PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
553 PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
554 PIN_PUPDR_FLOATING(GPIOC_BUTTON) | \
555 PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
556 PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
557#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A5) | \
558 PIN_ODR_HIGH(GPIOC_ARD_A4) | \
559 PIN_ODR_HIGH(GPIOC_PIN2) | \
560 PIN_ODR_HIGH(GPIOC_PIN3) | \
561 PIN_ODR_HIGH(GPIOC_PIN4) | \
562 PIN_ODR_HIGH(GPIOC_PIN5) | \
563 PIN_ODR_HIGH(GPIOC_PIN6) | \
564 PIN_ODR_HIGH(GPIOC_ARD_D9) | \
565 PIN_ODR_HIGH(GPIOC_PIN8) | \
566 PIN_ODR_HIGH(GPIOC_PIN9) | \
567 PIN_ODR_HIGH(GPIOC_PIN10) | \
568 PIN_ODR_HIGH(GPIOC_PIN11) | \
569 PIN_ODR_HIGH(GPIOC_PIN12) | \
570 PIN_ODR_HIGH(GPIOC_BUTTON) | \
571 PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
572 PIN_ODR_HIGH(GPIOC_OSC32_OUT))
573#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A5, 0U) | \
574 PIN_AFIO_AF(GPIOC_ARD_A4, 0U) | \
575 PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
576 PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
577 PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
578 PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
579 PIN_AFIO_AF(GPIOC_PIN6, 0U) | \
580 PIN_AFIO_AF(GPIOC_ARD_D9, 0U))
581#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \
582 PIN_AFIO_AF(GPIOC_PIN9, 0U) | \
583 PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
584 PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
585 PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
586 PIN_AFIO_AF(GPIOC_BUTTON, 0U) | \
587 PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
588 PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
589
590/*
591 * GPIOD setup:
592 *
593 * PD0 - PIN0 (input pullup).
594 * PD1 - PIN1 (input pullup).
595 * PD2 - PIN2 (input pullup).
596 * PD3 - PIN3 (input pullup).
597 * PD4 - PIN4 (input pullup).
598 * PD5 - PIN5 (input pullup).
599 * PD6 - PIN6 (input pullup).
600 * PD7 - PIN7 (input pullup).
601 * PD8 - PIN8 (input pullup).
602 * PD9 - PIN9 (input pullup).
603 * PD10 - PIN10 (input pullup).
604 * PD11 - PIN11 (input pullup).
605 * PD12 - PIN12 (input pullup).
606 * PD13 - PIN13 (input pullup).
607 * PD14 - PIN14 (input pullup).
608 * PD15 - PIN15 (input pullup).
609 */
610#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
611 PIN_MODE_INPUT(GPIOD_PIN1) | \
612 PIN_MODE_INPUT(GPIOD_PIN2) | \
613 PIN_MODE_INPUT(GPIOD_PIN3) | \
614 PIN_MODE_INPUT(GPIOD_PIN4) | \
615 PIN_MODE_INPUT(GPIOD_PIN5) | \
616 PIN_MODE_INPUT(GPIOD_PIN6) | \
617 PIN_MODE_INPUT(GPIOD_PIN7) | \
618 PIN_MODE_INPUT(GPIOD_PIN8) | \
619 PIN_MODE_INPUT(GPIOD_PIN9) | \
620 PIN_MODE_INPUT(GPIOD_PIN10) | \
621 PIN_MODE_INPUT(GPIOD_PIN11) | \
622 PIN_MODE_INPUT(GPIOD_PIN12) | \
623 PIN_MODE_INPUT(GPIOD_PIN13) | \
624 PIN_MODE_INPUT(GPIOD_PIN14) | \
625 PIN_MODE_INPUT(GPIOD_PIN15))
626#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
627 PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
628 PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
629 PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
630 PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
631 PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
632 PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
633 PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
634 PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
635 PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
636 PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
637 PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
638 PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
639 PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
640 PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
641 PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
642#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \
643 PIN_OSPEED_HIGH(GPIOD_PIN1) | \
644 PIN_OSPEED_HIGH(GPIOD_PIN2) | \
645 PIN_OSPEED_HIGH(GPIOD_PIN3) | \
646 PIN_OSPEED_HIGH(GPIOD_PIN4) | \
647 PIN_OSPEED_HIGH(GPIOD_PIN5) | \
648 PIN_OSPEED_HIGH(GPIOD_PIN6) | \
649 PIN_OSPEED_HIGH(GPIOD_PIN7) | \
650 PIN_OSPEED_HIGH(GPIOD_PIN8) | \
651 PIN_OSPEED_HIGH(GPIOD_PIN9) | \
652 PIN_OSPEED_HIGH(GPIOD_PIN10) | \
653 PIN_OSPEED_HIGH(GPIOD_PIN11) | \
654 PIN_OSPEED_HIGH(GPIOD_PIN12) | \
655 PIN_OSPEED_HIGH(GPIOD_PIN13) | \
656 PIN_OSPEED_HIGH(GPIOD_PIN14) | \
657 PIN_OSPEED_HIGH(GPIOD_PIN15))
658#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
659 PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
660 PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
661 PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
662 PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
663 PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
664 PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
665 PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
666 PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
667 PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
668 PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
669 PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
670 PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
671 PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
672 PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
673 PIN_PUPDR_PULLUP(GPIOD_PIN15))
674#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
675 PIN_ODR_HIGH(GPIOD_PIN1) | \
676 PIN_ODR_HIGH(GPIOD_PIN2) | \
677 PIN_ODR_HIGH(GPIOD_PIN3) | \
678 PIN_ODR_HIGH(GPIOD_PIN4) | \
679 PIN_ODR_HIGH(GPIOD_PIN5) | \
680 PIN_ODR_HIGH(GPIOD_PIN6) | \
681 PIN_ODR_HIGH(GPIOD_PIN7) | \
682 PIN_ODR_HIGH(GPIOD_PIN8) | \
683 PIN_ODR_HIGH(GPIOD_PIN9) | \
684 PIN_ODR_HIGH(GPIOD_PIN10) | \
685 PIN_ODR_HIGH(GPIOD_PIN11) | \
686 PIN_ODR_HIGH(GPIOD_PIN12) | \
687 PIN_ODR_HIGH(GPIOD_PIN13) | \
688 PIN_ODR_HIGH(GPIOD_PIN14) | \
689 PIN_ODR_HIGH(GPIOD_PIN15))
690#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
691 PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
692 PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
693 PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
694 PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
695 PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
696 PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
697 PIN_AFIO_AF(GPIOD_PIN7, 0U))
698#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
699 PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
700 PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
701 PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
702 PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
703 PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
704 PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
705 PIN_AFIO_AF(GPIOD_PIN15, 0U))
706
707/*
708 * GPIOF setup:
709 *
710 * PF0 - OSC_IN (input floating).
711 * PF1 - OSC_OUT (input floating).
712 * PF2 - PIN2 (input pullup).
713 * PF3 - PIN3 (input pullup).
714 * PF4 - PIN4 (input pullup).
715 * PF5 - PIN5 (input pullup).
716 * PF6 - PIN6 (input pullup).
717 * PF7 - PIN7 (input pullup).
718 * PF8 - PIN8 (input pullup).
719 * PF9 - PIN9 (input pullup).
720 * PF10 - PIN10 (input pullup).
721 * PF11 - PIN11 (input pullup).
722 * PF12 - PIN12 (input pullup).
723 * PF13 - PIN13 (input pullup).
724 * PF14 - PIN14 (input pullup).
725 * PF15 - PIN15 (input pullup).
726 */
727#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
728 PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
729 PIN_MODE_INPUT(GPIOF_PIN2) | \
730 PIN_MODE_INPUT(GPIOF_PIN3) | \
731 PIN_MODE_INPUT(GPIOF_PIN4) | \
732 PIN_MODE_INPUT(GPIOF_PIN5) | \
733 PIN_MODE_INPUT(GPIOF_PIN6) | \
734 PIN_MODE_INPUT(GPIOF_PIN7) | \
735 PIN_MODE_INPUT(GPIOF_PIN8) | \
736 PIN_MODE_INPUT(GPIOF_PIN9) | \
737 PIN_MODE_INPUT(GPIOF_PIN10) | \
738 PIN_MODE_INPUT(GPIOF_PIN11) | \
739 PIN_MODE_INPUT(GPIOF_PIN12) | \
740 PIN_MODE_INPUT(GPIOF_PIN13) | \
741 PIN_MODE_INPUT(GPIOF_PIN14) | \
742 PIN_MODE_INPUT(GPIOF_PIN15))
743#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
744 PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
745 PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
746 PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
747 PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
748 PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
749 PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
750 PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
751 PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
752 PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
753 PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
754 PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
755 PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
756 PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
757 PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
758 PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
759#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
760 PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
761 PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
762 PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
763 PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
764 PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
765 PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
766 PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
767 PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
768 PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
769 PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
770 PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
771 PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
772 PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
773 PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
774 PIN_OSPEED_VERYLOW(GPIOF_PIN15))
775#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
776 PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
777 PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
778 PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
779 PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
780 PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
781 PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
782 PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
783 PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
784 PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
785 PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
786 PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
787 PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
788 PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
789 PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
790 PIN_PUPDR_PULLUP(GPIOF_PIN15))
791#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
792 PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
793 PIN_ODR_HIGH(GPIOF_PIN2) | \
794 PIN_ODR_HIGH(GPIOF_PIN3) | \
795 PIN_ODR_HIGH(GPIOF_PIN4) | \
796 PIN_ODR_HIGH(GPIOF_PIN5) | \
797 PIN_ODR_HIGH(GPIOF_PIN6) | \
798 PIN_ODR_HIGH(GPIOF_PIN7) | \
799 PIN_ODR_HIGH(GPIOF_PIN8) | \
800 PIN_ODR_HIGH(GPIOF_PIN9) | \
801 PIN_ODR_HIGH(GPIOF_PIN10) | \
802 PIN_ODR_HIGH(GPIOF_PIN11) | \
803 PIN_ODR_HIGH(GPIOF_PIN12) | \
804 PIN_ODR_HIGH(GPIOF_PIN13) | \
805 PIN_ODR_HIGH(GPIOF_PIN14) | \
806 PIN_ODR_HIGH(GPIOF_PIN15))
807#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
808 PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
809 PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
810 PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
811 PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
812 PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
813 PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
814 PIN_AFIO_AF(GPIOF_PIN7, 0U))
815#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
816 PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
817 PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
818 PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
819 PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
820 PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
821 PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
822 PIN_AFIO_AF(GPIOF_PIN15, 0U))
823
824/*===========================================================================*/
825/* External declarations. */
826/*===========================================================================*/
827
828#if !defined(_FROM_ASM_)
829#ifdef __cplusplus
830extern "C" {
831#endif
832 void boardInit(void);
833#ifdef __cplusplus
834}
835#endif
836#endif /* _FROM_ASM_ */
837
838#endif /* BOARD_H */