aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h')
-rw-r--r--lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h1420
1 files changed, 1420 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h b/lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h
new file mode 100644
index 000000000..9981fecb5
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_STM32F429I_DISCOVERY/board.h
@@ -0,0 +1,1420 @@
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 STM32F429I-Discovery board.
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_ST_STM32F429I_DISCOVERY
37#define BOARD_NAME "STMicroelectronics STM32F429I-Discovery"
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#if !defined(STM32_HSECLK)
48#define STM32_HSECLK 8000000U
49#endif
50
51/*
52 * Board voltages.
53 * Required for performance limits calculation.
54 */
55#define STM32_VDD 300U
56
57/*
58 * MCU type as defined in the ST header.
59 */
60#define STM32F429xx
61
62/*
63 * IO pins assignments.
64 */
65#define GPIOA_BUTTON 0U
66#define GPIOA_MEMS_INT1 1U
67#define GPIOA_MEMS_INT2 2U
68#define GPIOA_LCD_B5 3U
69#define GPIOA_LCD_VSYNC 4U
70#define GPIOA_PIN5 5U
71#define GPIOA_LCD_G2 6U
72#define GPIOA_ACP_RST 7U
73#define GPIOA_I2C3_SCL 8U
74#define GPIOA_UART_TX 9U
75#define GPIOA_UART_RX 10U
76#define GPIOA_LCD_R4 11U
77#define GPIOA_LCD_R5 12U
78#define GPIOA_SWDIO 13U
79#define GPIOA_SWCLK 14U
80#define GPIOA_TP_INT 15U
81
82#define GPIOB_LCD_R3 0U
83#define GPIOB_LCD_R6 1U
84#define GPIOB_BOOT1 2U
85#define GPIOB_SWO 3U
86#define GPIOB_PIN4 4U
87#define GPIOB_FMC_SDCKE1 5U
88#define GPIOB_FMC_SDNE1 6U
89#define GPIOB_PIN7 7U
90#define GPIOB_LCD_B6 8U
91#define GPIOB_LCD_B7 9U
92#define GPIOB_LCD_G4 10U
93#define GPIOB_LCD_G5 11U
94#define GPIOB_OTG_HS_ID 12U
95#define GPIOB_OTG_HS_VBUS 13U
96#define GPIOB_OTG_HS_DM 14U
97#define GPIOB_OTG_HS_DP 15U
98
99#define GPIOC_FMC_SDNWE 0U
100#define GPIOC_SPI5_MEMS_CS 1U
101#define GPIOC_SPI5_LCD_CS 2U
102#define GPIOC_PIN3 3U
103#define GPIOC_OTG_HS_PSO 4U
104#define GPIOC_OTG_HS_OC 5U
105#define GPIOC_LCD_HSYNC 6U
106#define GPIOC_LCD_G6 7U
107#define GPIOC_PIN8 8U
108#define GPIOC_I2C3_SDA 9U
109#define GPIOC_LCD_R2 10U
110#define GPIOC_PIN11 11U
111#define GPIOC_PIN12 12U
112#define GPIOC_PIN13 13U
113#define GPIOC_OSC32_IN 14U
114#define GPIOC_OSC32_OUT 15U
115
116#define GPIOD_FMC_D2 0U
117#define GPIOD_FMC_D3 1U
118#define GPIOD_PIN2 2U
119#define GPIOD_LCD_G7 3U
120#define GPIOD_PIN4 4U
121#define GPIOD_PIN5 5U
122#define GPIOD_LCD_B2 6U
123#define GPIOD_PIN7 7U
124#define GPIOD_FMC_D13 8U
125#define GPIOD_FMC_D14 9U
126#define GPIOD_FMC_D15 10U
127#define GPIOD_LCD_TE 11U
128#define GPIOD_LCD_RDX 12U
129#define GPIOD_LCD_WRX 13U
130#define GPIOD_FMC_D0 14U
131#define GPIOD_FMC_D1 15U
132
133#define GPIOE_FMC_NBL0 0U
134#define GPIOE_FMC_NBL1 1U
135#define GPIOE_PIN2 2U
136#define GPIOE_PIN3 3U
137#define GPIOE_PIN4 4U
138#define GPIOE_PIN5 5U
139#define GPIOE_PIN6 6U
140#define GPIOE_FMC_D4 7U
141#define GPIOE_FMC_D5 8U
142#define GPIOE_FMC_D6 9U
143#define GPIOE_FMC_D7 10U
144#define GPIOE_FMC_D8 11U
145#define GPIOE_FMC_D9 12U
146#define GPIOE_FMC_D10 13U
147#define GPIOE_FMC_D11 14U
148#define GPIOE_FMC_D12 15U
149
150#define GPIOF_FMC_A0 0U
151#define GPIOF_FMC_A1 1U
152#define GPIOF_FMC_A2 2U
153#define GPIOF_FMC_A3 3U
154#define GPIOF_FMC_A4 4U
155#define GPIOF_FMC_A5 5U
156#define GPIOF_PIN6 6U
157#define GPIOF_LCD_DCX 7U
158#define GPIOF_SPI5_MISO 8U
159#define GPIOF_SPI5_MOSI 9U
160#define GPIOF_LCD_DE 10U
161#define GPIOF_FMC_SDNRAS 11U
162#define GPIOF_FMC_A6 12U
163#define GPIOF_FMC_A7 13U
164#define GPIOF_FMC_A8 14U
165#define GPIOF_FMC_A9 15U
166
167#define GPIOG_FMC_A10 0U
168#define GPIOG_FMC_A11 1U
169#define GPIOG_PIN2 2U
170#define GPIOG_PIN3 3U
171#define GPIOG_FMC_BA0 4U
172#define GPIOG_FMC_BA1 5U
173#define GPIOG_LCD_R7 6U
174#define GPIOG_LCD_CLK 7U
175#define GPIOG_FMC_SDCLK 8U
176#define GPIOG_PIN9 9U
177#define GPIOG_LCD_G3 10U
178#define GPIOG_LCD_B3 11U
179#define GPIOG_LCD_B4 12U
180#define GPIOG_LED3_GREEN 13U
181#define GPIOG_LED4_RED 14U
182#define GPIOG_FMC_SDNCAS 15U
183
184#define GPIOH_OSC_IN 0U
185#define GPIOH_OSC_OUT 1U
186#define GPIOH_PIN2 2U
187#define GPIOH_PIN3 3U
188#define GPIOH_PIN4 4U
189#define GPIOH_PIN5 5U
190#define GPIOH_PIN6 6U
191#define GPIOH_PIN7 7U
192#define GPIOH_PIN8 8U
193#define GPIOH_PIN9 9U
194#define GPIOH_PIN10 10U
195#define GPIOH_PIN11 11U
196#define GPIOH_PIN12 12U
197#define GPIOH_PIN13 13U
198#define GPIOH_PIN14 14U
199#define GPIOH_PIN15 15U
200
201#define GPIOI_PIN0 0U
202#define GPIOI_PIN1 1U
203#define GPIOI_PIN2 2U
204#define GPIOI_PIN3 3U
205#define GPIOI_PIN4 4U
206#define GPIOI_PIN5 5U
207#define GPIOI_PIN6 6U
208#define GPIOI_PIN7 7U
209#define GPIOI_PIN8 8U
210#define GPIOI_PIN9 9U
211#define GPIOI_PIN10 10U
212#define GPIOI_PIN11 11U
213#define GPIOI_PIN12 12U
214#define GPIOI_PIN13 13U
215#define GPIOI_PIN14 14U
216#define GPIOI_PIN15 15U
217
218/*
219 * IO lines assignments.
220 */
221#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
222#define LINE_MEMS_INT1 PAL_LINE(GPIOA, 1U)
223#define LINE_MEMS_INT2 PAL_LINE(GPIOA, 2U)
224#define LINE_LCD_B5 PAL_LINE(GPIOA, 3U)
225#define LINE_LCD_VSYNC PAL_LINE(GPIOA, 4U)
226#define LINE_LCD_G2 PAL_LINE(GPIOA, 6U)
227#define LINE_ACP_RST PAL_LINE(GPIOA, 7U)
228#define LINE_I2C3_SCL PAL_LINE(GPIOA, 8U)
229#define LINE_UART_TX PAL_LINE(GPIOA, 9U)
230#define LINE_UART_RX PAL_LINE(GPIOA, 10U)
231#define LINE_LCD_R4 PAL_LINE(GPIOA, 11U)
232#define LINE_LCD_R5 PAL_LINE(GPIOA, 12U)
233#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
234#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
235#define LINE_TP_INT PAL_LINE(GPIOA, 15U)
236#define LINE_LCD_R3 PAL_LINE(GPIOB, 0U)
237#define LINE_LCD_R6 PAL_LINE(GPIOB, 1U)
238#define LINE_BOOT1 PAL_LINE(GPIOB, 2U)
239#define LINE_SWO PAL_LINE(GPIOB, 3U)
240#define LINE_FMC_SDCKE1 PAL_LINE(GPIOB, 5U)
241#define LINE_FMC_SDNE1 PAL_LINE(GPIOB, 6U)
242#define LINE_LCD_B6 PAL_LINE(GPIOB, 8U)
243#define LINE_LCD_B7 PAL_LINE(GPIOB, 9U)
244#define LINE_LCD_G4 PAL_LINE(GPIOB, 10U)
245#define LINE_LCD_G5 PAL_LINE(GPIOB, 11U)
246#define LINE_OTG_HS_ID PAL_LINE(GPIOB, 12U)
247#define LINE_OTG_HS_VBUS PAL_LINE(GPIOB, 13U)
248#define LINE_OTG_HS_DM PAL_LINE(GPIOB, 14U)
249#define LINE_OTG_HS_DP PAL_LINE(GPIOB, 15U)
250#define LINE_FMC_SDNWE PAL_LINE(GPIOC, 0U)
251#define LINE_SPI5_MEMS_CS PAL_LINE(GPIOC, 1U)
252#define LINE_SPI5_LCD_CS PAL_LINE(GPIOC, 2U)
253#define LINE_OTG_HS_PSO PAL_LINE(GPIOC, 4U)
254#define LINE_OTG_HS_OC PAL_LINE(GPIOC, 5U)
255#define LINE_LCD_HSYNC PAL_LINE(GPIOC, 6U)
256#define LINE_LCD_G6 PAL_LINE(GPIOC, 7U)
257#define LINE_I2C3_SDA PAL_LINE(GPIOC, 9U)
258#define LINE_LCD_R2 PAL_LINE(GPIOC, 10U)
259#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
260#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
261#define LINE_FMC_D2 PAL_LINE(GPIOD, 0U)
262#define LINE_FMC_D3 PAL_LINE(GPIOD, 1U)
263#define LINE_LCD_G7 PAL_LINE(GPIOD, 3U)
264#define LINE_LCD_B2 PAL_LINE(GPIOD, 6U)
265#define LINE_FMC_D13 PAL_LINE(GPIOD, 8U)
266#define LINE_FMC_D14 PAL_LINE(GPIOD, 9U)
267#define LINE_FMC_D15 PAL_LINE(GPIOD, 10U)
268#define LINE_LCD_TE PAL_LINE(GPIOD, 11U)
269#define LINE_LCD_RDX PAL_LINE(GPIOD, 12U)
270#define LINE_LCD_WRX PAL_LINE(GPIOD, 13U)
271#define LINE_FMC_D0 PAL_LINE(GPIOD, 14U)
272#define LINE_FMC_D1 PAL_LINE(GPIOD, 15U)
273#define LINE_FMC_NBL0 PAL_LINE(GPIOE, 0U)
274#define LINE_FMC_NBL1 PAL_LINE(GPIOE, 1U)
275#define LINE_FMC_D4 PAL_LINE(GPIOE, 7U)
276#define LINE_FMC_D5 PAL_LINE(GPIOE, 8U)
277#define LINE_FMC_D6 PAL_LINE(GPIOE, 9U)
278#define LINE_FMC_D7 PAL_LINE(GPIOE, 10U)
279#define LINE_FMC_D8 PAL_LINE(GPIOE, 11U)
280#define LINE_FMC_D9 PAL_LINE(GPIOE, 12U)
281#define LINE_FMC_D10 PAL_LINE(GPIOE, 13U)
282#define LINE_FMC_D11 PAL_LINE(GPIOE, 14U)
283#define LINE_FMC_D12 PAL_LINE(GPIOE, 15U)
284#define LINE_FMC_A0 PAL_LINE(GPIOF, 0U)
285#define LINE_FMC_A1 PAL_LINE(GPIOF, 1U)
286#define LINE_FMC_A2 PAL_LINE(GPIOF, 2U)
287#define LINE_FMC_A3 PAL_LINE(GPIOF, 3U)
288#define LINE_FMC_A4 PAL_LINE(GPIOF, 4U)
289#define LINE_FMC_A5 PAL_LINE(GPIOF, 5U)
290#define LINE_LCD_DCX PAL_LINE(GPIOF, 7U)
291#define LINE_SPI5_MISO PAL_LINE(GPIOF, 8U)
292#define LINE_SPI5_MOSI PAL_LINE(GPIOF, 9U)
293#define LINE_LCD_DE PAL_LINE(GPIOF, 10U)
294#define LINE_FMC_SDNRAS PAL_LINE(GPIOF, 11U)
295#define LINE_FMC_A6 PAL_LINE(GPIOF, 12U)
296#define LINE_FMC_A7 PAL_LINE(GPIOF, 13U)
297#define LINE_FMC_A8 PAL_LINE(GPIOF, 14U)
298#define LINE_FMC_A9 PAL_LINE(GPIOF, 15U)
299#define LINE_FMC_A10 PAL_LINE(GPIOG, 0U)
300#define LINE_FMC_A11 PAL_LINE(GPIOG, 1U)
301#define LINE_FMC_BA0 PAL_LINE(GPIOG, 4U)
302#define LINE_FMC_BA1 PAL_LINE(GPIOG, 5U)
303#define LINE_LCD_R7 PAL_LINE(GPIOG, 6U)
304#define LINE_LCD_CLK PAL_LINE(GPIOG, 7U)
305#define LINE_FMC_SDCLK PAL_LINE(GPIOG, 8U)
306#define LINE_LCD_G3 PAL_LINE(GPIOG, 10U)
307#define LINE_LCD_B3 PAL_LINE(GPIOG, 11U)
308#define LINE_LCD_B4 PAL_LINE(GPIOG, 12U)
309#define LINE_LED3_GREEN PAL_LINE(GPIOG, 13U)
310#define LINE_LED4_RED PAL_LINE(GPIOG, 14U)
311#define LINE_FMC_SDNCAS PAL_LINE(GPIOG, 15U)
312#define LINE_OSC_IN PAL_LINE(GPIOH, 0U)
313#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U)
314
315/*===========================================================================*/
316/* Driver pre-compile time settings. */
317/*===========================================================================*/
318
319/*===========================================================================*/
320/* Derived constants and error checks. */
321/*===========================================================================*/
322
323/*===========================================================================*/
324/* Driver data structures and types. */
325/*===========================================================================*/
326
327/*===========================================================================*/
328/* Driver macros. */
329/*===========================================================================*/
330
331/*
332 * I/O ports initial setup, this configuration is established soon after reset
333 * in the initialization code.
334 * Please refer to the STM32 Reference Manual for details.
335 */
336#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
337#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
338#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
339#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
340#define PIN_ODR_LOW(n) (0U << (n))
341#define PIN_ODR_HIGH(n) (1U << (n))
342#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
343#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
344#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
345#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
346#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
347#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
348#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
349#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
350#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
351#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
352
353/*
354 * GPIOA setup:
355 *
356 * PA0 - BUTTON (input floating).
357 * PA1 - MEMS_INT1 (input floating).
358 * PA2 - MEMS_INT2 (input floating).
359 * PA3 - LCD_B5 (alternate 14).
360 * PA4 - LCD_VSYNC (alternate 14).
361 * PA5 - PIN5 (input pullup).
362 * PA6 - LCD_G2 (alternate 14).
363 * PA7 - ACP_RST (input pullup).
364 * PA8 - I2C3_SCL (alternate 4).
365 * PA9 - UART_TX (alternate 7).
366 * PA10 - UART_RX (alternate 7).
367 * PA11 - LCD_R4 (alternate 14).
368 * PA12 - LCD_R5 (alternate 14).
369 * PA13 - SWDIO (alternate 0).
370 * PA14 - SWCLK (alternate 0).
371 * PA15 - TP_INT (input floating).
372 */
373#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
374 PIN_MODE_INPUT(GPIOA_MEMS_INT1) | \
375 PIN_MODE_INPUT(GPIOA_MEMS_INT2) | \
376 PIN_MODE_ALTERNATE(GPIOA_LCD_B5) | \
377 PIN_MODE_ALTERNATE(GPIOA_LCD_VSYNC) | \
378 PIN_MODE_INPUT(GPIOA_PIN5) | \
379 PIN_MODE_ALTERNATE(GPIOA_LCD_G2) | \
380 PIN_MODE_INPUT(GPIOA_ACP_RST) | \
381 PIN_MODE_ALTERNATE(GPIOA_I2C3_SCL) | \
382 PIN_MODE_ALTERNATE(GPIOA_UART_TX) | \
383 PIN_MODE_ALTERNATE(GPIOA_UART_RX) | \
384 PIN_MODE_ALTERNATE(GPIOA_LCD_R4) | \
385 PIN_MODE_ALTERNATE(GPIOA_LCD_R5) | \
386 PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
387 PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
388 PIN_MODE_INPUT(GPIOA_TP_INT))
389#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
390 PIN_OTYPE_PUSHPULL(GPIOA_MEMS_INT1) | \
391 PIN_OTYPE_PUSHPULL(GPIOA_MEMS_INT2) | \
392 PIN_OTYPE_PUSHPULL(GPIOA_LCD_B5) | \
393 PIN_OTYPE_PUSHPULL(GPIOA_LCD_VSYNC) | \
394 PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
395 PIN_OTYPE_PUSHPULL(GPIOA_LCD_G2) | \
396 PIN_OTYPE_PUSHPULL(GPIOA_ACP_RST) | \
397 PIN_OTYPE_OPENDRAIN(GPIOA_I2C3_SCL) | \
398 PIN_OTYPE_PUSHPULL(GPIOA_UART_TX) | \
399 PIN_OTYPE_PUSHPULL(GPIOA_UART_RX) | \
400 PIN_OTYPE_PUSHPULL(GPIOA_LCD_R4) | \
401 PIN_OTYPE_PUSHPULL(GPIOA_LCD_R5) | \
402 PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
403 PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
404 PIN_OTYPE_PUSHPULL(GPIOA_TP_INT))
405#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
406 PIN_OSPEED_VERYLOW(GPIOA_MEMS_INT1) | \
407 PIN_OSPEED_VERYLOW(GPIOA_MEMS_INT2) | \
408 PIN_OSPEED_HIGH(GPIOA_LCD_B5) | \
409 PIN_OSPEED_HIGH(GPIOA_LCD_VSYNC) | \
410 PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
411 PIN_OSPEED_HIGH(GPIOA_LCD_G2) | \
412 PIN_OSPEED_VERYLOW(GPIOA_ACP_RST) | \
413 PIN_OSPEED_HIGH(GPIOA_I2C3_SCL) | \
414 PIN_OSPEED_VERYLOW(GPIOA_UART_TX) | \
415 PIN_OSPEED_VERYLOW(GPIOA_UART_RX) | \
416 PIN_OSPEED_HIGH(GPIOA_LCD_R4) | \
417 PIN_OSPEED_HIGH(GPIOA_LCD_R5) | \
418 PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
419 PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
420 PIN_OSPEED_VERYLOW(GPIOA_TP_INT))
421#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
422 PIN_PUPDR_FLOATING(GPIOA_MEMS_INT1) | \
423 PIN_PUPDR_FLOATING(GPIOA_MEMS_INT2) | \
424 PIN_PUPDR_FLOATING(GPIOA_LCD_B5) | \
425 PIN_PUPDR_FLOATING(GPIOA_LCD_VSYNC) | \
426 PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
427 PIN_PUPDR_FLOATING(GPIOA_LCD_G2) | \
428 PIN_PUPDR_PULLUP(GPIOA_ACP_RST) | \
429 PIN_PUPDR_FLOATING(GPIOA_I2C3_SCL) | \
430 PIN_PUPDR_PULLUP(GPIOA_UART_TX) | \
431 PIN_PUPDR_PULLUP(GPIOA_UART_RX) | \
432 PIN_PUPDR_FLOATING(GPIOA_LCD_R4) | \
433 PIN_PUPDR_FLOATING(GPIOA_LCD_R5) | \
434 PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
435 PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
436 PIN_PUPDR_FLOATING(GPIOA_TP_INT))
437#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
438 PIN_ODR_HIGH(GPIOA_MEMS_INT1) | \
439 PIN_ODR_HIGH(GPIOA_MEMS_INT2) | \
440 PIN_ODR_HIGH(GPIOA_LCD_B5) | \
441 PIN_ODR_HIGH(GPIOA_LCD_VSYNC) | \
442 PIN_ODR_HIGH(GPIOA_PIN5) | \
443 PIN_ODR_HIGH(GPIOA_LCD_G2) | \
444 PIN_ODR_HIGH(GPIOA_ACP_RST) | \
445 PIN_ODR_HIGH(GPIOA_I2C3_SCL) | \
446 PIN_ODR_HIGH(GPIOA_UART_TX) | \
447 PIN_ODR_HIGH(GPIOA_UART_RX) | \
448 PIN_ODR_HIGH(GPIOA_LCD_R4) | \
449 PIN_ODR_HIGH(GPIOA_LCD_R5) | \
450 PIN_ODR_HIGH(GPIOA_SWDIO) | \
451 PIN_ODR_HIGH(GPIOA_SWCLK) | \
452 PIN_ODR_HIGH(GPIOA_TP_INT))
453#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
454 PIN_AFIO_AF(GPIOA_MEMS_INT1, 0U) | \
455 PIN_AFIO_AF(GPIOA_MEMS_INT2, 0U) | \
456 PIN_AFIO_AF(GPIOA_LCD_B5, 14U) | \
457 PIN_AFIO_AF(GPIOA_LCD_VSYNC, 14U) | \
458 PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
459 PIN_AFIO_AF(GPIOA_LCD_G2, 14U) | \
460 PIN_AFIO_AF(GPIOA_ACP_RST, 0U))
461#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_I2C3_SCL, 4U) | \
462 PIN_AFIO_AF(GPIOA_UART_TX, 7U) | \
463 PIN_AFIO_AF(GPIOA_UART_RX, 7U) | \
464 PIN_AFIO_AF(GPIOA_LCD_R4, 14U) | \
465 PIN_AFIO_AF(GPIOA_LCD_R5, 14U) | \
466 PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
467 PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
468 PIN_AFIO_AF(GPIOA_TP_INT, 0U))
469
470/*
471 * GPIOB setup:
472 *
473 * PB0 - LCD_R3 (alternate 14).
474 * PB1 - LCD_R6 (alternate 14).
475 * PB2 - BOOT1 (input pullup).
476 * PB3 - SWO (alternate 0).
477 * PB4 - PIN4 (input pullup).
478 * PB5 - FMC_SDCKE1 (alternate 12).
479 * PB6 - FMC_SDNE1 (alternate 12).
480 * PB7 - PIN7 (input pullup).
481 * PB8 - LCD_B6 (alternate 14).
482 * PB9 - LCD_B7 (alternate 14).
483 * PB10 - LCD_G4 (alternate 14).
484 * PB11 - LCD_G5 (alternate 14).
485 * PB12 - OTG_HS_ID (alternate 12).
486 * PB13 - OTG_HS_VBUS (input pulldown).
487 * PB14 - OTG_HS_DM (alternate 12).
488 * PB15 - OTG_HS_DP (alternate 12).
489 */
490#define VAL_GPIOB_MODER (PIN_MODE_ALTERNATE(GPIOB_LCD_R3) | \
491 PIN_MODE_ALTERNATE(GPIOB_LCD_R6) | \
492 PIN_MODE_INPUT(GPIOB_BOOT1) | \
493 PIN_MODE_ALTERNATE(GPIOB_SWO) | \
494 PIN_MODE_INPUT(GPIOB_PIN4) | \
495 PIN_MODE_ALTERNATE(GPIOB_FMC_SDCKE1) | \
496 PIN_MODE_ALTERNATE(GPIOB_FMC_SDNE1) | \
497 PIN_MODE_INPUT(GPIOB_PIN7) | \
498 PIN_MODE_ALTERNATE(GPIOB_LCD_B6) | \
499 PIN_MODE_ALTERNATE(GPIOB_LCD_B7) | \
500 PIN_MODE_ALTERNATE(GPIOB_LCD_G4) | \
501 PIN_MODE_ALTERNATE(GPIOB_LCD_G5) | \
502 PIN_MODE_ALTERNATE(GPIOB_OTG_HS_ID) | \
503 PIN_MODE_INPUT(GPIOB_OTG_HS_VBUS) | \
504 PIN_MODE_ALTERNATE(GPIOB_OTG_HS_DM) | \
505 PIN_MODE_ALTERNATE(GPIOB_OTG_HS_DP))
506#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_LCD_R3) | \
507 PIN_OTYPE_PUSHPULL(GPIOB_LCD_R6) | \
508 PIN_OTYPE_PUSHPULL(GPIOB_BOOT1) | \
509 PIN_OTYPE_PUSHPULL(GPIOB_SWO) | \
510 PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
511 PIN_OTYPE_PUSHPULL(GPIOB_FMC_SDCKE1) | \
512 PIN_OTYPE_PUSHPULL(GPIOB_FMC_SDNE1) | \
513 PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
514 PIN_OTYPE_PUSHPULL(GPIOB_LCD_B6) | \
515 PIN_OTYPE_PUSHPULL(GPIOB_LCD_B7) | \
516 PIN_OTYPE_PUSHPULL(GPIOB_LCD_G4) | \
517 PIN_OTYPE_PUSHPULL(GPIOB_LCD_G5) | \
518 PIN_OTYPE_PUSHPULL(GPIOB_OTG_HS_ID) | \
519 PIN_OTYPE_PUSHPULL(GPIOB_OTG_HS_VBUS) |\
520 PIN_OTYPE_PUSHPULL(GPIOB_OTG_HS_DM) | \
521 PIN_OTYPE_PUSHPULL(GPIOB_OTG_HS_DP))
522#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_LCD_R3) | \
523 PIN_OSPEED_HIGH(GPIOB_LCD_R6) | \
524 PIN_OSPEED_HIGH(GPIOB_BOOT1) | \
525 PIN_OSPEED_HIGH(GPIOB_SWO) | \
526 PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \
527 PIN_OSPEED_HIGH(GPIOB_FMC_SDCKE1) | \
528 PIN_OSPEED_HIGH(GPIOB_FMC_SDNE1) | \
529 PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
530 PIN_OSPEED_HIGH(GPIOB_LCD_B6) | \
531 PIN_OSPEED_HIGH(GPIOB_LCD_B7) | \
532 PIN_OSPEED_HIGH(GPIOB_LCD_G4) | \
533 PIN_OSPEED_HIGH(GPIOB_LCD_G5) | \
534 PIN_OSPEED_HIGH(GPIOB_OTG_HS_ID) | \
535 PIN_OSPEED_VERYLOW(GPIOB_OTG_HS_VBUS) |\
536 PIN_OSPEED_HIGH(GPIOB_OTG_HS_DM) | \
537 PIN_OSPEED_HIGH(GPIOB_OTG_HS_DP))
538#define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(GPIOB_LCD_R3) | \
539 PIN_PUPDR_FLOATING(GPIOB_LCD_R6) | \
540 PIN_PUPDR_PULLUP(GPIOB_BOOT1) | \
541 PIN_PUPDR_FLOATING(GPIOB_SWO) | \
542 PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
543 PIN_PUPDR_FLOATING(GPIOB_FMC_SDCKE1) | \
544 PIN_PUPDR_FLOATING(GPIOB_FMC_SDNE1) | \
545 PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
546 PIN_PUPDR_FLOATING(GPIOB_LCD_B6) | \
547 PIN_PUPDR_FLOATING(GPIOB_LCD_B7) | \
548 PIN_PUPDR_FLOATING(GPIOB_LCD_G4) | \
549 PIN_PUPDR_FLOATING(GPIOB_LCD_G5) | \
550 PIN_PUPDR_FLOATING(GPIOB_OTG_HS_ID) | \
551 PIN_PUPDR_PULLDOWN(GPIOB_OTG_HS_VBUS) |\
552 PIN_PUPDR_FLOATING(GPIOB_OTG_HS_DM) | \
553 PIN_PUPDR_FLOATING(GPIOB_OTG_HS_DP))
554#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_LCD_R3) | \
555 PIN_ODR_HIGH(GPIOB_LCD_R6) | \
556 PIN_ODR_HIGH(GPIOB_BOOT1) | \
557 PIN_ODR_HIGH(GPIOB_SWO) | \
558 PIN_ODR_HIGH(GPIOB_PIN4) | \
559 PIN_ODR_HIGH(GPIOB_FMC_SDCKE1) | \
560 PIN_ODR_HIGH(GPIOB_FMC_SDNE1) | \
561 PIN_ODR_HIGH(GPIOB_PIN7) | \
562 PIN_ODR_HIGH(GPIOB_LCD_B6) | \
563 PIN_ODR_HIGH(GPIOB_LCD_B7) | \
564 PIN_ODR_HIGH(GPIOB_LCD_G4) | \
565 PIN_ODR_HIGH(GPIOB_LCD_G5) | \
566 PIN_ODR_HIGH(GPIOB_OTG_HS_ID) | \
567 PIN_ODR_HIGH(GPIOB_OTG_HS_VBUS) | \
568 PIN_ODR_HIGH(GPIOB_OTG_HS_DM) | \
569 PIN_ODR_HIGH(GPIOB_OTG_HS_DP))
570#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_LCD_R3, 14U) | \
571 PIN_AFIO_AF(GPIOB_LCD_R6, 14U) | \
572 PIN_AFIO_AF(GPIOB_BOOT1, 0U) | \
573 PIN_AFIO_AF(GPIOB_SWO, 0U) | \
574 PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
575 PIN_AFIO_AF(GPIOB_FMC_SDCKE1, 12U) | \
576 PIN_AFIO_AF(GPIOB_FMC_SDNE1, 12U) | \
577 PIN_AFIO_AF(GPIOB_PIN7, 0U))
578#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_LCD_B6, 14U) | \
579 PIN_AFIO_AF(GPIOB_LCD_B7, 14U) | \
580 PIN_AFIO_AF(GPIOB_LCD_G4, 14U) | \
581 PIN_AFIO_AF(GPIOB_LCD_G5, 14U) | \
582 PIN_AFIO_AF(GPIOB_OTG_HS_ID, 12U) | \
583 PIN_AFIO_AF(GPIOB_OTG_HS_VBUS, 0U) | \
584 PIN_AFIO_AF(GPIOB_OTG_HS_DM, 12U) | \
585 PIN_AFIO_AF(GPIOB_OTG_HS_DP, 12U))
586
587/*
588 * GPIOC setup:
589 *
590 * PC0 - FMC_SDNWE (alternate 12).
591 * PC1 - SPI5_MEMS_CS (output pushpull maximum).
592 * PC2 - SPI5_LCD_CS (output pushpull maximum).
593 * PC3 - PIN3 (input pullup).
594 * PC4 - OTG_HS_PSO (output pushpull maximum).
595 * PC5 - OTG_HS_OC (input floating).
596 * PC6 - LCD_HSYNC (alternate 14).
597 * PC7 - LCD_G6 (alternate 14).
598 * PC8 - PIN8 (input pullup).
599 * PC9 - I2C3_SDA (alternate 4).
600 * PC10 - LCD_R2 (alternate 14).
601 * PC11 - PIN11 (input pullup).
602 * PC12 - PIN12 (input pullup).
603 * PC13 - PIN13 (input pullup).
604 * PC14 - OSC32_IN (input floating).
605 * PC15 - OSC32_OUT (input floating).
606 */
607#define VAL_GPIOC_MODER (PIN_MODE_ALTERNATE(GPIOC_FMC_SDNWE) | \
608 PIN_MODE_OUTPUT(GPIOC_SPI5_MEMS_CS) | \
609 PIN_MODE_OUTPUT(GPIOC_SPI5_LCD_CS) | \
610 PIN_MODE_INPUT(GPIOC_PIN3) | \
611 PIN_MODE_OUTPUT(GPIOC_OTG_HS_PSO) | \
612 PIN_MODE_INPUT(GPIOC_OTG_HS_OC) | \
613 PIN_MODE_ALTERNATE(GPIOC_LCD_HSYNC) | \
614 PIN_MODE_ALTERNATE(GPIOC_LCD_G6) | \
615 PIN_MODE_INPUT(GPIOC_PIN8) | \
616 PIN_MODE_ALTERNATE(GPIOC_I2C3_SDA) | \
617 PIN_MODE_ALTERNATE(GPIOC_LCD_R2) | \
618 PIN_MODE_INPUT(GPIOC_PIN11) | \
619 PIN_MODE_INPUT(GPIOC_PIN12) | \
620 PIN_MODE_INPUT(GPIOC_PIN13) | \
621 PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
622 PIN_MODE_INPUT(GPIOC_OSC32_OUT))
623#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_FMC_SDNWE) | \
624 PIN_OTYPE_PUSHPULL(GPIOC_SPI5_MEMS_CS) |\
625 PIN_OTYPE_PUSHPULL(GPIOC_SPI5_LCD_CS) |\
626 PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
627 PIN_OTYPE_PUSHPULL(GPIOC_OTG_HS_PSO) | \
628 PIN_OTYPE_PUSHPULL(GPIOC_OTG_HS_OC) | \
629 PIN_OTYPE_PUSHPULL(GPIOC_LCD_HSYNC) | \
630 PIN_OTYPE_PUSHPULL(GPIOC_LCD_G6) | \
631 PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \
632 PIN_OTYPE_OPENDRAIN(GPIOC_I2C3_SDA) | \
633 PIN_OTYPE_PUSHPULL(GPIOC_LCD_R2) | \
634 PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
635 PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
636 PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
637 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
638 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
639#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_FMC_SDNWE) | \
640 PIN_OSPEED_HIGH(GPIOC_SPI5_MEMS_CS) | \
641 PIN_OSPEED_HIGH(GPIOC_SPI5_LCD_CS) | \
642 PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
643 PIN_OSPEED_HIGH(GPIOC_OTG_HS_PSO) | \
644 PIN_OSPEED_HIGH(GPIOC_OTG_HS_OC) | \
645 PIN_OSPEED_HIGH(GPIOC_LCD_HSYNC) | \
646 PIN_OSPEED_HIGH(GPIOC_LCD_G6) | \
647 PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \
648 PIN_OSPEED_HIGH(GPIOC_I2C3_SDA) | \
649 PIN_OSPEED_HIGH(GPIOC_LCD_R2) | \
650 PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
651 PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
652 PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
653 PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
654 PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
655#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_FMC_SDNWE) | \
656 PIN_PUPDR_FLOATING(GPIOC_SPI5_MEMS_CS) |\
657 PIN_PUPDR_FLOATING(GPIOC_SPI5_LCD_CS) |\
658 PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
659 PIN_PUPDR_FLOATING(GPIOC_OTG_HS_PSO) | \
660 PIN_PUPDR_FLOATING(GPIOC_OTG_HS_OC) | \
661 PIN_PUPDR_FLOATING(GPIOC_LCD_HSYNC) | \
662 PIN_PUPDR_FLOATING(GPIOC_LCD_G6) | \
663 PIN_PUPDR_PULLUP(GPIOC_PIN8) | \
664 PIN_PUPDR_FLOATING(GPIOC_I2C3_SDA) | \
665 PIN_PUPDR_FLOATING(GPIOC_LCD_R2) | \
666 PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
667 PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
668 PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
669 PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
670 PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
671#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_FMC_SDNWE) | \
672 PIN_ODR_HIGH(GPIOC_SPI5_MEMS_CS) | \
673 PIN_ODR_HIGH(GPIOC_SPI5_LCD_CS) | \
674 PIN_ODR_HIGH(GPIOC_PIN3) | \
675 PIN_ODR_HIGH(GPIOC_OTG_HS_PSO) | \
676 PIN_ODR_HIGH(GPIOC_OTG_HS_OC) | \
677 PIN_ODR_HIGH(GPIOC_LCD_HSYNC) | \
678 PIN_ODR_HIGH(GPIOC_LCD_G6) | \
679 PIN_ODR_HIGH(GPIOC_PIN8) | \
680 PIN_ODR_HIGH(GPIOC_I2C3_SDA) | \
681 PIN_ODR_HIGH(GPIOC_LCD_R2) | \
682 PIN_ODR_HIGH(GPIOC_PIN11) | \
683 PIN_ODR_HIGH(GPIOC_PIN12) | \
684 PIN_ODR_HIGH(GPIOC_PIN13) | \
685 PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
686 PIN_ODR_HIGH(GPIOC_OSC32_OUT))
687#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_FMC_SDNWE, 12U) | \
688 PIN_AFIO_AF(GPIOC_SPI5_MEMS_CS, 0U) | \
689 PIN_AFIO_AF(GPIOC_SPI5_LCD_CS, 0U) | \
690 PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
691 PIN_AFIO_AF(GPIOC_OTG_HS_PSO, 0U) | \
692 PIN_AFIO_AF(GPIOC_OTG_HS_OC, 0U) | \
693 PIN_AFIO_AF(GPIOC_LCD_HSYNC, 14U) | \
694 PIN_AFIO_AF(GPIOC_LCD_G6, 14U))
695#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \
696 PIN_AFIO_AF(GPIOC_I2C3_SDA, 4U) | \
697 PIN_AFIO_AF(GPIOC_LCD_R2, 14U) | \
698 PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
699 PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
700 PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
701 PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
702 PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
703
704/*
705 * GPIOD setup:
706 *
707 * PD0 - FMC_D2 (alternate 12).
708 * PD1 - FMC_D3 (alternate 12).
709 * PD2 - PIN2 (input pullup).
710 * PD3 - LCD_G7 (alternate 14).
711 * PD4 - PIN4 (input pullup).
712 * PD5 - PIN5 (input pullup).
713 * PD6 - LCD_B2 (alternate 14).
714 * PD7 - PIN7 (input pullup).
715 * PD8 - FMC_D13 (alternate 12).
716 * PD9 - FMC_D14 (alternate 12).
717 * PD10 - FMC_D15 (alternate 12).
718 * PD11 - LCD_TE (input floating).
719 * PD12 - LCD_RDX (output pushpull maximum).
720 * PD13 - LCD_WRX (output pushpull maximum).
721 * PD14 - FMC_D0 (alternate 12).
722 * PD15 - FMC_D1 (alternate 12).
723 */
724#define VAL_GPIOD_MODER (PIN_MODE_ALTERNATE(GPIOD_FMC_D2) | \
725 PIN_MODE_ALTERNATE(GPIOD_FMC_D3) | \
726 PIN_MODE_INPUT(GPIOD_PIN2) | \
727 PIN_MODE_ALTERNATE(GPIOD_LCD_G7) | \
728 PIN_MODE_INPUT(GPIOD_PIN4) | \
729 PIN_MODE_INPUT(GPIOD_PIN5) | \
730 PIN_MODE_ALTERNATE(GPIOD_LCD_B2) | \
731 PIN_MODE_INPUT(GPIOD_PIN7) | \
732 PIN_MODE_ALTERNATE(GPIOD_FMC_D13) | \
733 PIN_MODE_ALTERNATE(GPIOD_FMC_D14) | \
734 PIN_MODE_ALTERNATE(GPIOD_FMC_D15) | \
735 PIN_MODE_INPUT(GPIOD_LCD_TE) | \
736 PIN_MODE_OUTPUT(GPIOD_LCD_RDX) | \
737 PIN_MODE_OUTPUT(GPIOD_LCD_WRX) | \
738 PIN_MODE_ALTERNATE(GPIOD_FMC_D0) | \
739 PIN_MODE_ALTERNATE(GPIOD_FMC_D1))
740#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_FMC_D2) | \
741 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D3) | \
742 PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
743 PIN_OTYPE_PUSHPULL(GPIOD_LCD_G7) | \
744 PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
745 PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
746 PIN_OTYPE_PUSHPULL(GPIOD_LCD_B2) | \
747 PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
748 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D13) | \
749 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D14) | \
750 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D15) | \
751 PIN_OTYPE_PUSHPULL(GPIOD_LCD_TE) | \
752 PIN_OTYPE_PUSHPULL(GPIOD_LCD_RDX) | \
753 PIN_OTYPE_PUSHPULL(GPIOD_LCD_WRX) | \
754 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D0) | \
755 PIN_OTYPE_PUSHPULL(GPIOD_FMC_D1))
756#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_FMC_D2) | \
757 PIN_OSPEED_HIGH(GPIOD_FMC_D3) | \
758 PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
759 PIN_OSPEED_HIGH(GPIOD_LCD_G7) | \
760 PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
761 PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
762 PIN_OSPEED_HIGH(GPIOD_LCD_B2) | \
763 PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
764 PIN_OSPEED_HIGH(GPIOD_FMC_D13) | \
765 PIN_OSPEED_HIGH(GPIOD_FMC_D14) | \
766 PIN_OSPEED_HIGH(GPIOD_FMC_D15) | \
767 PIN_OSPEED_HIGH(GPIOD_LCD_TE) | \
768 PIN_OSPEED_HIGH(GPIOD_LCD_RDX) | \
769 PIN_OSPEED_HIGH(GPIOD_LCD_WRX) | \
770 PIN_OSPEED_HIGH(GPIOD_FMC_D0) | \
771 PIN_OSPEED_HIGH(GPIOD_FMC_D1))
772#define VAL_GPIOD_PUPDR (PIN_PUPDR_FLOATING(GPIOD_FMC_D2) | \
773 PIN_PUPDR_FLOATING(GPIOD_FMC_D3) | \
774 PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
775 PIN_PUPDR_FLOATING(GPIOD_LCD_G7) | \
776 PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
777 PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
778 PIN_PUPDR_FLOATING(GPIOD_LCD_B2) | \
779 PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
780 PIN_PUPDR_FLOATING(GPIOD_FMC_D13) | \
781 PIN_PUPDR_FLOATING(GPIOD_FMC_D14) | \
782 PIN_PUPDR_FLOATING(GPIOD_FMC_D15) | \
783 PIN_PUPDR_FLOATING(GPIOD_LCD_TE) | \
784 PIN_PUPDR_FLOATING(GPIOD_LCD_RDX) | \
785 PIN_PUPDR_FLOATING(GPIOD_LCD_WRX) | \
786 PIN_PUPDR_FLOATING(GPIOD_FMC_D0) | \
787 PIN_PUPDR_FLOATING(GPIOD_FMC_D1))
788#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_FMC_D2) | \
789 PIN_ODR_HIGH(GPIOD_FMC_D3) | \
790 PIN_ODR_HIGH(GPIOD_PIN2) | \
791 PIN_ODR_HIGH(GPIOD_LCD_G7) | \
792 PIN_ODR_HIGH(GPIOD_PIN4) | \
793 PIN_ODR_HIGH(GPIOD_PIN5) | \
794 PIN_ODR_HIGH(GPIOD_LCD_B2) | \
795 PIN_ODR_HIGH(GPIOD_PIN7) | \
796 PIN_ODR_HIGH(GPIOD_FMC_D13) | \
797 PIN_ODR_HIGH(GPIOD_FMC_D14) | \
798 PIN_ODR_HIGH(GPIOD_FMC_D15) | \
799 PIN_ODR_HIGH(GPIOD_LCD_TE) | \
800 PIN_ODR_HIGH(GPIOD_LCD_RDX) | \
801 PIN_ODR_HIGH(GPIOD_LCD_WRX) | \
802 PIN_ODR_HIGH(GPIOD_FMC_D0) | \
803 PIN_ODR_HIGH(GPIOD_FMC_D1))
804#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_FMC_D2, 12U) | \
805 PIN_AFIO_AF(GPIOD_FMC_D3, 12U) | \
806 PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
807 PIN_AFIO_AF(GPIOD_LCD_G7, 14U) | \
808 PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
809 PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
810 PIN_AFIO_AF(GPIOD_LCD_B2, 14U) | \
811 PIN_AFIO_AF(GPIOD_PIN7, 0U))
812#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_FMC_D13, 12U) | \
813 PIN_AFIO_AF(GPIOD_FMC_D14, 12U) | \
814 PIN_AFIO_AF(GPIOD_FMC_D15, 12U) | \
815 PIN_AFIO_AF(GPIOD_LCD_TE, 0U) | \
816 PIN_AFIO_AF(GPIOD_LCD_RDX, 0U) | \
817 PIN_AFIO_AF(GPIOD_LCD_WRX, 0U) | \
818 PIN_AFIO_AF(GPIOD_FMC_D0, 12U) | \
819 PIN_AFIO_AF(GPIOD_FMC_D1, 12U))
820
821/*
822 * GPIOE setup:
823 *
824 * PE0 - FMC_NBL0 (alternate 12).
825 * PE1 - FMC_NBL1 (alternate 12).
826 * PE2 - PIN2 (input pullup).
827 * PE3 - PIN3 (input pullup).
828 * PE4 - PIN4 (input pullup).
829 * PE5 - PIN5 (input pullup).
830 * PE6 - PIN6 (input pullup).
831 * PE7 - FMC_D4 (alternate 12).
832 * PE8 - FMC_D5 (alternate 12).
833 * PE9 - FMC_D6 (alternate 12).
834 * PE10 - FMC_D7 (alternate 12).
835 * PE11 - FMC_D8 (alternate 12).
836 * PE12 - FMC_D9 (alternate 12).
837 * PE13 - FMC_D10 (alternate 12).
838 * PE14 - FMC_D11 (alternate 12).
839 * PE15 - FMC_D12 (alternate 12).
840 */
841#define VAL_GPIOE_MODER (PIN_MODE_ALTERNATE(GPIOE_FMC_NBL0) | \
842 PIN_MODE_ALTERNATE(GPIOE_FMC_NBL1) | \
843 PIN_MODE_INPUT(GPIOE_PIN2) | \
844 PIN_MODE_INPUT(GPIOE_PIN3) | \
845 PIN_MODE_INPUT(GPIOE_PIN4) | \
846 PIN_MODE_INPUT(GPIOE_PIN5) | \
847 PIN_MODE_INPUT(GPIOE_PIN6) | \
848 PIN_MODE_ALTERNATE(GPIOE_FMC_D4) | \
849 PIN_MODE_ALTERNATE(GPIOE_FMC_D5) | \
850 PIN_MODE_ALTERNATE(GPIOE_FMC_D6) | \
851 PIN_MODE_ALTERNATE(GPIOE_FMC_D7) | \
852 PIN_MODE_ALTERNATE(GPIOE_FMC_D8) | \
853 PIN_MODE_ALTERNATE(GPIOE_FMC_D9) | \
854 PIN_MODE_ALTERNATE(GPIOE_FMC_D10) | \
855 PIN_MODE_ALTERNATE(GPIOE_FMC_D11) | \
856 PIN_MODE_ALTERNATE(GPIOE_FMC_D12))
857#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_FMC_NBL0) | \
858 PIN_OTYPE_PUSHPULL(GPIOE_FMC_NBL1) | \
859 PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
860 PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
861 PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
862 PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
863 PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
864 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D4) | \
865 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D5) | \
866 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D6) | \
867 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D7) | \
868 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D8) | \
869 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D9) | \
870 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D10) | \
871 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D11) | \
872 PIN_OTYPE_PUSHPULL(GPIOE_FMC_D12))
873#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_FMC_NBL0) | \
874 PIN_OSPEED_HIGH(GPIOE_FMC_NBL1) | \
875 PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
876 PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
877 PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
878 PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
879 PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
880 PIN_OSPEED_HIGH(GPIOE_FMC_D4) | \
881 PIN_OSPEED_HIGH(GPIOE_FMC_D5) | \
882 PIN_OSPEED_HIGH(GPIOE_FMC_D6) | \
883 PIN_OSPEED_HIGH(GPIOE_FMC_D7) | \
884 PIN_OSPEED_HIGH(GPIOE_FMC_D8) | \
885 PIN_OSPEED_HIGH(GPIOE_FMC_D9) | \
886 PIN_OSPEED_HIGH(GPIOE_FMC_D10) | \
887 PIN_OSPEED_HIGH(GPIOE_FMC_D11) | \
888 PIN_OSPEED_HIGH(GPIOE_FMC_D12))
889#define VAL_GPIOE_PUPDR (PIN_PUPDR_FLOATING(GPIOE_FMC_NBL0) | \
890 PIN_PUPDR_FLOATING(GPIOE_FMC_NBL1) | \
891 PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
892 PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
893 PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
894 PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
895 PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
896 PIN_PUPDR_FLOATING(GPIOE_FMC_D4) | \
897 PIN_PUPDR_FLOATING(GPIOE_FMC_D5) | \
898 PIN_PUPDR_FLOATING(GPIOE_FMC_D6) | \
899 PIN_PUPDR_FLOATING(GPIOE_FMC_D7) | \
900 PIN_PUPDR_FLOATING(GPIOE_FMC_D8) | \
901 PIN_PUPDR_FLOATING(GPIOE_FMC_D9) | \
902 PIN_PUPDR_FLOATING(GPIOE_FMC_D10) | \
903 PIN_PUPDR_FLOATING(GPIOE_FMC_D11) | \
904 PIN_PUPDR_FLOATING(GPIOE_FMC_D12))
905#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_FMC_NBL0) | \
906 PIN_ODR_HIGH(GPIOE_FMC_NBL1) | \
907 PIN_ODR_HIGH(GPIOE_PIN2) | \
908 PIN_ODR_HIGH(GPIOE_PIN3) | \
909 PIN_ODR_HIGH(GPIOE_PIN4) | \
910 PIN_ODR_HIGH(GPIOE_PIN5) | \
911 PIN_ODR_HIGH(GPIOE_PIN6) | \
912 PIN_ODR_HIGH(GPIOE_FMC_D4) | \
913 PIN_ODR_HIGH(GPIOE_FMC_D5) | \
914 PIN_ODR_HIGH(GPIOE_FMC_D6) | \
915 PIN_ODR_HIGH(GPIOE_FMC_D7) | \
916 PIN_ODR_HIGH(GPIOE_FMC_D8) | \
917 PIN_ODR_HIGH(GPIOE_FMC_D9) | \
918 PIN_ODR_HIGH(GPIOE_FMC_D10) | \
919 PIN_ODR_HIGH(GPIOE_FMC_D11) | \
920 PIN_ODR_HIGH(GPIOE_FMC_D12))
921#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_FMC_NBL0, 12U) | \
922 PIN_AFIO_AF(GPIOE_FMC_NBL1, 12U) | \
923 PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
924 PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
925 PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
926 PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
927 PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
928 PIN_AFIO_AF(GPIOE_FMC_D4, 12U))
929#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_FMC_D5, 12U) | \
930 PIN_AFIO_AF(GPIOE_FMC_D6, 12U) | \
931 PIN_AFIO_AF(GPIOE_FMC_D7, 12U) | \
932 PIN_AFIO_AF(GPIOE_FMC_D8, 12U) | \
933 PIN_AFIO_AF(GPIOE_FMC_D9, 12U) | \
934 PIN_AFIO_AF(GPIOE_FMC_D10, 12U) | \
935 PIN_AFIO_AF(GPIOE_FMC_D11, 12U) | \
936 PIN_AFIO_AF(GPIOE_FMC_D12, 12U))
937
938/*
939 * GPIOF setup:
940 *
941 * PF0 - FMC_A0 (alternate 12).
942 * PF1 - FMC_A1 (alternate 12).
943 * PF2 - FMC_A2 (alternate 12).
944 * PF3 - FMC_A3 (alternate 12).
945 * PF4 - FMC_A4 (alternate 12).
946 * PF5 - FMC_A5 (alternate 12).
947 * PF6 - PIN6 (input pullup).
948 * PF7 - LCD_DCX (alternate 5).
949 * PF8 - SPI5_MISO (alternate 5).
950 * PF9 - SPI5_MOSI (alternate 5).
951 * PF10 - LCD_DE (alternate 14).
952 * PF11 - FMC_SDNRAS (alternate 12).
953 * PF12 - FMC_A6 (alternate 12).
954 * PF13 - FMC_A7 (alternate 12).
955 * PF14 - FMC_A8 (alternate 12).
956 * PF15 - FMC_A9 (alternate 12).
957 */
958#define VAL_GPIOF_MODER (PIN_MODE_ALTERNATE(GPIOF_FMC_A0) | \
959 PIN_MODE_ALTERNATE(GPIOF_FMC_A1) | \
960 PIN_MODE_ALTERNATE(GPIOF_FMC_A2) | \
961 PIN_MODE_ALTERNATE(GPIOF_FMC_A3) | \
962 PIN_MODE_ALTERNATE(GPIOF_FMC_A4) | \
963 PIN_MODE_ALTERNATE(GPIOF_FMC_A5) | \
964 PIN_MODE_INPUT(GPIOF_PIN6) | \
965 PIN_MODE_ALTERNATE(GPIOF_LCD_DCX) | \
966 PIN_MODE_ALTERNATE(GPIOF_SPI5_MISO) | \
967 PIN_MODE_ALTERNATE(GPIOF_SPI5_MOSI) | \
968 PIN_MODE_ALTERNATE(GPIOF_LCD_DE) | \
969 PIN_MODE_ALTERNATE(GPIOF_FMC_SDNRAS) | \
970 PIN_MODE_ALTERNATE(GPIOF_FMC_A6) | \
971 PIN_MODE_ALTERNATE(GPIOF_FMC_A7) | \
972 PIN_MODE_ALTERNATE(GPIOF_FMC_A8) | \
973 PIN_MODE_ALTERNATE(GPIOF_FMC_A9))
974#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_FMC_A0) | \
975 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A1) | \
976 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A2) | \
977 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A3) | \
978 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A4) | \
979 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A5) | \
980 PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
981 PIN_OTYPE_PUSHPULL(GPIOF_LCD_DCX) | \
982 PIN_OTYPE_PUSHPULL(GPIOF_SPI5_MISO) | \
983 PIN_OTYPE_PUSHPULL(GPIOF_SPI5_MOSI) | \
984 PIN_OTYPE_PUSHPULL(GPIOF_LCD_DE) | \
985 PIN_OTYPE_PUSHPULL(GPIOF_FMC_SDNRAS) | \
986 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A6) | \
987 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A7) | \
988 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A8) | \
989 PIN_OTYPE_PUSHPULL(GPIOF_FMC_A9))
990#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_FMC_A0) | \
991 PIN_OSPEED_HIGH(GPIOF_FMC_A1) | \
992 PIN_OSPEED_HIGH(GPIOF_FMC_A2) | \
993 PIN_OSPEED_HIGH(GPIOF_FMC_A3) | \
994 PIN_OSPEED_HIGH(GPIOF_FMC_A4) | \
995 PIN_OSPEED_HIGH(GPIOF_FMC_A5) | \
996 PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
997 PIN_OSPEED_HIGH(GPIOF_LCD_DCX) | \
998 PIN_OSPEED_HIGH(GPIOF_SPI5_MISO) | \
999 PIN_OSPEED_HIGH(GPIOF_SPI5_MOSI) | \
1000 PIN_OSPEED_HIGH(GPIOF_LCD_DE) | \
1001 PIN_OSPEED_HIGH(GPIOF_FMC_SDNRAS) | \
1002 PIN_OSPEED_HIGH(GPIOF_FMC_A6) | \
1003 PIN_OSPEED_HIGH(GPIOF_FMC_A7) | \
1004 PIN_OSPEED_HIGH(GPIOF_FMC_A8) | \
1005 PIN_OSPEED_HIGH(GPIOF_FMC_A9))
1006#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_FMC_A0) | \
1007 PIN_PUPDR_FLOATING(GPIOF_FMC_A1) | \
1008 PIN_PUPDR_FLOATING(GPIOF_FMC_A2) | \
1009 PIN_PUPDR_FLOATING(GPIOF_FMC_A3) | \
1010 PIN_PUPDR_FLOATING(GPIOF_FMC_A4) | \
1011 PIN_PUPDR_FLOATING(GPIOF_FMC_A5) | \
1012 PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
1013 PIN_PUPDR_FLOATING(GPIOF_LCD_DCX) | \
1014 PIN_PUPDR_FLOATING(GPIOF_SPI5_MISO) | \
1015 PIN_PUPDR_FLOATING(GPIOF_SPI5_MOSI) | \
1016 PIN_PUPDR_FLOATING(GPIOF_LCD_DE) | \
1017 PIN_PUPDR_FLOATING(GPIOF_FMC_SDNRAS) | \
1018 PIN_PUPDR_FLOATING(GPIOF_FMC_A6) | \
1019 PIN_PUPDR_FLOATING(GPIOF_FMC_A7) | \
1020 PIN_PUPDR_FLOATING(GPIOF_FMC_A8) | \
1021 PIN_PUPDR_FLOATING(GPIOF_FMC_A9))
1022#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_FMC_A0) | \
1023 PIN_ODR_HIGH(GPIOF_FMC_A1) | \
1024 PIN_ODR_HIGH(GPIOF_FMC_A2) | \
1025 PIN_ODR_HIGH(GPIOF_FMC_A3) | \
1026 PIN_ODR_HIGH(GPIOF_FMC_A4) | \
1027 PIN_ODR_HIGH(GPIOF_FMC_A5) | \
1028 PIN_ODR_HIGH(GPIOF_PIN6) | \
1029 PIN_ODR_HIGH(GPIOF_LCD_DCX) | \
1030 PIN_ODR_HIGH(GPIOF_SPI5_MISO) | \
1031 PIN_ODR_HIGH(GPIOF_SPI5_MOSI) | \
1032 PIN_ODR_HIGH(GPIOF_LCD_DE) | \
1033 PIN_ODR_HIGH(GPIOF_FMC_SDNRAS) | \
1034 PIN_ODR_HIGH(GPIOF_FMC_A6) | \
1035 PIN_ODR_HIGH(GPIOF_FMC_A7) | \
1036 PIN_ODR_HIGH(GPIOF_FMC_A8) | \
1037 PIN_ODR_HIGH(GPIOF_FMC_A9))
1038#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_FMC_A0, 12U) | \
1039 PIN_AFIO_AF(GPIOF_FMC_A1, 12U) | \
1040 PIN_AFIO_AF(GPIOF_FMC_A2, 12U) | \
1041 PIN_AFIO_AF(GPIOF_FMC_A3, 12U) | \
1042 PIN_AFIO_AF(GPIOF_FMC_A4, 12U) | \
1043 PIN_AFIO_AF(GPIOF_FMC_A5, 12U) | \
1044 PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
1045 PIN_AFIO_AF(GPIOF_LCD_DCX, 5U))
1046#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_SPI5_MISO, 5U) | \
1047 PIN_AFIO_AF(GPIOF_SPI5_MOSI, 5U) | \
1048 PIN_AFIO_AF(GPIOF_LCD_DE, 14U) | \
1049 PIN_AFIO_AF(GPIOF_FMC_SDNRAS, 12U) | \
1050 PIN_AFIO_AF(GPIOF_FMC_A6, 12U) | \
1051 PIN_AFIO_AF(GPIOF_FMC_A7, 12U) | \
1052 PIN_AFIO_AF(GPIOF_FMC_A8, 12U) | \
1053 PIN_AFIO_AF(GPIOF_FMC_A9, 12U))
1054
1055/*
1056 * GPIOG setup:
1057 *
1058 * PG0 - FMC_A10 (alternate 12).
1059 * PG1 - FMC_A11 (alternate 12).
1060 * PG2 - PIN2 (input pullup).
1061 * PG3 - PIN3 (input pullup).
1062 * PG4 - FMC_BA0 (alternate 12).
1063 * PG5 - FMC_BA1 (alternate 12).
1064 * PG6 - LCD_R7 (alternate 14).
1065 * PG7 - LCD_CLK (alternate 14).
1066 * PG8 - FMC_SDCLK (alternate 12).
1067 * PG9 - PIN9 (input pullup).
1068 * PG10 - LCD_G3 (alternate 14).
1069 * PG11 - LCD_B3 (alternate 14).
1070 * PG12 - LCD_B4 (alternate 14).
1071 * PG13 - LED3_GREEN (output pushpull maximum).
1072 * PG14 - LED4_RED (output pushpull maximum).
1073 * PG15 - FMC_SDNCAS (alternate 12).
1074 */
1075#define VAL_GPIOG_MODER (PIN_MODE_ALTERNATE(GPIOG_FMC_A10) | \
1076 PIN_MODE_ALTERNATE(GPIOG_FMC_A11) | \
1077 PIN_MODE_INPUT(GPIOG_PIN2) | \
1078 PIN_MODE_INPUT(GPIOG_PIN3) | \
1079 PIN_MODE_ALTERNATE(GPIOG_FMC_BA0) | \
1080 PIN_MODE_ALTERNATE(GPIOG_FMC_BA1) | \
1081 PIN_MODE_ALTERNATE(GPIOG_LCD_R7) | \
1082 PIN_MODE_ALTERNATE(GPIOG_LCD_CLK) | \
1083 PIN_MODE_ALTERNATE(GPIOG_FMC_SDCLK) | \
1084 PIN_MODE_INPUT(GPIOG_PIN9) | \
1085 PIN_MODE_ALTERNATE(GPIOG_LCD_G3) | \
1086 PIN_MODE_ALTERNATE(GPIOG_LCD_B3) | \
1087 PIN_MODE_ALTERNATE(GPIOG_LCD_B4) | \
1088 PIN_MODE_OUTPUT(GPIOG_LED3_GREEN) | \
1089 PIN_MODE_OUTPUT(GPIOG_LED4_RED) | \
1090 PIN_MODE_ALTERNATE(GPIOG_FMC_SDNCAS))
1091#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_FMC_A10) | \
1092 PIN_OTYPE_PUSHPULL(GPIOG_FMC_A11) | \
1093 PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \
1094 PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \
1095 PIN_OTYPE_PUSHPULL(GPIOG_FMC_BA0) | \
1096 PIN_OTYPE_PUSHPULL(GPIOG_FMC_BA1) | \
1097 PIN_OTYPE_PUSHPULL(GPIOG_LCD_R7) | \
1098 PIN_OTYPE_PUSHPULL(GPIOG_LCD_CLK) | \
1099 PIN_OTYPE_PUSHPULL(GPIOG_FMC_SDCLK) | \
1100 PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \
1101 PIN_OTYPE_PUSHPULL(GPIOG_LCD_G3) | \
1102 PIN_OTYPE_PUSHPULL(GPIOG_LCD_B3) | \
1103 PIN_OTYPE_PUSHPULL(GPIOG_LCD_B4) | \
1104 PIN_OTYPE_PUSHPULL(GPIOG_LED3_GREEN) | \
1105 PIN_OTYPE_PUSHPULL(GPIOG_LED4_RED) | \
1106 PIN_OTYPE_PUSHPULL(GPIOG_FMC_SDNCAS))
1107#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_FMC_A10) | \
1108 PIN_OSPEED_HIGH(GPIOG_FMC_A11) | \
1109 PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \
1110 PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \
1111 PIN_OSPEED_HIGH(GPIOG_FMC_BA0) | \
1112 PIN_OSPEED_HIGH(GPIOG_FMC_BA1) | \
1113 PIN_OSPEED_HIGH(GPIOG_LCD_R7) | \
1114 PIN_OSPEED_HIGH(GPIOG_LCD_CLK) | \
1115 PIN_OSPEED_HIGH(GPIOG_FMC_SDCLK) | \
1116 PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \
1117 PIN_OSPEED_HIGH(GPIOG_LCD_G3) | \
1118 PIN_OSPEED_HIGH(GPIOG_LCD_B3) | \
1119 PIN_OSPEED_HIGH(GPIOG_LCD_B4) | \
1120 PIN_OSPEED_HIGH(GPIOG_LED3_GREEN) | \
1121 PIN_OSPEED_HIGH(GPIOG_LED4_RED) | \
1122 PIN_OSPEED_HIGH(GPIOG_FMC_SDNCAS))
1123#define VAL_GPIOG_PUPDR (PIN_PUPDR_FLOATING(GPIOG_FMC_A10) | \
1124 PIN_PUPDR_FLOATING(GPIOG_FMC_A11) | \
1125 PIN_PUPDR_PULLUP(GPIOG_PIN2) | \
1126 PIN_PUPDR_PULLUP(GPIOG_PIN3) | \
1127 PIN_PUPDR_FLOATING(GPIOG_FMC_BA0) | \
1128 PIN_PUPDR_FLOATING(GPIOG_FMC_BA1) | \
1129 PIN_PUPDR_FLOATING(GPIOG_LCD_R7) | \
1130 PIN_PUPDR_FLOATING(GPIOG_LCD_CLK) | \
1131 PIN_PUPDR_FLOATING(GPIOG_FMC_SDCLK) | \
1132 PIN_PUPDR_PULLUP(GPIOG_PIN9) | \
1133 PIN_PUPDR_FLOATING(GPIOG_LCD_G3) | \
1134 PIN_PUPDR_FLOATING(GPIOG_LCD_B3) | \
1135 PIN_PUPDR_FLOATING(GPIOG_LCD_B4) | \
1136 PIN_PUPDR_FLOATING(GPIOG_LED3_GREEN) | \
1137 PIN_PUPDR_FLOATING(GPIOG_LED4_RED) | \
1138 PIN_PUPDR_FLOATING(GPIOG_FMC_SDNCAS))
1139#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_FMC_A10) | \
1140 PIN_ODR_HIGH(GPIOG_FMC_A11) | \
1141 PIN_ODR_HIGH(GPIOG_PIN2) | \
1142 PIN_ODR_HIGH(GPIOG_PIN3) | \
1143 PIN_ODR_HIGH(GPIOG_FMC_BA0) | \
1144 PIN_ODR_HIGH(GPIOG_FMC_BA1) | \
1145 PIN_ODR_HIGH(GPIOG_LCD_R7) | \
1146 PIN_ODR_HIGH(GPIOG_LCD_CLK) | \
1147 PIN_ODR_HIGH(GPIOG_FMC_SDCLK) | \
1148 PIN_ODR_HIGH(GPIOG_PIN9) | \
1149 PIN_ODR_HIGH(GPIOG_LCD_G3) | \
1150 PIN_ODR_HIGH(GPIOG_LCD_B3) | \
1151 PIN_ODR_HIGH(GPIOG_LCD_B4) | \
1152 PIN_ODR_LOW(GPIOG_LED3_GREEN) | \
1153 PIN_ODR_LOW(GPIOG_LED4_RED) | \
1154 PIN_ODR_HIGH(GPIOG_FMC_SDNCAS))
1155#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_FMC_A10, 12U) | \
1156 PIN_AFIO_AF(GPIOG_FMC_A11, 12U) | \
1157 PIN_AFIO_AF(GPIOG_PIN2, 0U) | \
1158 PIN_AFIO_AF(GPIOG_PIN3, 0U) | \
1159 PIN_AFIO_AF(GPIOG_FMC_BA0, 12U) | \
1160 PIN_AFIO_AF(GPIOG_FMC_BA1, 12U) | \
1161 PIN_AFIO_AF(GPIOG_LCD_R7, 14U) | \
1162 PIN_AFIO_AF(GPIOG_LCD_CLK, 14U))
1163#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_FMC_SDCLK, 12U) | \
1164 PIN_AFIO_AF(GPIOG_PIN9, 0U) | \
1165 PIN_AFIO_AF(GPIOG_LCD_G3, 14U) | \
1166 PIN_AFIO_AF(GPIOG_LCD_B3, 14U) | \
1167 PIN_AFIO_AF(GPIOG_LCD_B4, 14U) | \
1168 PIN_AFIO_AF(GPIOG_LED3_GREEN, 0U) | \
1169 PIN_AFIO_AF(GPIOG_LED4_RED, 0U) | \
1170 PIN_AFIO_AF(GPIOG_FMC_SDNCAS, 12U))
1171
1172/*
1173 * GPIOH setup:
1174 *
1175 * PH0 - OSC_IN (input floating).
1176 * PH1 - OSC_OUT (input floating).
1177 * PH2 - PIN2 (input pullup).
1178 * PH3 - PIN3 (input pullup).
1179 * PH4 - PIN4 (input pullup).
1180 * PH5 - PIN5 (input pullup).
1181 * PH6 - PIN6 (input pullup).
1182 * PH7 - PIN7 (input pullup).
1183 * PH8 - PIN8 (input pullup).
1184 * PH9 - PIN9 (input pullup).
1185 * PH10 - PIN10 (input pullup).
1186 * PH11 - PIN11 (input pullup).
1187 * PH12 - PIN12 (input pullup).
1188 * PH13 - PIN13 (input pullup).
1189 * PH14 - PIN14 (input pullup).
1190 * PH15 - PIN15 (input pullup).
1191 */
1192#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \
1193 PIN_MODE_INPUT(GPIOH_OSC_OUT) | \
1194 PIN_MODE_INPUT(GPIOH_PIN2) | \
1195 PIN_MODE_INPUT(GPIOH_PIN3) | \
1196 PIN_MODE_INPUT(GPIOH_PIN4) | \
1197 PIN_MODE_INPUT(GPIOH_PIN5) | \
1198 PIN_MODE_INPUT(GPIOH_PIN6) | \
1199 PIN_MODE_INPUT(GPIOH_PIN7) | \
1200 PIN_MODE_INPUT(GPIOH_PIN8) | \
1201 PIN_MODE_INPUT(GPIOH_PIN9) | \
1202 PIN_MODE_INPUT(GPIOH_PIN10) | \
1203 PIN_MODE_INPUT(GPIOH_PIN11) | \
1204 PIN_MODE_INPUT(GPIOH_PIN12) | \
1205 PIN_MODE_INPUT(GPIOH_PIN13) | \
1206 PIN_MODE_INPUT(GPIOH_PIN14) | \
1207 PIN_MODE_INPUT(GPIOH_PIN15))
1208#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \
1209 PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \
1210 PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \
1211 PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \
1212 PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \
1213 PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \
1214 PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \
1215 PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \
1216 PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \
1217 PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \
1218 PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \
1219 PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \
1220 PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \
1221 PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \
1222 PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \
1223 PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
1224#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \
1225 PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \
1226 PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \
1227 PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \
1228 PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \
1229 PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \
1230 PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \
1231 PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \
1232 PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \
1233 PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \
1234 PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \
1235 PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \
1236 PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \
1237 PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \
1238 PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \
1239 PIN_OSPEED_VERYLOW(GPIOH_PIN15))
1240#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \
1241 PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \
1242 PIN_PUPDR_PULLUP(GPIOH_PIN2) | \
1243 PIN_PUPDR_PULLUP(GPIOH_PIN3) | \
1244 PIN_PUPDR_PULLUP(GPIOH_PIN4) | \
1245 PIN_PUPDR_PULLUP(GPIOH_PIN5) | \
1246 PIN_PUPDR_PULLUP(GPIOH_PIN6) | \
1247 PIN_PUPDR_PULLUP(GPIOH_PIN7) | \
1248 PIN_PUPDR_PULLUP(GPIOH_PIN8) | \
1249 PIN_PUPDR_PULLUP(GPIOH_PIN9) | \
1250 PIN_PUPDR_PULLUP(GPIOH_PIN10) | \
1251 PIN_PUPDR_PULLUP(GPIOH_PIN11) | \
1252 PIN_PUPDR_PULLUP(GPIOH_PIN12) | \
1253 PIN_PUPDR_PULLUP(GPIOH_PIN13) | \
1254 PIN_PUPDR_PULLUP(GPIOH_PIN14) | \
1255 PIN_PUPDR_PULLUP(GPIOH_PIN15))
1256#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \
1257 PIN_ODR_HIGH(GPIOH_OSC_OUT) | \
1258 PIN_ODR_HIGH(GPIOH_PIN2) | \
1259 PIN_ODR_HIGH(GPIOH_PIN3) | \
1260 PIN_ODR_HIGH(GPIOH_PIN4) | \
1261 PIN_ODR_HIGH(GPIOH_PIN5) | \
1262 PIN_ODR_HIGH(GPIOH_PIN6) | \
1263 PIN_ODR_HIGH(GPIOH_PIN7) | \
1264 PIN_ODR_HIGH(GPIOH_PIN8) | \
1265 PIN_ODR_HIGH(GPIOH_PIN9) | \
1266 PIN_ODR_HIGH(GPIOH_PIN10) | \
1267 PIN_ODR_HIGH(GPIOH_PIN11) | \
1268 PIN_ODR_HIGH(GPIOH_PIN12) | \
1269 PIN_ODR_HIGH(GPIOH_PIN13) | \
1270 PIN_ODR_HIGH(GPIOH_PIN14) | \
1271 PIN_ODR_HIGH(GPIOH_PIN15))
1272#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \
1273 PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \
1274 PIN_AFIO_AF(GPIOH_PIN2, 0U) | \
1275 PIN_AFIO_AF(GPIOH_PIN3, 0U) | \
1276 PIN_AFIO_AF(GPIOH_PIN4, 0U) | \
1277 PIN_AFIO_AF(GPIOH_PIN5, 0U) | \
1278 PIN_AFIO_AF(GPIOH_PIN6, 0U) | \
1279 PIN_AFIO_AF(GPIOH_PIN7, 0U))
1280#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \
1281 PIN_AFIO_AF(GPIOH_PIN9, 0U) | \
1282 PIN_AFIO_AF(GPIOH_PIN10, 0U) | \
1283 PIN_AFIO_AF(GPIOH_PIN11, 0U) | \
1284 PIN_AFIO_AF(GPIOH_PIN12, 0U) | \
1285 PIN_AFIO_AF(GPIOH_PIN13, 0U) | \
1286 PIN_AFIO_AF(GPIOH_PIN14, 0U) | \
1287 PIN_AFIO_AF(GPIOH_PIN15, 0U))
1288
1289/*
1290 * GPIOI setup:
1291 *
1292 * PI0 - PIN0 (input pullup).
1293 * PI1 - PIN1 (input pullup).
1294 * PI2 - PIN2 (input pullup).
1295 * PI3 - PIN3 (input pullup).
1296 * PI4 - PIN4 (input pullup).
1297 * PI5 - PIN5 (input pullup).
1298 * PI6 - PIN6 (input pullup).
1299 * PI7 - PIN7 (input pullup).
1300 * PI8 - PIN8 (input pullup).
1301 * PI9 - PIN9 (input pullup).
1302 * PI10 - PIN10 (input pullup).
1303 * PI11 - PIN11 (input pullup).
1304 * PI12 - PIN12 (input pullup).
1305 * PI13 - PIN13 (input pullup).
1306 * PI14 - PIN14 (input pullup).
1307 * PI15 - PIN15 (input pullup).
1308 */
1309#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | \
1310 PIN_MODE_INPUT(GPIOI_PIN1) | \
1311 PIN_MODE_INPUT(GPIOI_PIN2) | \
1312 PIN_MODE_INPUT(GPIOI_PIN3) | \
1313 PIN_MODE_INPUT(GPIOI_PIN4) | \
1314 PIN_MODE_INPUT(GPIOI_PIN5) | \
1315 PIN_MODE_INPUT(GPIOI_PIN6) | \
1316 PIN_MODE_INPUT(GPIOI_PIN7) | \
1317 PIN_MODE_INPUT(GPIOI_PIN8) | \
1318 PIN_MODE_INPUT(GPIOI_PIN9) | \
1319 PIN_MODE_INPUT(GPIOI_PIN10) | \
1320 PIN_MODE_INPUT(GPIOI_PIN11) | \
1321 PIN_MODE_INPUT(GPIOI_PIN12) | \
1322 PIN_MODE_INPUT(GPIOI_PIN13) | \
1323 PIN_MODE_INPUT(GPIOI_PIN14) | \
1324 PIN_MODE_INPUT(GPIOI_PIN15))
1325#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \
1326 PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \
1327 PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \
1328 PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \
1329 PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \
1330 PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \
1331 PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \
1332 PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \
1333 PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \
1334 PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \
1335 PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \
1336 PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \
1337 PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \
1338 PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \
1339 PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \
1340 PIN_OTYPE_PUSHPULL(GPIOI_PIN15))
1341#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOI_PIN0) | \
1342 PIN_OSPEED_VERYLOW(GPIOI_PIN1) | \
1343 PIN_OSPEED_VERYLOW(GPIOI_PIN2) | \
1344 PIN_OSPEED_VERYLOW(GPIOI_PIN3) | \
1345 PIN_OSPEED_VERYLOW(GPIOI_PIN4) | \
1346 PIN_OSPEED_VERYLOW(GPIOI_PIN5) | \
1347 PIN_OSPEED_VERYLOW(GPIOI_PIN6) | \
1348 PIN_OSPEED_VERYLOW(GPIOI_PIN7) | \
1349 PIN_OSPEED_VERYLOW(GPIOI_PIN8) | \
1350 PIN_OSPEED_VERYLOW(GPIOI_PIN9) | \
1351 PIN_OSPEED_VERYLOW(GPIOI_PIN10) | \
1352 PIN_OSPEED_VERYLOW(GPIOI_PIN11) | \
1353 PIN_OSPEED_VERYLOW(GPIOI_PIN12) | \
1354 PIN_OSPEED_VERYLOW(GPIOI_PIN13) | \
1355 PIN_OSPEED_VERYLOW(GPIOI_PIN14) | \
1356 PIN_OSPEED_VERYLOW(GPIOI_PIN15))
1357#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | \
1358 PIN_PUPDR_PULLUP(GPIOI_PIN1) | \
1359 PIN_PUPDR_PULLUP(GPIOI_PIN2) | \
1360 PIN_PUPDR_PULLUP(GPIOI_PIN3) | \
1361 PIN_PUPDR_PULLUP(GPIOI_PIN4) | \
1362 PIN_PUPDR_PULLUP(GPIOI_PIN5) | \
1363 PIN_PUPDR_PULLUP(GPIOI_PIN6) | \
1364 PIN_PUPDR_PULLUP(GPIOI_PIN7) | \
1365 PIN_PUPDR_PULLUP(GPIOI_PIN8) | \
1366 PIN_PUPDR_PULLUP(GPIOI_PIN9) | \
1367 PIN_PUPDR_PULLUP(GPIOI_PIN10) | \
1368 PIN_PUPDR_PULLUP(GPIOI_PIN11) | \
1369 PIN_PUPDR_PULLUP(GPIOI_PIN12) | \
1370 PIN_PUPDR_PULLUP(GPIOI_PIN13) | \
1371 PIN_PUPDR_PULLUP(GPIOI_PIN14) | \
1372 PIN_PUPDR_PULLUP(GPIOI_PIN15))
1373#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \
1374 PIN_ODR_HIGH(GPIOI_PIN1) | \
1375 PIN_ODR_HIGH(GPIOI_PIN2) | \
1376 PIN_ODR_HIGH(GPIOI_PIN3) | \
1377 PIN_ODR_HIGH(GPIOI_PIN4) | \
1378 PIN_ODR_HIGH(GPIOI_PIN5) | \
1379 PIN_ODR_HIGH(GPIOI_PIN6) | \
1380 PIN_ODR_HIGH(GPIOI_PIN7) | \
1381 PIN_ODR_HIGH(GPIOI_PIN8) | \
1382 PIN_ODR_HIGH(GPIOI_PIN9) | \
1383 PIN_ODR_HIGH(GPIOI_PIN10) | \
1384 PIN_ODR_HIGH(GPIOI_PIN11) | \
1385 PIN_ODR_HIGH(GPIOI_PIN12) | \
1386 PIN_ODR_HIGH(GPIOI_PIN13) | \
1387 PIN_ODR_HIGH(GPIOI_PIN14) | \
1388 PIN_ODR_HIGH(GPIOI_PIN15))
1389#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \
1390 PIN_AFIO_AF(GPIOI_PIN1, 0U) | \
1391 PIN_AFIO_AF(GPIOI_PIN2, 0U) | \
1392 PIN_AFIO_AF(GPIOI_PIN3, 0U) | \
1393 PIN_AFIO_AF(GPIOI_PIN4, 0U) | \
1394 PIN_AFIO_AF(GPIOI_PIN5, 0U) | \
1395 PIN_AFIO_AF(GPIOI_PIN6, 0U) | \
1396 PIN_AFIO_AF(GPIOI_PIN7, 0U))
1397#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \
1398 PIN_AFIO_AF(GPIOI_PIN9, 0U) | \
1399 PIN_AFIO_AF(GPIOI_PIN10, 0U) | \
1400 PIN_AFIO_AF(GPIOI_PIN11, 0U) | \
1401 PIN_AFIO_AF(GPIOI_PIN12, 0U) | \
1402 PIN_AFIO_AF(GPIOI_PIN13, 0U) | \
1403 PIN_AFIO_AF(GPIOI_PIN14, 0U) | \
1404 PIN_AFIO_AF(GPIOI_PIN15, 0U))
1405
1406/*===========================================================================*/
1407/* External declarations. */
1408/*===========================================================================*/
1409
1410#if !defined(_FROM_ASM_)
1411#ifdef __cplusplus
1412extern "C" {
1413#endif
1414 void boardInit(void);
1415#ifdef __cplusplus
1416}
1417#endif
1418#endif /* _FROM_ASM_ */
1419
1420#endif /* BOARD_H */