diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h |
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h')
-rw-r--r-- | lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h | 1862 |
1 files changed, 1862 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h b/lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h new file mode 100644 index 000000000..81703f18e --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F756ZG/board.h | |||
@@ -0,0 +1,1862 @@ | |||
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 Nucleo144-F756ZG board. | ||
31 | */ | ||
32 | |||
33 | /* | ||
34 | * Board identifier. | ||
35 | */ | ||
36 | #define BOARD_ST_NUCLEO144_F756ZG | ||
37 | #define BOARD_NAME "STMicroelectronics STM32 Nucleo144-F756ZG" | ||
38 | |||
39 | /* | ||
40 | * Ethernet PHY type. | ||
41 | */ | ||
42 | #define BOARD_PHY_ID MII_LAN8742A_ID | ||
43 | #define BOARD_PHY_RMII | ||
44 | |||
45 | /* | ||
46 | * Board oscillators-related settings. | ||
47 | */ | ||
48 | #if !defined(STM32_LSECLK) | ||
49 | #define STM32_LSECLK 32768U | ||
50 | #endif | ||
51 | |||
52 | #define STM32_LSEDRV (3U << 3U) | ||
53 | |||
54 | #if !defined(STM32_HSECLK) | ||
55 | #define STM32_HSECLK 8000000U | ||
56 | #endif | ||
57 | |||
58 | #define STM32_HSE_BYPASS | ||
59 | |||
60 | /* | ||
61 | * Board voltages. | ||
62 | * Required for performance limits calculation. | ||
63 | */ | ||
64 | #define STM32_VDD 300U | ||
65 | |||
66 | /* | ||
67 | * MCU type as defined in the ST header. | ||
68 | */ | ||
69 | #define STM32F756xx | ||
70 | |||
71 | /* | ||
72 | * IO pins assignments. | ||
73 | */ | ||
74 | #define GPIOA_ZIO_D32 0U | ||
75 | #define GPIOA_TIM2_CH1 0U | ||
76 | #define GPIOA_RMII_REF_CLK 1U | ||
77 | #define GPIOA_RMII_MDIO 2U | ||
78 | #define GPIOA_ARD_A0 3U | ||
79 | #define GPIOA_ADC123_IN3 3U | ||
80 | #define GPIOA_ZIO_D24 4U | ||
81 | #define GPIOA_SPI3_NSS 4U | ||
82 | #define GPIOA_ARD_D13 5U | ||
83 | #define GPIOA_SPI1_SCK 5U | ||
84 | #define GPIOA_ARD_D12 6U | ||
85 | #define GPIOA_SPI1_MISO 6U | ||
86 | #define GPIOA_ARD_D11 7U | ||
87 | #define GPIOA_SPI1_MOSI 7U | ||
88 | #define GPIOA_ZIO_D71 7U | ||
89 | #define GPIOA_RMII_RX_DV 7U | ||
90 | #define GPIOA_USB_SOF 8U | ||
91 | #define GPIOA_USB_VBUS 9U | ||
92 | #define GPIOA_USB_ID 10U | ||
93 | #define GPIOA_USB_DM 11U | ||
94 | #define GPIOA_USB_DP 12U | ||
95 | #define GPIOA_SWDIO 13U | ||
96 | #define GPIOA_SWCLK 14U | ||
97 | #define GPIOA_ZIO_D20 15U | ||
98 | #define GPIOA_I2S3_WS 15U | ||
99 | |||
100 | #define GPIOB_ZIO_D33 0U | ||
101 | #define GPIOB_TIM3_CH3 0U | ||
102 | #define GPIOB_LED1 0U | ||
103 | #define GPIOB_ZIO_A6 1U | ||
104 | #define GPIOB_ADC12_IN9 1U | ||
105 | #define GPIOB_ZIO_D27 2U | ||
106 | #define GPIOB_QSPI_CLK 2U | ||
107 | #define GPIOB_ZIO_D23 3U | ||
108 | #define GPIOB_I2S3_CK 3U | ||
109 | #define GPIOB_ZIO_D25 4U | ||
110 | #define GPIOB_SPI3_MISO 4U | ||
111 | #define GPIOB_ZIO_D22 5U | ||
112 | #define GPIOB_I2S3_SD 5U | ||
113 | #define GPIOB_ZIO_D26 6U | ||
114 | #define GPIOB_QSPI_BK1_NCS 6U | ||
115 | #define GPIOB_LED2 7U | ||
116 | #define GPIOB_ARD_D15 8U | ||
117 | #define GPIOB_I2C1_SCL 8U | ||
118 | #define GPIOB_ARD_D14 9U | ||
119 | #define GPIOB_I2C1_SDA 9U | ||
120 | #define GPIOB_ZIO_D36 10U | ||
121 | #define GPIOB_TIM2_CH3 10U | ||
122 | #define GPIOB_ZIO_D35 11U | ||
123 | #define GPIOB_TIM2_CH4 11U | ||
124 | #define GPIOB_ZIO_D19 12U | ||
125 | #define GPIOB_I2S2_WS 12U | ||
126 | #define GPIOB_ZIO_D18 13U | ||
127 | #define GPIOB_I2S2_CK 13U | ||
128 | #define GPIOB_RMII_TXD1 13U | ||
129 | #define GPIOB_LED3 14U | ||
130 | #define GPIOB_ZIO_D17 15U | ||
131 | #define GPIOB_I2S2_SD 15U | ||
132 | |||
133 | #define GPIOC_ARD_A1 0U | ||
134 | #define GPIOC_ADC123_IN10 0U | ||
135 | #define GPIOC_RMII_MDC 1U | ||
136 | #define GPIOC_ZIO_A7 2U | ||
137 | #define GPIOC_ADC123_IN12 2U | ||
138 | #define GPIOC_ARD_A2 3U | ||
139 | #define GPIOC_ADC123_IN13 3U | ||
140 | #define GPIOC_RMII_RXD0 4U | ||
141 | #define GPIOC_RMII_RXD1 5U | ||
142 | #define GPIOC_ZIO_D16 6U | ||
143 | #define GPIOC_I2S2_MCK 6U | ||
144 | #define GPIOC_ZIO_D21 7U | ||
145 | #define GPIOC_I2S3_MCK 7U | ||
146 | #define GPIOC_ZIO_D43 8U | ||
147 | #define GPIOC_SDMMC_D0 8U | ||
148 | #define GPIOC_ZIO_D44 9U | ||
149 | #define GPIOC_SDMMC_D1 9U | ||
150 | #define GPIOC_ZIO_D45 10U | ||
151 | #define GPIOC_SDMMC_D2 10U | ||
152 | #define GPIOC_ZIO_D46 11U | ||
153 | #define GPIOC_SDMMC_D3 11U | ||
154 | #define GPIOC_ZIO_D47 12U | ||
155 | #define GPIOC_SDMMC_CK 12U | ||
156 | #define GPIOC_BUTTON 13U | ||
157 | #define GPIOC_OSC32_IN 14U | ||
158 | #define GPIOC_OSC32_OUT 15U | ||
159 | |||
160 | #define GPIOD_ZIO_D67 0U | ||
161 | #define GPIOD_CAN1_RX 0U | ||
162 | #define GPIOD_ZIO_D66 1U | ||
163 | #define GPIOD_CAN1_TX 1U | ||
164 | #define GPIOD_ZIO_D48 2U | ||
165 | #define GPIOD_SDMMC_CMD 2U | ||
166 | #define GPIOD_ZIO_D55 3U | ||
167 | #define GPIOD_USART2_CTS 3U | ||
168 | #define GPIOD_ZIO_D54 4U | ||
169 | #define GPIOD_USART2_RTS 4U | ||
170 | #define GPIOD_ZIO_D53 5U | ||
171 | #define GPIOD_USART2_TX 5U | ||
172 | #define GPIOD_ZIO_D52 6U | ||
173 | #define GPIOD_USART2_RX 6U | ||
174 | #define GPIOD_ZIO_D51 7U | ||
175 | #define GPIOD_USART2_SCLK 7U | ||
176 | #define GPIOD_USART3_RX 8U | ||
177 | #define GPIOD_STLK_RX 8U | ||
178 | #define GPIOD_USART3_TX 9U | ||
179 | #define GPIOD_STLK_TX 9U | ||
180 | #define GPIOD_PIN10 10U | ||
181 | #define GPIOD_ZIO_D30 11U | ||
182 | #define GPIOD_QSPI_BK1_IO0 11U | ||
183 | #define GPIOD_ZIO_D29 12U | ||
184 | #define GPIOD_QSPI_BK1_IO1 12U | ||
185 | #define GPIOD_ZIO_D28 13U | ||
186 | #define GPIOD_QSPI_BK1_IO3 13U | ||
187 | #define GPIOD_ARD_D10 14U | ||
188 | #define GPIOD_SPI1_NSS 14U | ||
189 | #define GPIOD_ARD_D9 15U | ||
190 | #define GPIOD_TIM4_CH4 15U | ||
191 | |||
192 | #define GPIOE_ZIO_D34 0U | ||
193 | #define GPIOE_TIM4_ETR 0U | ||
194 | #define GPIOE_PIN1 1U | ||
195 | #define GPIOE_ZIO_D31 2U | ||
196 | #define GPIOE_ZIO_D56 2U | ||
197 | #define GPIOE_SAI1_MCLK_A 2U | ||
198 | #define GPIOE_ZIO_D60 3U | ||
199 | #define GPIOE_SAI1_SD_B 3U | ||
200 | #define GPIOE_ZIO_D57 4U | ||
201 | #define GPIOE_SAI1_FS_A 4U | ||
202 | #define GPIOE_ZIO_D58 5U | ||
203 | #define GPIOE_SAI1_SCK_A 5U | ||
204 | #define GPIOE_ZIO_D59 6U | ||
205 | #define GPIOE_SAI1_SD_A 6U | ||
206 | #define GPIOE_ZIO_D41 7U | ||
207 | #define GPIOE_TIM1_ETR 7U | ||
208 | #define GPIOE_ZIO_D42 8U | ||
209 | #define GPIOE_TIM1_CH1N 8U | ||
210 | #define GPIOE_ARD_D6 9U | ||
211 | #define GPIOE_TIM1_CH1 9U | ||
212 | #define GPIOE_ZIO_D40 10U | ||
213 | #define GPIOE_TIM1_CH2N 10U | ||
214 | #define GPIOE_ARD_D5 11U | ||
215 | #define GPIOE_TIM1_CH2 11U | ||
216 | #define GPIOE_ZIO_D39 12U | ||
217 | #define GPIOE_TIM1_CH3N 12U | ||
218 | #define GPIOE_ARD_D3 13U | ||
219 | #define GPIOE_TIM1_CH3 13U | ||
220 | #define GPIOE_ZIO_D38 14U | ||
221 | #define GPIOE_ZIO_D37 15U | ||
222 | #define GPIOE_TIM1_BKIN1 15U | ||
223 | |||
224 | #define GPIOF_ZIO_D68 0U | ||
225 | #define GPIOF_I2C2_SDA 0U | ||
226 | #define GPIOF_ZIO_D69 1U | ||
227 | #define GPIOF_I2C2_SCL 1U | ||
228 | #define GPIOF_ZIO_D70 2U | ||
229 | #define GPIOF_I2C2_SMBA 2U | ||
230 | #define GPIOF_ARD_A3 3U | ||
231 | #define GPIOF_ADC3_IN9 3U | ||
232 | #define GPIOF_ZIO_A8 4U | ||
233 | #define GPIOF_ADC3_IN14 4U | ||
234 | #define GPIOF_ARD_A4 5U | ||
235 | #define GPIOF_ADC3_IN15 5U | ||
236 | #define GPIOF_PIN6 6U | ||
237 | #define GPIOF_ZIO_D62 7U | ||
238 | #define GPIOF_SAI1_MCLK_B 7U | ||
239 | #define GPIOF_ZIO_D61 8U | ||
240 | #define GPIOF_SAI1_SCK_B 8U | ||
241 | #define GPIOF_ZIO_D63 9U | ||
242 | #define GPIOF_SAI1_FS_B 9U | ||
243 | #define GPIOF_ARD_A5 10U | ||
244 | #define GPIOF_ADC3_IN8 10U | ||
245 | #define GPIOF_PIN11 11U | ||
246 | #define GPIOF_ARD_D8 12U | ||
247 | #define GPIOF_ARD_D7 13U | ||
248 | #define GPIOF_ARD_D4 14U | ||
249 | #define GPIOF_ARD_D2 15U | ||
250 | |||
251 | #define GPIOG_ZIO_D65 0U | ||
252 | #define GPIOG_ZIO_D64 1U | ||
253 | #define GPIOG_ZIO_D49 2U | ||
254 | #define GPIOG_ZIO_D50 3U | ||
255 | #define GPIOG_PIN4 4U | ||
256 | #define GPIOG_PIN5 5U | ||
257 | #define GPIOG_USB_GPIO_OUT 6U | ||
258 | #define GPIOG_USB_GPIO_IN 7U | ||
259 | #define GPIOG_PIN8 8U | ||
260 | #define GPIOG_ARD_D0 9U | ||
261 | #define GPIOG_USART6_RX 9U | ||
262 | #define GPIOG_PIN10 10U | ||
263 | #define GPIOG_RMII_TX_EN 11U | ||
264 | #define GPIOG_PIN12 12U | ||
265 | #define GPIOG_RMII_TXD0 13U | ||
266 | #define GPIOG_ARD_D1 14U | ||
267 | #define GPIOG_USART6_TX 14U | ||
268 | #define GPIOG_PIN15 15U | ||
269 | |||
270 | #define GPIOH_OSC_IN 0U | ||
271 | #define GPIOH_OSC_OUT 1U | ||
272 | #define GPIOH_PIN2 2U | ||
273 | #define GPIOH_PIN3 3U | ||
274 | #define GPIOH_PIN4 4U | ||
275 | #define GPIOH_PIN5 5U | ||
276 | #define GPIOH_PIN6 6U | ||
277 | #define GPIOH_PIN7 7U | ||
278 | #define GPIOH_PIN8 8U | ||
279 | #define GPIOH_PIN9 9U | ||
280 | #define GPIOH_PIN10 10U | ||
281 | #define GPIOH_PIN11 11U | ||
282 | #define GPIOH_PIN12 12U | ||
283 | #define GPIOH_PIN13 13U | ||
284 | #define GPIOH_PIN14 14U | ||
285 | #define GPIOH_PIN15 15U | ||
286 | |||
287 | #define GPIOI_PIN0 0U | ||
288 | #define GPIOI_PIN1 1U | ||
289 | #define GPIOI_PIN2 2U | ||
290 | #define GPIOI_PIN3 3U | ||
291 | #define GPIOI_PIN4 4U | ||
292 | #define GPIOI_PIN5 5U | ||
293 | #define GPIOI_PIN6 6U | ||
294 | #define GPIOI_PIN7 7U | ||
295 | #define GPIOI_PIN8 8U | ||
296 | #define GPIOI_PIN9 9U | ||
297 | #define GPIOI_PIN10 10U | ||
298 | #define GPIOI_PIN11 11U | ||
299 | #define GPIOI_PIN12 12U | ||
300 | #define GPIOI_PIN13 13U | ||
301 | #define GPIOI_PIN14 14U | ||
302 | #define GPIOI_PIN15 15U | ||
303 | |||
304 | #define GPIOJ_PIN0 0U | ||
305 | #define GPIOJ_PIN1 1U | ||
306 | #define GPIOJ_PIN2 2U | ||
307 | #define GPIOJ_PIN3 3U | ||
308 | #define GPIOJ_PIN4 4U | ||
309 | #define GPIOJ_PIN5 5U | ||
310 | #define GPIOJ_PIN6 6U | ||
311 | #define GPIOJ_PIN7 7U | ||
312 | #define GPIOJ_PIN8 8U | ||
313 | #define GPIOJ_PIN9 9U | ||
314 | #define GPIOJ_PIN10 10U | ||
315 | #define GPIOJ_PIN11 11U | ||
316 | #define GPIOJ_PIN12 12U | ||
317 | #define GPIOJ_PIN13 13U | ||
318 | #define GPIOJ_PIN14 14U | ||
319 | #define GPIOJ_PIN15 15U | ||
320 | |||
321 | #define GPIOK_PIN0 0U | ||
322 | #define GPIOK_PIN1 1U | ||
323 | #define GPIOK_PIN2 2U | ||
324 | #define GPIOK_PIN3 3U | ||
325 | #define GPIOK_PIN4 4U | ||
326 | #define GPIOK_PIN5 5U | ||
327 | #define GPIOK_PIN6 6U | ||
328 | #define GPIOK_PIN7 7U | ||
329 | #define GPIOK_PIN8 8U | ||
330 | #define GPIOK_PIN9 9U | ||
331 | #define GPIOK_PIN10 10U | ||
332 | #define GPIOK_PIN11 11U | ||
333 | #define GPIOK_PIN12 12U | ||
334 | #define GPIOK_PIN13 13U | ||
335 | #define GPIOK_PIN14 14U | ||
336 | #define GPIOK_PIN15 15U | ||
337 | |||
338 | /* | ||
339 | * IO lines assignments. | ||
340 | */ | ||
341 | #define LINE_ZIO_D32 PAL_LINE(GPIOA, 0U) | ||
342 | #define LINE_TIM2_CH1 PAL_LINE(GPIOA, 0U) | ||
343 | #define LINE_RMII_REF_CLK PAL_LINE(GPIOA, 1U) | ||
344 | #define LINE_RMII_MDIO PAL_LINE(GPIOA, 2U) | ||
345 | #define LINE_ARD_A0 PAL_LINE(GPIOA, 3U) | ||
346 | #define LINE_ADC123_IN3 PAL_LINE(GPIOA, 3U) | ||
347 | #define LINE_ZIO_D24 PAL_LINE(GPIOA, 4U) | ||
348 | #define LINE_SPI3_NSS PAL_LINE(GPIOA, 4U) | ||
349 | #define LINE_ARD_D13 PAL_LINE(GPIOA, 5U) | ||
350 | #define LINE_SPI1_SCK PAL_LINE(GPIOA, 5U) | ||
351 | #define LINE_ARD_D12 PAL_LINE(GPIOA, 6U) | ||
352 | #define LINE_SPI1_MISO PAL_LINE(GPIOA, 6U) | ||
353 | #define LINE_ARD_D11 PAL_LINE(GPIOA, 7U) | ||
354 | #define LINE_SPI1_MOSI PAL_LINE(GPIOA, 7U) | ||
355 | #define LINE_ZIO_D71 PAL_LINE(GPIOA, 7U) | ||
356 | #define LINE_RMII_RX_DV PAL_LINE(GPIOA, 7U) | ||
357 | #define LINE_USB_SOF PAL_LINE(GPIOA, 8U) | ||
358 | #define LINE_USB_VBUS PAL_LINE(GPIOA, 9U) | ||
359 | #define LINE_USB_ID PAL_LINE(GPIOA, 10U) | ||
360 | #define LINE_USB_DM PAL_LINE(GPIOA, 11U) | ||
361 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) | ||
362 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
363 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
364 | #define LINE_ZIO_D20 PAL_LINE(GPIOA, 15U) | ||
365 | #define LINE_I2S3_WS PAL_LINE(GPIOA, 15U) | ||
366 | #define LINE_ZIO_D33 PAL_LINE(GPIOB, 0U) | ||
367 | #define LINE_TIM3_CH3 PAL_LINE(GPIOB, 0U) | ||
368 | #define LINE_LED1 PAL_LINE(GPIOB, 0U) | ||
369 | #define LINE_ZIO_A6 PAL_LINE(GPIOB, 1U) | ||
370 | #define LINE_ADC12_IN9 PAL_LINE(GPIOB, 1U) | ||
371 | #define LINE_ZIO_D27 PAL_LINE(GPIOB, 2U) | ||
372 | #define LINE_QSPI_CLK PAL_LINE(GPIOB, 2U) | ||
373 | #define LINE_ZIO_D23 PAL_LINE(GPIOB, 3U) | ||
374 | #define LINE_I2S3_CK PAL_LINE(GPIOB, 3U) | ||
375 | #define LINE_ZIO_D25 PAL_LINE(GPIOB, 4U) | ||
376 | #define LINE_SPI3_MISO PAL_LINE(GPIOB, 4U) | ||
377 | #define LINE_ZIO_D22 PAL_LINE(GPIOB, 5U) | ||
378 | #define LINE_I2S3_SD PAL_LINE(GPIOB, 5U) | ||
379 | #define LINE_ZIO_D26 PAL_LINE(GPIOB, 6U) | ||
380 | #define LINE_QSPI_BK1_NCS PAL_LINE(GPIOB, 6U) | ||
381 | #define LINE_LED2 PAL_LINE(GPIOB, 7U) | ||
382 | #define LINE_ARD_D15 PAL_LINE(GPIOB, 8U) | ||
383 | #define LINE_I2C1_SCL PAL_LINE(GPIOB, 8U) | ||
384 | #define LINE_ARD_D14 PAL_LINE(GPIOB, 9U) | ||
385 | #define LINE_I2C1_SDA PAL_LINE(GPIOB, 9U) | ||
386 | #define LINE_ZIO_D36 PAL_LINE(GPIOB, 10U) | ||
387 | #define LINE_TIM2_CH3 PAL_LINE(GPIOB, 10U) | ||
388 | #define LINE_ZIO_D35 PAL_LINE(GPIOB, 11U) | ||
389 | #define LINE_TIM2_CH4 PAL_LINE(GPIOB, 11U) | ||
390 | #define LINE_ZIO_D19 PAL_LINE(GPIOB, 12U) | ||
391 | #define LINE_I2S2_WS PAL_LINE(GPIOB, 12U) | ||
392 | #define LINE_ZIO_D18 PAL_LINE(GPIOB, 13U) | ||
393 | #define LINE_I2S2_CK PAL_LINE(GPIOB, 13U) | ||
394 | #define LINE_RMII_TXD1 PAL_LINE(GPIOB, 13U) | ||
395 | #define LINE_LED3 PAL_LINE(GPIOB, 14U) | ||
396 | #define LINE_ZIO_D17 PAL_LINE(GPIOB, 15U) | ||
397 | #define LINE_I2S2_SD PAL_LINE(GPIOB, 15U) | ||
398 | #define LINE_ARD_A1 PAL_LINE(GPIOC, 0U) | ||
399 | #define LINE_ADC123_IN10 PAL_LINE(GPIOC, 0U) | ||
400 | #define LINE_RMII_MDC PAL_LINE(GPIOC, 1U) | ||
401 | #define LINE_ZIO_A7 PAL_LINE(GPIOC, 2U) | ||
402 | #define LINE_ADC123_IN12 PAL_LINE(GPIOC, 2U) | ||
403 | #define LINE_ARD_A2 PAL_LINE(GPIOC, 3U) | ||
404 | #define LINE_ADC123_IN13 PAL_LINE(GPIOC, 3U) | ||
405 | #define LINE_RMII_RXD0 PAL_LINE(GPIOC, 4U) | ||
406 | #define LINE_RMII_RXD1 PAL_LINE(GPIOC, 5U) | ||
407 | #define LINE_ZIO_D16 PAL_LINE(GPIOC, 6U) | ||
408 | #define LINE_I2S2_MCK PAL_LINE(GPIOC, 6U) | ||
409 | #define LINE_ZIO_D21 PAL_LINE(GPIOC, 7U) | ||
410 | #define LINE_I2S3_MCK PAL_LINE(GPIOC, 7U) | ||
411 | #define LINE_ZIO_D43 PAL_LINE(GPIOC, 8U) | ||
412 | #define LINE_SDMMC_D0 PAL_LINE(GPIOC, 8U) | ||
413 | #define LINE_ZIO_D44 PAL_LINE(GPIOC, 9U) | ||
414 | #define LINE_SDMMC_D1 PAL_LINE(GPIOC, 9U) | ||
415 | #define LINE_ZIO_D45 PAL_LINE(GPIOC, 10U) | ||
416 | #define LINE_SDMMC_D2 PAL_LINE(GPIOC, 10U) | ||
417 | #define LINE_ZIO_D46 PAL_LINE(GPIOC, 11U) | ||
418 | #define LINE_SDMMC_D3 PAL_LINE(GPIOC, 11U) | ||
419 | #define LINE_ZIO_D47 PAL_LINE(GPIOC, 12U) | ||
420 | #define LINE_SDMMC_CK PAL_LINE(GPIOC, 12U) | ||
421 | #define LINE_BUTTON PAL_LINE(GPIOC, 13U) | ||
422 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | ||
423 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | ||
424 | #define LINE_ZIO_D67 PAL_LINE(GPIOD, 0U) | ||
425 | #define LINE_CAN1_RX PAL_LINE(GPIOD, 0U) | ||
426 | #define LINE_ZIO_D66 PAL_LINE(GPIOD, 1U) | ||
427 | #define LINE_CAN1_TX PAL_LINE(GPIOD, 1U) | ||
428 | #define LINE_ZIO_D48 PAL_LINE(GPIOD, 2U) | ||
429 | #define LINE_SDMMC_CMD PAL_LINE(GPIOD, 2U) | ||
430 | #define LINE_ZIO_D55 PAL_LINE(GPIOD, 3U) | ||
431 | #define LINE_USART2_CTS PAL_LINE(GPIOD, 3U) | ||
432 | #define LINE_ZIO_D54 PAL_LINE(GPIOD, 4U) | ||
433 | #define LINE_USART2_RTS PAL_LINE(GPIOD, 4U) | ||
434 | #define LINE_ZIO_D53 PAL_LINE(GPIOD, 5U) | ||
435 | #define LINE_USART2_TX PAL_LINE(GPIOD, 5U) | ||
436 | #define LINE_ZIO_D52 PAL_LINE(GPIOD, 6U) | ||
437 | #define LINE_USART2_RX PAL_LINE(GPIOD, 6U) | ||
438 | #define LINE_ZIO_D51 PAL_LINE(GPIOD, 7U) | ||
439 | #define LINE_USART2_SCLK PAL_LINE(GPIOD, 7U) | ||
440 | #define LINE_USART3_RX PAL_LINE(GPIOD, 8U) | ||
441 | #define LINE_STLK_RX PAL_LINE(GPIOD, 8U) | ||
442 | #define LINE_USART3_TX PAL_LINE(GPIOD, 9U) | ||
443 | #define LINE_STLK_TX PAL_LINE(GPIOD, 9U) | ||
444 | #define LINE_ZIO_D30 PAL_LINE(GPIOD, 11U) | ||
445 | #define LINE_QSPI_BK1_IO0 PAL_LINE(GPIOD, 11U) | ||
446 | #define LINE_ZIO_D29 PAL_LINE(GPIOD, 12U) | ||
447 | #define LINE_QSPI_BK1_IO1 PAL_LINE(GPIOD, 12U) | ||
448 | #define LINE_ZIO_D28 PAL_LINE(GPIOD, 13U) | ||
449 | #define LINE_QSPI_BK1_IO3 PAL_LINE(GPIOD, 13U) | ||
450 | #define LINE_ARD_D10 PAL_LINE(GPIOD, 14U) | ||
451 | #define LINE_SPI1_NSS PAL_LINE(GPIOD, 14U) | ||
452 | #define LINE_ARD_D9 PAL_LINE(GPIOD, 15U) | ||
453 | #define LINE_TIM4_CH4 PAL_LINE(GPIOD, 15U) | ||
454 | #define LINE_ZIO_D34 PAL_LINE(GPIOE, 0U) | ||
455 | #define LINE_TIM4_ETR PAL_LINE(GPIOE, 0U) | ||
456 | #define LINE_ZIO_D31 PAL_LINE(GPIOE, 2U) | ||
457 | #define LINE_ZIO_D56 PAL_LINE(GPIOE, 2U) | ||
458 | #define LINE_SAI1_MCLK_A PAL_LINE(GPIOE, 2U) | ||
459 | #define LINE_ZIO_D60 PAL_LINE(GPIOE, 3U) | ||
460 | #define LINE_SAI1_SD_B PAL_LINE(GPIOE, 3U) | ||
461 | #define LINE_ZIO_D57 PAL_LINE(GPIOE, 4U) | ||
462 | #define LINE_SAI1_FS_A PAL_LINE(GPIOE, 4U) | ||
463 | #define LINE_ZIO_D58 PAL_LINE(GPIOE, 5U) | ||
464 | #define LINE_SAI1_SCK_A PAL_LINE(GPIOE, 5U) | ||
465 | #define LINE_ZIO_D59 PAL_LINE(GPIOE, 6U) | ||
466 | #define LINE_SAI1_SD_A PAL_LINE(GPIOE, 6U) | ||
467 | #define LINE_ZIO_D41 PAL_LINE(GPIOE, 7U) | ||
468 | #define LINE_TIM1_ETR PAL_LINE(GPIOE, 7U) | ||
469 | #define LINE_ZIO_D42 PAL_LINE(GPIOE, 8U) | ||
470 | #define LINE_TIM1_CH1N PAL_LINE(GPIOE, 8U) | ||
471 | #define LINE_ARD_D6 PAL_LINE(GPIOE, 9U) | ||
472 | #define LINE_TIM1_CH1 PAL_LINE(GPIOE, 9U) | ||
473 | #define LINE_ZIO_D40 PAL_LINE(GPIOE, 10U) | ||
474 | #define LINE_TIM1_CH2N PAL_LINE(GPIOE, 10U) | ||
475 | #define LINE_ARD_D5 PAL_LINE(GPIOE, 11U) | ||
476 | #define LINE_TIM1_CH2 PAL_LINE(GPIOE, 11U) | ||
477 | #define LINE_ZIO_D39 PAL_LINE(GPIOE, 12U) | ||
478 | #define LINE_TIM1_CH3N PAL_LINE(GPIOE, 12U) | ||
479 | #define LINE_ARD_D3 PAL_LINE(GPIOE, 13U) | ||
480 | #define LINE_TIM1_CH3 PAL_LINE(GPIOE, 13U) | ||
481 | #define LINE_ZIO_D38 PAL_LINE(GPIOE, 14U) | ||
482 | #define LINE_ZIO_D37 PAL_LINE(GPIOE, 15U) | ||
483 | #define LINE_TIM1_BKIN1 PAL_LINE(GPIOE, 15U) | ||
484 | #define LINE_ZIO_D68 PAL_LINE(GPIOF, 0U) | ||
485 | #define LINE_I2C2_SDA PAL_LINE(GPIOF, 0U) | ||
486 | #define LINE_ZIO_D69 PAL_LINE(GPIOF, 1U) | ||
487 | #define LINE_I2C2_SCL PAL_LINE(GPIOF, 1U) | ||
488 | #define LINE_ZIO_D70 PAL_LINE(GPIOF, 2U) | ||
489 | #define LINE_I2C2_SMBA PAL_LINE(GPIOF, 2U) | ||
490 | #define LINE_ARD_A3 PAL_LINE(GPIOF, 3U) | ||
491 | #define LINE_ADC3_IN9 PAL_LINE(GPIOF, 3U) | ||
492 | #define LINE_ZIO_A8 PAL_LINE(GPIOF, 4U) | ||
493 | #define LINE_ADC3_IN14 PAL_LINE(GPIOF, 4U) | ||
494 | #define LINE_ARD_A4 PAL_LINE(GPIOF, 5U) | ||
495 | #define LINE_ADC3_IN15 PAL_LINE(GPIOF, 5U) | ||
496 | #define LINE_ZIO_D62 PAL_LINE(GPIOF, 7U) | ||
497 | #define LINE_SAI1_MCLK_B PAL_LINE(GPIOF, 7U) | ||
498 | #define LINE_ZIO_D61 PAL_LINE(GPIOF, 8U) | ||
499 | #define LINE_SAI1_SCK_B PAL_LINE(GPIOF, 8U) | ||
500 | #define LINE_ZIO_D63 PAL_LINE(GPIOF, 9U) | ||
501 | #define LINE_SAI1_FS_B PAL_LINE(GPIOF, 9U) | ||
502 | #define LINE_ARD_A5 PAL_LINE(GPIOF, 10U) | ||
503 | #define LINE_ADC3_IN8 PAL_LINE(GPIOF, 10U) | ||
504 | #define LINE_ARD_D8 PAL_LINE(GPIOF, 12U) | ||
505 | #define LINE_ARD_D7 PAL_LINE(GPIOF, 13U) | ||
506 | #define LINE_ARD_D4 PAL_LINE(GPIOF, 14U) | ||
507 | #define LINE_ARD_D2 PAL_LINE(GPIOF, 15U) | ||
508 | #define LINE_ZIO_D65 PAL_LINE(GPIOG, 0U) | ||
509 | #define LINE_ZIO_D64 PAL_LINE(GPIOG, 1U) | ||
510 | #define LINE_ZIO_D49 PAL_LINE(GPIOG, 2U) | ||
511 | #define LINE_ZIO_D50 PAL_LINE(GPIOG, 3U) | ||
512 | #define LINE_USB_GPIO_OUT PAL_LINE(GPIOG, 6U) | ||
513 | #define LINE_USB_GPIO_IN PAL_LINE(GPIOG, 7U) | ||
514 | #define LINE_ARD_D0 PAL_LINE(GPIOG, 9U) | ||
515 | #define LINE_USART6_RX PAL_LINE(GPIOG, 9U) | ||
516 | #define LINE_RMII_TX_EN PAL_LINE(GPIOG, 11U) | ||
517 | #define LINE_RMII_TXD0 PAL_LINE(GPIOG, 13U) | ||
518 | #define LINE_ARD_D1 PAL_LINE(GPIOG, 14U) | ||
519 | #define LINE_USART6_TX PAL_LINE(GPIOG, 14U) | ||
520 | #define LINE_OSC_IN PAL_LINE(GPIOH, 0U) | ||
521 | #define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) | ||
522 | |||
523 | /*===========================================================================*/ | ||
524 | /* Driver pre-compile time settings. */ | ||
525 | /*===========================================================================*/ | ||
526 | |||
527 | /*===========================================================================*/ | ||
528 | /* Derived constants and error checks. */ | ||
529 | /*===========================================================================*/ | ||
530 | |||
531 | /*===========================================================================*/ | ||
532 | /* Driver data structures and types. */ | ||
533 | /*===========================================================================*/ | ||
534 | |||
535 | /*===========================================================================*/ | ||
536 | /* Driver macros. */ | ||
537 | /*===========================================================================*/ | ||
538 | |||
539 | /* | ||
540 | * I/O ports initial setup, this configuration is established soon after reset | ||
541 | * in the initialization code. | ||
542 | * Please refer to the STM32 Reference Manual for details. | ||
543 | */ | ||
544 | #define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) | ||
545 | #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) | ||
546 | #define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) | ||
547 | #define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) | ||
548 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
549 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
550 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
551 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
552 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) | ||
553 | #define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) | ||
554 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) | ||
555 | #define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) | ||
556 | #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) | ||
557 | #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) | ||
558 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) | ||
559 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
560 | |||
561 | /* | ||
562 | * GPIOA setup: | ||
563 | * | ||
564 | * PA0 - ZIO_D32 TIM2_CH1 (input pullup). | ||
565 | * PA1 - RMII_REF_CLK (alternate 11). | ||
566 | * PA2 - RMII_MDIO (alternate 11). | ||
567 | * PA3 - ARD_A0 ADC123_IN3 (input pullup). | ||
568 | * PA4 - ZIO_D24 SPI3_NSS (input pullup). | ||
569 | * PA5 - ARD_D13 SPI1_SCK (input pullup). | ||
570 | * PA6 - ARD_D12 SPI1_MISO (input pullup). | ||
571 | * PA7 - ARD_D11 SPI1_MOSI ZIO_D71 RMII_RX_DV(alternate 11). | ||
572 | * PA8 - USB_SOF (alternate 10). | ||
573 | * PA9 - USB_VBUS (analog). | ||
574 | * PA10 - USB_ID (alternate 10). | ||
575 | * PA11 - USB_DM (alternate 10). | ||
576 | * PA12 - USB_DP (alternate 10). | ||
577 | * PA13 - SWDIO (alternate 0). | ||
578 | * PA14 - SWCLK (alternate 0). | ||
579 | * PA15 - ZIO_D20 I2S3_WS (input pullup). | ||
580 | */ | ||
581 | #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ZIO_D32) | \ | ||
582 | PIN_MODE_ALTERNATE(GPIOA_RMII_REF_CLK) |\ | ||
583 | PIN_MODE_ALTERNATE(GPIOA_RMII_MDIO) | \ | ||
584 | PIN_MODE_INPUT(GPIOA_ARD_A0) | \ | ||
585 | PIN_MODE_INPUT(GPIOA_ZIO_D24) | \ | ||
586 | PIN_MODE_INPUT(GPIOA_ARD_D13) | \ | ||
587 | PIN_MODE_INPUT(GPIOA_ARD_D12) | \ | ||
588 | PIN_MODE_ALTERNATE(GPIOA_ARD_D11) | \ | ||
589 | PIN_MODE_ALTERNATE(GPIOA_USB_SOF) | \ | ||
590 | PIN_MODE_ANALOG(GPIOA_USB_VBUS) | \ | ||
591 | PIN_MODE_ALTERNATE(GPIOA_USB_ID) | \ | ||
592 | PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ | ||
593 | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ | ||
594 | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ | ||
595 | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ | ||
596 | PIN_MODE_INPUT(GPIOA_ZIO_D20)) | ||
597 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D32) | \ | ||
598 | PIN_OTYPE_PUSHPULL(GPIOA_RMII_REF_CLK) |\ | ||
599 | PIN_OTYPE_PUSHPULL(GPIOA_RMII_MDIO) | \ | ||
600 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \ | ||
601 | PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D24) | \ | ||
602 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D13) | \ | ||
603 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | \ | ||
604 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | \ | ||
605 | PIN_OTYPE_PUSHPULL(GPIOA_USB_SOF) | \ | ||
606 | PIN_OTYPE_PUSHPULL(GPIOA_USB_VBUS) | \ | ||
607 | PIN_OTYPE_PUSHPULL(GPIOA_USB_ID) | \ | ||
608 | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ | ||
609 | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ | ||
610 | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ | ||
611 | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ | ||
612 | PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D20)) | ||
613 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ZIO_D32) | \ | ||
614 | PIN_OSPEED_HIGH(GPIOA_RMII_REF_CLK) | \ | ||
615 | PIN_OSPEED_HIGH(GPIOA_RMII_MDIO) | \ | ||
616 | PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \ | ||
617 | PIN_OSPEED_HIGH(GPIOA_ZIO_D24) | \ | ||
618 | PIN_OSPEED_HIGH(GPIOA_ARD_D13) | \ | ||
619 | PIN_OSPEED_HIGH(GPIOA_ARD_D12) | \ | ||
620 | PIN_OSPEED_HIGH(GPIOA_ARD_D11) | \ | ||
621 | PIN_OSPEED_HIGH(GPIOA_USB_SOF) | \ | ||
622 | PIN_OSPEED_HIGH(GPIOA_USB_VBUS) | \ | ||
623 | PIN_OSPEED_HIGH(GPIOA_USB_ID) | \ | ||
624 | PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ | ||
625 | PIN_OSPEED_HIGH(GPIOA_USB_DP) | \ | ||
626 | PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ | ||
627 | PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ | ||
628 | PIN_OSPEED_HIGH(GPIOA_ZIO_D20)) | ||
629 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ZIO_D32) | \ | ||
630 | PIN_PUPDR_FLOATING(GPIOA_RMII_REF_CLK) |\ | ||
631 | PIN_PUPDR_PULLUP(GPIOA_RMII_MDIO) | \ | ||
632 | PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | \ | ||
633 | PIN_PUPDR_PULLUP(GPIOA_ZIO_D24) | \ | ||
634 | PIN_PUPDR_PULLUP(GPIOA_ARD_D13) | \ | ||
635 | PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | \ | ||
636 | PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | \ | ||
637 | PIN_PUPDR_FLOATING(GPIOA_USB_SOF) | \ | ||
638 | PIN_PUPDR_FLOATING(GPIOA_USB_VBUS) | \ | ||
639 | PIN_PUPDR_FLOATING(GPIOA_USB_ID) | \ | ||
640 | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ | ||
641 | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ | ||
642 | PIN_PUPDR_FLOATING(GPIOA_SWDIO) | \ | ||
643 | PIN_PUPDR_FLOATING(GPIOA_SWCLK) | \ | ||
644 | PIN_PUPDR_PULLUP(GPIOA_ZIO_D20)) | ||
645 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ZIO_D32) | \ | ||
646 | PIN_ODR_HIGH(GPIOA_RMII_REF_CLK) | \ | ||
647 | PIN_ODR_HIGH(GPIOA_RMII_MDIO) | \ | ||
648 | PIN_ODR_HIGH(GPIOA_ARD_A0) | \ | ||
649 | PIN_ODR_HIGH(GPIOA_ZIO_D24) | \ | ||
650 | PIN_ODR_HIGH(GPIOA_ARD_D13) | \ | ||
651 | PIN_ODR_HIGH(GPIOA_ARD_D12) | \ | ||
652 | PIN_ODR_HIGH(GPIOA_ARD_D11) | \ | ||
653 | PIN_ODR_HIGH(GPIOA_USB_SOF) | \ | ||
654 | PIN_ODR_HIGH(GPIOA_USB_VBUS) | \ | ||
655 | PIN_ODR_HIGH(GPIOA_USB_ID) | \ | ||
656 | PIN_ODR_HIGH(GPIOA_USB_DM) | \ | ||
657 | PIN_ODR_HIGH(GPIOA_USB_DP) | \ | ||
658 | PIN_ODR_HIGH(GPIOA_SWDIO) | \ | ||
659 | PIN_ODR_HIGH(GPIOA_SWCLK) | \ | ||
660 | PIN_ODR_HIGH(GPIOA_ZIO_D20)) | ||
661 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ZIO_D32, 0U) | \ | ||
662 | PIN_AFIO_AF(GPIOA_RMII_REF_CLK, 11U) | \ | ||
663 | PIN_AFIO_AF(GPIOA_RMII_MDIO, 11U) | \ | ||
664 | PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \ | ||
665 | PIN_AFIO_AF(GPIOA_ZIO_D24, 0U) | \ | ||
666 | PIN_AFIO_AF(GPIOA_ARD_D13, 0U) | \ | ||
667 | PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | \ | ||
668 | PIN_AFIO_AF(GPIOA_ARD_D11, 11U)) | ||
669 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_USB_SOF, 10U) | \ | ||
670 | PIN_AFIO_AF(GPIOA_USB_VBUS, 0U) | \ | ||
671 | PIN_AFIO_AF(GPIOA_USB_ID, 10U) | \ | ||
672 | PIN_AFIO_AF(GPIOA_USB_DM, 10U) | \ | ||
673 | PIN_AFIO_AF(GPIOA_USB_DP, 10U) | \ | ||
674 | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ | ||
675 | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ | ||
676 | PIN_AFIO_AF(GPIOA_ZIO_D20, 0U)) | ||
677 | |||
678 | /* | ||
679 | * GPIOB setup: | ||
680 | * | ||
681 | * PB0 - ZIO_D33 TIM3_CH3 LED1 (output pushpull maximum). | ||
682 | * PB1 - ZIO_A6 ADC12_IN9 (input pullup). | ||
683 | * PB2 - ZIO_D27 QSPI_CLK (input pullup). | ||
684 | * PB3 - ZIO_D23 I2S3_CK (input pullup). | ||
685 | * PB4 - ZIO_D25 SPI3_MISO (input pullup). | ||
686 | * PB5 - ZIO_D22 I2S3_SD (input pullup). | ||
687 | * PB6 - ZIO_D26 QSPI_BK1_NCS (input pullup). | ||
688 | * PB7 - LED2 (output pushpull maximum). | ||
689 | * PB8 - ARD_D15 I2C1_SCL (input pullup). | ||
690 | * PB9 - ARD_D14 I2C1_SDA (input pullup). | ||
691 | * PB10 - ZIO_D36 TIM2_CH3 (input pullup). | ||
692 | * PB11 - ZIO_D35 TIM2_CH4 (input pullup). | ||
693 | * PB12 - ZIO_D19 I2S2_WS (input pullup). | ||
694 | * PB13 - ZIO_D18 I2S2_CK RMII_TXD1 (alternate 11). | ||
695 | * PB14 - LED3 (output pushpull maximum). | ||
696 | * PB15 - ZIO_D17 I2S2_SD (input pullup). | ||
697 | */ | ||
698 | #define VAL_GPIOB_MODER (PIN_MODE_OUTPUT(GPIOB_ZIO_D33) | \ | ||
699 | PIN_MODE_INPUT(GPIOB_ZIO_A6) | \ | ||
700 | PIN_MODE_INPUT(GPIOB_ZIO_D27) | \ | ||
701 | PIN_MODE_INPUT(GPIOB_ZIO_D23) | \ | ||
702 | PIN_MODE_INPUT(GPIOB_ZIO_D25) | \ | ||
703 | PIN_MODE_INPUT(GPIOB_ZIO_D22) | \ | ||
704 | PIN_MODE_INPUT(GPIOB_ZIO_D26) | \ | ||
705 | PIN_MODE_OUTPUT(GPIOB_LED2) | \ | ||
706 | PIN_MODE_INPUT(GPIOB_ARD_D15) | \ | ||
707 | PIN_MODE_INPUT(GPIOB_ARD_D14) | \ | ||
708 | PIN_MODE_INPUT(GPIOB_ZIO_D36) | \ | ||
709 | PIN_MODE_INPUT(GPIOB_ZIO_D35) | \ | ||
710 | PIN_MODE_INPUT(GPIOB_ZIO_D19) | \ | ||
711 | PIN_MODE_ALTERNATE(GPIOB_ZIO_D18) | \ | ||
712 | PIN_MODE_OUTPUT(GPIOB_LED3) | \ | ||
713 | PIN_MODE_INPUT(GPIOB_ZIO_D17)) | ||
714 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D33) | \ | ||
715 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_A6) | \ | ||
716 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D27) | \ | ||
717 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D23) | \ | ||
718 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D25) | \ | ||
719 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D22) | \ | ||
720 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D26) | \ | ||
721 | PIN_OTYPE_PUSHPULL(GPIOB_LED2) | \ | ||
722 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | \ | ||
723 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | \ | ||
724 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D36) | \ | ||
725 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D35) | \ | ||
726 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D19) | \ | ||
727 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D18) | \ | ||
728 | PIN_OTYPE_PUSHPULL(GPIOB_LED3) | \ | ||
729 | PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D17)) | ||
730 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ZIO_D33) | \ | ||
731 | PIN_OSPEED_HIGH(GPIOB_ZIO_A6) | \ | ||
732 | PIN_OSPEED_HIGH(GPIOB_ZIO_D27) | \ | ||
733 | PIN_OSPEED_HIGH(GPIOB_ZIO_D23) | \ | ||
734 | PIN_OSPEED_HIGH(GPIOB_ZIO_D25) | \ | ||
735 | PIN_OSPEED_HIGH(GPIOB_ZIO_D22) | \ | ||
736 | PIN_OSPEED_HIGH(GPIOB_ZIO_D26) | \ | ||
737 | PIN_OSPEED_HIGH(GPIOB_LED2) | \ | ||
738 | PIN_OSPEED_HIGH(GPIOB_ARD_D15) | \ | ||
739 | PIN_OSPEED_HIGH(GPIOB_ARD_D14) | \ | ||
740 | PIN_OSPEED_HIGH(GPIOB_ZIO_D36) | \ | ||
741 | PIN_OSPEED_HIGH(GPIOB_ZIO_D35) | \ | ||
742 | PIN_OSPEED_HIGH(GPIOB_ZIO_D19) | \ | ||
743 | PIN_OSPEED_HIGH(GPIOB_ZIO_D18) | \ | ||
744 | PIN_OSPEED_HIGH(GPIOB_LED3) | \ | ||
745 | PIN_OSPEED_HIGH(GPIOB_ZIO_D17)) | ||
746 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(GPIOB_ZIO_D33) | \ | ||
747 | PIN_PUPDR_PULLUP(GPIOB_ZIO_A6) | \ | ||
748 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D27) | \ | ||
749 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D23) | \ | ||
750 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D25) | \ | ||
751 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D22) | \ | ||
752 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D26) | \ | ||
753 | PIN_PUPDR_FLOATING(GPIOB_LED2) | \ | ||
754 | PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | \ | ||
755 | PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | \ | ||
756 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D36) | \ | ||
757 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D35) | \ | ||
758 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D19) | \ | ||
759 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D18) | \ | ||
760 | PIN_PUPDR_FLOATING(GPIOB_LED3) | \ | ||
761 | PIN_PUPDR_PULLUP(GPIOB_ZIO_D17)) | ||
762 | #define VAL_GPIOB_ODR (PIN_ODR_LOW(GPIOB_ZIO_D33) | \ | ||
763 | PIN_ODR_HIGH(GPIOB_ZIO_A6) | \ | ||
764 | PIN_ODR_HIGH(GPIOB_ZIO_D27) | \ | ||
765 | PIN_ODR_HIGH(GPIOB_ZIO_D23) | \ | ||
766 | PIN_ODR_HIGH(GPIOB_ZIO_D25) | \ | ||
767 | PIN_ODR_HIGH(GPIOB_ZIO_D22) | \ | ||
768 | PIN_ODR_HIGH(GPIOB_ZIO_D26) | \ | ||
769 | PIN_ODR_LOW(GPIOB_LED2) | \ | ||
770 | PIN_ODR_HIGH(GPIOB_ARD_D15) | \ | ||
771 | PIN_ODR_HIGH(GPIOB_ARD_D14) | \ | ||
772 | PIN_ODR_HIGH(GPIOB_ZIO_D36) | \ | ||
773 | PIN_ODR_HIGH(GPIOB_ZIO_D35) | \ | ||
774 | PIN_ODR_HIGH(GPIOB_ZIO_D19) | \ | ||
775 | PIN_ODR_HIGH(GPIOB_ZIO_D18) | \ | ||
776 | PIN_ODR_LOW(GPIOB_LED3) | \ | ||
777 | PIN_ODR_HIGH(GPIOB_ZIO_D17)) | ||
778 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ZIO_D33, 0U) | \ | ||
779 | PIN_AFIO_AF(GPIOB_ZIO_A6, 0U) | \ | ||
780 | PIN_AFIO_AF(GPIOB_ZIO_D27, 0U) | \ | ||
781 | PIN_AFIO_AF(GPIOB_ZIO_D23, 0U) | \ | ||
782 | PIN_AFIO_AF(GPIOB_ZIO_D25, 0U) | \ | ||
783 | PIN_AFIO_AF(GPIOB_ZIO_D22, 0U) | \ | ||
784 | PIN_AFIO_AF(GPIOB_ZIO_D26, 0U) | \ | ||
785 | PIN_AFIO_AF(GPIOB_LED2, 0U)) | ||
786 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | \ | ||
787 | PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | \ | ||
788 | PIN_AFIO_AF(GPIOB_ZIO_D36, 0U) | \ | ||
789 | PIN_AFIO_AF(GPIOB_ZIO_D35, 0U) | \ | ||
790 | PIN_AFIO_AF(GPIOB_ZIO_D19, 0U) | \ | ||
791 | PIN_AFIO_AF(GPIOB_ZIO_D18, 11U) | \ | ||
792 | PIN_AFIO_AF(GPIOB_LED3, 0U) | \ | ||
793 | PIN_AFIO_AF(GPIOB_ZIO_D17, 0U)) | ||
794 | |||
795 | /* | ||
796 | * GPIOC setup: | ||
797 | * | ||
798 | * PC0 - ARD_A1 ADC123_IN10 (input pullup). | ||
799 | * PC1 - RMII_MDC (alternate 11). | ||
800 | * PC2 - ZIO_A7 ADC123_IN12 (input pullup). | ||
801 | * PC3 - ARD_A2 ADC123_IN13 (input pullup). | ||
802 | * PC4 - RMII_RXD0 (alternate 11). | ||
803 | * PC5 - RMII_RXD1 (alternate 11). | ||
804 | * PC6 - ZIO_D16 I2S2_MCK (input pullup). | ||
805 | * PC7 - ZIO_D21 I2S3_MCK (input pullup). | ||
806 | * PC8 - ZIO_D43 SDMMC_D0 (input pullup). | ||
807 | * PC9 - ZIO_D44 SDMMC_D1 (input pullup). | ||
808 | * PC10 - ZIO_D45 SDMMC_D2 (input pullup). | ||
809 | * PC11 - ZIO_D46 SDMMC_D3 (input pullup). | ||
810 | * PC12 - ZIO_D47 SDMMC_CK (input pullup). | ||
811 | * PC13 - BUTTON (input floating). | ||
812 | * PC14 - OSC32_IN (input floating). | ||
813 | * PC15 - OSC32_OUT (input floating). | ||
814 | */ | ||
815 | #define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A1) | \ | ||
816 | PIN_MODE_ALTERNATE(GPIOC_RMII_MDC) | \ | ||
817 | PIN_MODE_INPUT(GPIOC_ZIO_A7) | \ | ||
818 | PIN_MODE_INPUT(GPIOC_ARD_A2) | \ | ||
819 | PIN_MODE_ALTERNATE(GPIOC_RMII_RXD0) | \ | ||
820 | PIN_MODE_ALTERNATE(GPIOC_RMII_RXD1) | \ | ||
821 | PIN_MODE_INPUT(GPIOC_ZIO_D16) | \ | ||
822 | PIN_MODE_INPUT(GPIOC_ZIO_D21) | \ | ||
823 | PIN_MODE_INPUT(GPIOC_ZIO_D43) | \ | ||
824 | PIN_MODE_INPUT(GPIOC_ZIO_D44) | \ | ||
825 | PIN_MODE_INPUT(GPIOC_ZIO_D45) | \ | ||
826 | PIN_MODE_INPUT(GPIOC_ZIO_D46) | \ | ||
827 | PIN_MODE_INPUT(GPIOC_ZIO_D47) | \ | ||
828 | PIN_MODE_INPUT(GPIOC_BUTTON) | \ | ||
829 | PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ | ||
830 | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) | ||
831 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A1) | \ | ||
832 | PIN_OTYPE_PUSHPULL(GPIOC_RMII_MDC) | \ | ||
833 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_A7) | \ | ||
834 | PIN_OTYPE_PUSHPULL(GPIOC_ARD_A2) | \ | ||
835 | PIN_OTYPE_PUSHPULL(GPIOC_RMII_RXD0) | \ | ||
836 | PIN_OTYPE_PUSHPULL(GPIOC_RMII_RXD1) | \ | ||
837 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D16) | \ | ||
838 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D21) | \ | ||
839 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D43) | \ | ||
840 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D44) | \ | ||
841 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D45) | \ | ||
842 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D46) | \ | ||
843 | PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D47) | \ | ||
844 | PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | \ | ||
845 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ | ||
846 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) | ||
847 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A1) | \ | ||
848 | PIN_OSPEED_HIGH(GPIOC_RMII_MDC) | \ | ||
849 | PIN_OSPEED_HIGH(GPIOC_ZIO_A7) | \ | ||
850 | PIN_OSPEED_HIGH(GPIOC_ARD_A2) | \ | ||
851 | PIN_OSPEED_HIGH(GPIOC_RMII_RXD0) | \ | ||
852 | PIN_OSPEED_HIGH(GPIOC_RMII_RXD1) | \ | ||
853 | PIN_OSPEED_HIGH(GPIOC_ZIO_D16) | \ | ||
854 | PIN_OSPEED_HIGH(GPIOC_ZIO_D21) | \ | ||
855 | PIN_OSPEED_HIGH(GPIOC_ZIO_D43) | \ | ||
856 | PIN_OSPEED_HIGH(GPIOC_ZIO_D44) | \ | ||
857 | PIN_OSPEED_HIGH(GPIOC_ZIO_D45) | \ | ||
858 | PIN_OSPEED_HIGH(GPIOC_ZIO_D46) | \ | ||
859 | PIN_OSPEED_HIGH(GPIOC_ZIO_D47) | \ | ||
860 | PIN_OSPEED_HIGH(GPIOC_BUTTON) | \ | ||
861 | PIN_OSPEED_VERYLOW(GPIOC_OSC32_IN) | \ | ||
862 | PIN_OSPEED_VERYLOW(GPIOC_OSC32_OUT)) | ||
863 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A1) | \ | ||
864 | PIN_PUPDR_FLOATING(GPIOC_RMII_MDC) | \ | ||
865 | PIN_PUPDR_PULLUP(GPIOC_ZIO_A7) | \ | ||
866 | PIN_PUPDR_PULLUP(GPIOC_ARD_A2) | \ | ||
867 | PIN_PUPDR_FLOATING(GPIOC_RMII_RXD0) | \ | ||
868 | PIN_PUPDR_FLOATING(GPIOC_RMII_RXD1) | \ | ||
869 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D16) | \ | ||
870 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D21) | \ | ||
871 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D43) | \ | ||
872 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D44) | \ | ||
873 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D45) | \ | ||
874 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D46) | \ | ||
875 | PIN_PUPDR_PULLUP(GPIOC_ZIO_D47) | \ | ||
876 | PIN_PUPDR_FLOATING(GPIOC_BUTTON) | \ | ||
877 | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ | ||
878 | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) | ||
879 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A1) | \ | ||
880 | PIN_ODR_HIGH(GPIOC_RMII_MDC) | \ | ||
881 | PIN_ODR_HIGH(GPIOC_ZIO_A7) | \ | ||
882 | PIN_ODR_HIGH(GPIOC_ARD_A2) | \ | ||
883 | PIN_ODR_HIGH(GPIOC_RMII_RXD0) | \ | ||
884 | PIN_ODR_HIGH(GPIOC_RMII_RXD1) | \ | ||
885 | PIN_ODR_HIGH(GPIOC_ZIO_D16) | \ | ||
886 | PIN_ODR_HIGH(GPIOC_ZIO_D21) | \ | ||
887 | PIN_ODR_HIGH(GPIOC_ZIO_D43) | \ | ||
888 | PIN_ODR_HIGH(GPIOC_ZIO_D44) | \ | ||
889 | PIN_ODR_HIGH(GPIOC_ZIO_D45) | \ | ||
890 | PIN_ODR_HIGH(GPIOC_ZIO_D46) | \ | ||
891 | PIN_ODR_HIGH(GPIOC_ZIO_D47) | \ | ||
892 | PIN_ODR_HIGH(GPIOC_BUTTON) | \ | ||
893 | PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ | ||
894 | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) | ||
895 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A1, 0U) | \ | ||
896 | PIN_AFIO_AF(GPIOC_RMII_MDC, 11U) | \ | ||
897 | PIN_AFIO_AF(GPIOC_ZIO_A7, 0U) | \ | ||
898 | PIN_AFIO_AF(GPIOC_ARD_A2, 0U) | \ | ||
899 | PIN_AFIO_AF(GPIOC_RMII_RXD0, 11U) | \ | ||
900 | PIN_AFIO_AF(GPIOC_RMII_RXD1, 11U) | \ | ||
901 | PIN_AFIO_AF(GPIOC_ZIO_D16, 0U) | \ | ||
902 | PIN_AFIO_AF(GPIOC_ZIO_D21, 0U)) | ||
903 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_ZIO_D43, 0U) | \ | ||
904 | PIN_AFIO_AF(GPIOC_ZIO_D44, 0U) | \ | ||
905 | PIN_AFIO_AF(GPIOC_ZIO_D45, 0U) | \ | ||
906 | PIN_AFIO_AF(GPIOC_ZIO_D46, 0U) | \ | ||
907 | PIN_AFIO_AF(GPIOC_ZIO_D47, 0U) | \ | ||
908 | PIN_AFIO_AF(GPIOC_BUTTON, 0U) | \ | ||
909 | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ | ||
910 | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) | ||
911 | |||
912 | /* | ||
913 | * GPIOD setup: | ||
914 | * | ||
915 | * PD0 - ZIO_D67 CAN1_RX (input pullup). | ||
916 | * PD1 - ZIO_D66 CAN1_TX (input pullup). | ||
917 | * PD2 - ZIO_D48 SDMMC_CMD (input pullup). | ||
918 | * PD3 - ZIO_D55 USART2_CTS (input pullup). | ||
919 | * PD4 - ZIO_D54 USART2_RTS (input pullup). | ||
920 | * PD5 - ZIO_D53 USART2_TX (input pullup). | ||
921 | * PD6 - ZIO_D52 USART2_RX (input pullup). | ||
922 | * PD7 - ZIO_D51 USART2_SCLK (input pullup). | ||
923 | * PD8 - USART3_RX STLK_RX (alternate 7). | ||
924 | * PD9 - USART3_TX STLK_TX (alternate 7). | ||
925 | * PD10 - PIN10 (input pullup). | ||
926 | * PD11 - ZIO_D30 QSPI_BK1_IO0 (input pullup). | ||
927 | * PD12 - ZIO_D29 QSPI_BK1_IO1 (input pullup). | ||
928 | * PD13 - ZIO_D28 QSPI_BK1_IO3 (input pullup). | ||
929 | * PD14 - ARD_D10 SPI1_NSS (input pullup). | ||
930 | * PD15 - ARD_D9 TIM4_CH4 (input pullup). | ||
931 | */ | ||
932 | #define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_ZIO_D67) | \ | ||
933 | PIN_MODE_INPUT(GPIOD_ZIO_D66) | \ | ||
934 | PIN_MODE_INPUT(GPIOD_ZIO_D48) | \ | ||
935 | PIN_MODE_INPUT(GPIOD_ZIO_D55) | \ | ||
936 | PIN_MODE_INPUT(GPIOD_ZIO_D54) | \ | ||
937 | PIN_MODE_INPUT(GPIOD_ZIO_D53) | \ | ||
938 | PIN_MODE_INPUT(GPIOD_ZIO_D52) | \ | ||
939 | PIN_MODE_INPUT(GPIOD_ZIO_D51) | \ | ||
940 | PIN_MODE_ALTERNATE(GPIOD_USART3_RX) | \ | ||
941 | PIN_MODE_ALTERNATE(GPIOD_USART3_TX) | \ | ||
942 | PIN_MODE_INPUT(GPIOD_PIN10) | \ | ||
943 | PIN_MODE_INPUT(GPIOD_ZIO_D30) | \ | ||
944 | PIN_MODE_INPUT(GPIOD_ZIO_D29) | \ | ||
945 | PIN_MODE_INPUT(GPIOD_ZIO_D28) | \ | ||
946 | PIN_MODE_INPUT(GPIOD_ARD_D10) | \ | ||
947 | PIN_MODE_INPUT(GPIOD_ARD_D9)) | ||
948 | #define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D67) | \ | ||
949 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D66) | \ | ||
950 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D48) | \ | ||
951 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D55) | \ | ||
952 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D54) | \ | ||
953 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D53) | \ | ||
954 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D52) | \ | ||
955 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D51) | \ | ||
956 | PIN_OTYPE_PUSHPULL(GPIOD_USART3_RX) | \ | ||
957 | PIN_OTYPE_PUSHPULL(GPIOD_USART3_TX) | \ | ||
958 | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ | ||
959 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D30) | \ | ||
960 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D29) | \ | ||
961 | PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D28) | \ | ||
962 | PIN_OTYPE_PUSHPULL(GPIOD_ARD_D10) | \ | ||
963 | PIN_OTYPE_PUSHPULL(GPIOD_ARD_D9)) | ||
964 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_ZIO_D67) | \ | ||
965 | PIN_OSPEED_HIGH(GPIOD_ZIO_D66) | \ | ||
966 | PIN_OSPEED_HIGH(GPIOD_ZIO_D48) | \ | ||
967 | PIN_OSPEED_HIGH(GPIOD_ZIO_D55) | \ | ||
968 | PIN_OSPEED_HIGH(GPIOD_ZIO_D54) | \ | ||
969 | PIN_OSPEED_HIGH(GPIOD_ZIO_D53) | \ | ||
970 | PIN_OSPEED_HIGH(GPIOD_ZIO_D52) | \ | ||
971 | PIN_OSPEED_HIGH(GPIOD_ZIO_D51) | \ | ||
972 | PIN_OSPEED_HIGH(GPIOD_USART3_RX) | \ | ||
973 | PIN_OSPEED_HIGH(GPIOD_USART3_TX) | \ | ||
974 | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ | ||
975 | PIN_OSPEED_HIGH(GPIOD_ZIO_D30) | \ | ||
976 | PIN_OSPEED_HIGH(GPIOD_ZIO_D29) | \ | ||
977 | PIN_OSPEED_HIGH(GPIOD_ZIO_D28) | \ | ||
978 | PIN_OSPEED_HIGH(GPIOD_ARD_D10) | \ | ||
979 | PIN_OSPEED_HIGH(GPIOD_ARD_D9)) | ||
980 | #define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_ZIO_D67) | \ | ||
981 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D66) | \ | ||
982 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D48) | \ | ||
983 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D55) | \ | ||
984 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D54) | \ | ||
985 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D53) | \ | ||
986 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D52) | \ | ||
987 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D51) | \ | ||
988 | PIN_PUPDR_FLOATING(GPIOD_USART3_RX) | \ | ||
989 | PIN_PUPDR_FLOATING(GPIOD_USART3_TX) | \ | ||
990 | PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ | ||
991 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D30) | \ | ||
992 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D29) | \ | ||
993 | PIN_PUPDR_PULLUP(GPIOD_ZIO_D28) | \ | ||
994 | PIN_PUPDR_PULLUP(GPIOD_ARD_D10) | \ | ||
995 | PIN_PUPDR_PULLUP(GPIOD_ARD_D9)) | ||
996 | #define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_ZIO_D67) | \ | ||
997 | PIN_ODR_HIGH(GPIOD_ZIO_D66) | \ | ||
998 | PIN_ODR_HIGH(GPIOD_ZIO_D48) | \ | ||
999 | PIN_ODR_HIGH(GPIOD_ZIO_D55) | \ | ||
1000 | PIN_ODR_HIGH(GPIOD_ZIO_D54) | \ | ||
1001 | PIN_ODR_HIGH(GPIOD_ZIO_D53) | \ | ||
1002 | PIN_ODR_HIGH(GPIOD_ZIO_D52) | \ | ||
1003 | PIN_ODR_HIGH(GPIOD_ZIO_D51) | \ | ||
1004 | PIN_ODR_HIGH(GPIOD_USART3_RX) | \ | ||
1005 | PIN_ODR_HIGH(GPIOD_USART3_TX) | \ | ||
1006 | PIN_ODR_HIGH(GPIOD_PIN10) | \ | ||
1007 | PIN_ODR_HIGH(GPIOD_ZIO_D30) | \ | ||
1008 | PIN_ODR_HIGH(GPIOD_ZIO_D29) | \ | ||
1009 | PIN_ODR_HIGH(GPIOD_ZIO_D28) | \ | ||
1010 | PIN_ODR_HIGH(GPIOD_ARD_D10) | \ | ||
1011 | PIN_ODR_HIGH(GPIOD_ARD_D9)) | ||
1012 | #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_ZIO_D67, 0U) | \ | ||
1013 | PIN_AFIO_AF(GPIOD_ZIO_D66, 0U) | \ | ||
1014 | PIN_AFIO_AF(GPIOD_ZIO_D48, 0U) | \ | ||
1015 | PIN_AFIO_AF(GPIOD_ZIO_D55, 0U) | \ | ||
1016 | PIN_AFIO_AF(GPIOD_ZIO_D54, 0U) | \ | ||
1017 | PIN_AFIO_AF(GPIOD_ZIO_D53, 0U) | \ | ||
1018 | PIN_AFIO_AF(GPIOD_ZIO_D52, 0U) | \ | ||
1019 | PIN_AFIO_AF(GPIOD_ZIO_D51, 0U)) | ||
1020 | #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_USART3_RX, 7U) | \ | ||
1021 | PIN_AFIO_AF(GPIOD_USART3_TX, 7U) | \ | ||
1022 | PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ | ||
1023 | PIN_AFIO_AF(GPIOD_ZIO_D30, 0U) | \ | ||
1024 | PIN_AFIO_AF(GPIOD_ZIO_D29, 0U) | \ | ||
1025 | PIN_AFIO_AF(GPIOD_ZIO_D28, 0U) | \ | ||
1026 | PIN_AFIO_AF(GPIOD_ARD_D10, 0U) | \ | ||
1027 | PIN_AFIO_AF(GPIOD_ARD_D9, 0U)) | ||
1028 | |||
1029 | /* | ||
1030 | * GPIOE setup: | ||
1031 | * | ||
1032 | * PE0 - ZIO_D34 TIM4_ETR (input pullup). | ||
1033 | * PE1 - PIN1 (input pullup). | ||
1034 | * PE2 - ZIO_D31 ZIO_D56 SAI1_MCLK_A(input pullup). | ||
1035 | * PE3 - ZIO_D60 SAI1_SD_B (input pullup). | ||
1036 | * PE4 - ZIO_D57 SAI1_FS_A (input pullup). | ||
1037 | * PE5 - ZIO_D58 SAI1_SCK_A (input pullup). | ||
1038 | * PE6 - ZIO_D59 SAI1_SD_A (input pullup). | ||
1039 | * PE7 - ZIO_D41 TIM1_ETR (input pullup). | ||
1040 | * PE8 - ZIO_D42 TIM1_CH1N (input pullup). | ||
1041 | * PE9 - ARD_D6 TIM1_CH1 (input pullup). | ||
1042 | * PE10 - ZIO_D40 TIM1_CH2N (input pullup). | ||
1043 | * PE11 - ARD_D5 TIM1_CH2 (input pullup). | ||
1044 | * PE12 - ZIO_D39 TIM1_CH3N (input pullup). | ||
1045 | * PE13 - ARD_D3 TIM1_CH3 (input pullup). | ||
1046 | * PE14 - ZIO_D38 (input pullup). | ||
1047 | * PE15 - ZIO_D37 TIM1_BKIN1 (input pullup). | ||
1048 | */ | ||
1049 | #define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_ZIO_D34) | \ | ||
1050 | PIN_MODE_INPUT(GPIOE_PIN1) | \ | ||
1051 | PIN_MODE_INPUT(GPIOE_ZIO_D31) | \ | ||
1052 | PIN_MODE_INPUT(GPIOE_ZIO_D60) | \ | ||
1053 | PIN_MODE_INPUT(GPIOE_ZIO_D57) | \ | ||
1054 | PIN_MODE_INPUT(GPIOE_ZIO_D58) | \ | ||
1055 | PIN_MODE_INPUT(GPIOE_ZIO_D59) | \ | ||
1056 | PIN_MODE_INPUT(GPIOE_ZIO_D41) | \ | ||
1057 | PIN_MODE_INPUT(GPIOE_ZIO_D42) | \ | ||
1058 | PIN_MODE_INPUT(GPIOE_ARD_D6) | \ | ||
1059 | PIN_MODE_INPUT(GPIOE_ZIO_D40) | \ | ||
1060 | PIN_MODE_INPUT(GPIOE_ARD_D5) | \ | ||
1061 | PIN_MODE_INPUT(GPIOE_ZIO_D39) | \ | ||
1062 | PIN_MODE_INPUT(GPIOE_ARD_D3) | \ | ||
1063 | PIN_MODE_INPUT(GPIOE_ZIO_D38) | \ | ||
1064 | PIN_MODE_INPUT(GPIOE_ZIO_D37)) | ||
1065 | #define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D34) | \ | ||
1066 | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ | ||
1067 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D31) | \ | ||
1068 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D60) | \ | ||
1069 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D57) | \ | ||
1070 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D58) | \ | ||
1071 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D59) | \ | ||
1072 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D41) | \ | ||
1073 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D42) | \ | ||
1074 | PIN_OTYPE_PUSHPULL(GPIOE_ARD_D6) | \ | ||
1075 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D40) | \ | ||
1076 | PIN_OTYPE_PUSHPULL(GPIOE_ARD_D5) | \ | ||
1077 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D39) | \ | ||
1078 | PIN_OTYPE_PUSHPULL(GPIOE_ARD_D3) | \ | ||
1079 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D38) | \ | ||
1080 | PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D37)) | ||
1081 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_ZIO_D34) | \ | ||
1082 | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ | ||
1083 | PIN_OSPEED_HIGH(GPIOE_ZIO_D31) | \ | ||
1084 | PIN_OSPEED_HIGH(GPIOE_ZIO_D60) | \ | ||
1085 | PIN_OSPEED_HIGH(GPIOE_ZIO_D57) | \ | ||
1086 | PIN_OSPEED_HIGH(GPIOE_ZIO_D58) | \ | ||
1087 | PIN_OSPEED_HIGH(GPIOE_ZIO_D59) | \ | ||
1088 | PIN_OSPEED_HIGH(GPIOE_ZIO_D41) | \ | ||
1089 | PIN_OSPEED_HIGH(GPIOE_ZIO_D42) | \ | ||
1090 | PIN_OSPEED_HIGH(GPIOE_ARD_D6) | \ | ||
1091 | PIN_OSPEED_HIGH(GPIOE_ZIO_D40) | \ | ||
1092 | PIN_OSPEED_HIGH(GPIOE_ARD_D5) | \ | ||
1093 | PIN_OSPEED_HIGH(GPIOE_ZIO_D39) | \ | ||
1094 | PIN_OSPEED_HIGH(GPIOE_ARD_D3) | \ | ||
1095 | PIN_OSPEED_VERYLOW(GPIOE_ZIO_D38) | \ | ||
1096 | PIN_OSPEED_HIGH(GPIOE_ZIO_D37)) | ||
1097 | #define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_ZIO_D34) | \ | ||
1098 | PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ | ||
1099 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D31) | \ | ||
1100 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D60) | \ | ||
1101 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D57) | \ | ||
1102 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D58) | \ | ||
1103 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D59) | \ | ||
1104 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D41) | \ | ||
1105 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D42) | \ | ||
1106 | PIN_PUPDR_PULLUP(GPIOE_ARD_D6) | \ | ||
1107 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D40) | \ | ||
1108 | PIN_PUPDR_PULLUP(GPIOE_ARD_D5) | \ | ||
1109 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D39) | \ | ||
1110 | PIN_PUPDR_PULLUP(GPIOE_ARD_D3) | \ | ||
1111 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D38) | \ | ||
1112 | PIN_PUPDR_PULLUP(GPIOE_ZIO_D37)) | ||
1113 | #define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_ZIO_D34) | \ | ||
1114 | PIN_ODR_HIGH(GPIOE_PIN1) | \ | ||
1115 | PIN_ODR_HIGH(GPIOE_ZIO_D31) | \ | ||
1116 | PIN_ODR_HIGH(GPIOE_ZIO_D60) | \ | ||
1117 | PIN_ODR_HIGH(GPIOE_ZIO_D57) | \ | ||
1118 | PIN_ODR_HIGH(GPIOE_ZIO_D58) | \ | ||
1119 | PIN_ODR_HIGH(GPIOE_ZIO_D59) | \ | ||
1120 | PIN_ODR_HIGH(GPIOE_ZIO_D41) | \ | ||
1121 | PIN_ODR_HIGH(GPIOE_ZIO_D42) | \ | ||
1122 | PIN_ODR_HIGH(GPIOE_ARD_D6) | \ | ||
1123 | PIN_ODR_HIGH(GPIOE_ZIO_D40) | \ | ||
1124 | PIN_ODR_HIGH(GPIOE_ARD_D5) | \ | ||
1125 | PIN_ODR_HIGH(GPIOE_ZIO_D39) | \ | ||
1126 | PIN_ODR_HIGH(GPIOE_ARD_D3) | \ | ||
1127 | PIN_ODR_HIGH(GPIOE_ZIO_D38) | \ | ||
1128 | PIN_ODR_HIGH(GPIOE_ZIO_D37)) | ||
1129 | #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_ZIO_D34, 0U) | \ | ||
1130 | PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ | ||
1131 | PIN_AFIO_AF(GPIOE_ZIO_D31, 0U) | \ | ||
1132 | PIN_AFIO_AF(GPIOE_ZIO_D60, 0U) | \ | ||
1133 | PIN_AFIO_AF(GPIOE_ZIO_D57, 0U) | \ | ||
1134 | PIN_AFIO_AF(GPIOE_ZIO_D58, 0U) | \ | ||
1135 | PIN_AFIO_AF(GPIOE_ZIO_D59, 0U) | \ | ||
1136 | PIN_AFIO_AF(GPIOE_ZIO_D41, 0U)) | ||
1137 | #define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_ZIO_D42, 0U) | \ | ||
1138 | PIN_AFIO_AF(GPIOE_ARD_D6, 0U) | \ | ||
1139 | PIN_AFIO_AF(GPIOE_ZIO_D40, 0U) | \ | ||
1140 | PIN_AFIO_AF(GPIOE_ARD_D5, 0U) | \ | ||
1141 | PIN_AFIO_AF(GPIOE_ZIO_D39, 0U) | \ | ||
1142 | PIN_AFIO_AF(GPIOE_ARD_D3, 0U) | \ | ||
1143 | PIN_AFIO_AF(GPIOE_ZIO_D38, 0U) | \ | ||
1144 | PIN_AFIO_AF(GPIOE_ZIO_D37, 0U)) | ||
1145 | |||
1146 | /* | ||
1147 | * GPIOF setup: | ||
1148 | * | ||
1149 | * PF0 - ZIO_D68 I2C2_SDA (input pullup). | ||
1150 | * PF1 - ZIO_D69 I2C2_SCL (input pullup). | ||
1151 | * PF2 - ZIO_D70 I2C2_SMBA (input pullup). | ||
1152 | * PF3 - ARD_A3 ADC3_IN9 (input pullup). | ||
1153 | * PF4 - ZIO_A8 ADC3_IN14 (input pullup). | ||
1154 | * PF5 - ARD_A4 ADC3_IN15 (input pullup). | ||
1155 | * PF6 - PIN6 (input pullup). | ||
1156 | * PF7 - ZIO_D62 SAI1_MCLK_B (input pullup). | ||
1157 | * PF8 - ZIO_D61 SAI1_SCK_B (input pullup). | ||
1158 | * PF9 - ZIO_D63 SAI1_FS_B (input pullup). | ||
1159 | * PF10 - ARD_A5 ADC3_IN8 (input pullup). | ||
1160 | * PF11 - PIN11 (input pullup). | ||
1161 | * PF12 - ARD_D8 (input pullup). | ||
1162 | * PF13 - ARD_D7 (input pullup). | ||
1163 | * PF14 - ARD_D4 (input pullup). | ||
1164 | * PF15 - ARD_D2 (input pullup). | ||
1165 | */ | ||
1166 | #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_ZIO_D68) | \ | ||
1167 | PIN_MODE_INPUT(GPIOF_ZIO_D69) | \ | ||
1168 | PIN_MODE_INPUT(GPIOF_ZIO_D70) | \ | ||
1169 | PIN_MODE_INPUT(GPIOF_ARD_A3) | \ | ||
1170 | PIN_MODE_INPUT(GPIOF_ZIO_A8) | \ | ||
1171 | PIN_MODE_INPUT(GPIOF_ARD_A4) | \ | ||
1172 | PIN_MODE_INPUT(GPIOF_PIN6) | \ | ||
1173 | PIN_MODE_INPUT(GPIOF_ZIO_D62) | \ | ||
1174 | PIN_MODE_INPUT(GPIOF_ZIO_D61) | \ | ||
1175 | PIN_MODE_INPUT(GPIOF_ZIO_D63) | \ | ||
1176 | PIN_MODE_INPUT(GPIOF_ARD_A5) | \ | ||
1177 | PIN_MODE_INPUT(GPIOF_PIN11) | \ | ||
1178 | PIN_MODE_INPUT(GPIOF_ARD_D8) | \ | ||
1179 | PIN_MODE_INPUT(GPIOF_ARD_D7) | \ | ||
1180 | PIN_MODE_INPUT(GPIOF_ARD_D4) | \ | ||
1181 | PIN_MODE_INPUT(GPIOF_ARD_D2)) | ||
1182 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D68) | \ | ||
1183 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D69) | \ | ||
1184 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D70) | \ | ||
1185 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_A3) | \ | ||
1186 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_A8) | \ | ||
1187 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_A4) | \ | ||
1188 | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ | ||
1189 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D62) | \ | ||
1190 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D61) | \ | ||
1191 | PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D63) | \ | ||
1192 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_A5) | \ | ||
1193 | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ | ||
1194 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_D8) | \ | ||
1195 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_D7) | \ | ||
1196 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_D4) | \ | ||
1197 | PIN_OTYPE_PUSHPULL(GPIOF_ARD_D2)) | ||
1198 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_ZIO_D68) | \ | ||
1199 | PIN_OSPEED_HIGH(GPIOF_ZIO_D69) | \ | ||
1200 | PIN_OSPEED_HIGH(GPIOF_ZIO_D70) | \ | ||
1201 | PIN_OSPEED_HIGH(GPIOF_ARD_A3) | \ | ||
1202 | PIN_OSPEED_HIGH(GPIOF_ZIO_A8) | \ | ||
1203 | PIN_OSPEED_HIGH(GPIOF_ARD_A4) | \ | ||
1204 | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ | ||
1205 | PIN_OSPEED_HIGH(GPIOF_ZIO_D62) | \ | ||
1206 | PIN_OSPEED_HIGH(GPIOF_ZIO_D61) | \ | ||
1207 | PIN_OSPEED_HIGH(GPIOF_ZIO_D63) | \ | ||
1208 | PIN_OSPEED_HIGH(GPIOF_ARD_A5) | \ | ||
1209 | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ | ||
1210 | PIN_OSPEED_VERYLOW(GPIOF_ARD_D8) | \ | ||
1211 | PIN_OSPEED_VERYLOW(GPIOF_ARD_D7) | \ | ||
1212 | PIN_OSPEED_VERYLOW(GPIOF_ARD_D4) | \ | ||
1213 | PIN_OSPEED_VERYLOW(GPIOF_ARD_D2)) | ||
1214 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_ZIO_D68) | \ | ||
1215 | PIN_PUPDR_PULLUP(GPIOF_ZIO_D69) | \ | ||
1216 | PIN_PUPDR_PULLUP(GPIOF_ZIO_D70) | \ | ||
1217 | PIN_PUPDR_PULLUP(GPIOF_ARD_A3) | \ | ||
1218 | PIN_PUPDR_PULLUP(GPIOF_ZIO_A8) | \ | ||
1219 | PIN_PUPDR_PULLUP(GPIOF_ARD_A4) | \ | ||
1220 | PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ | ||
1221 | PIN_PUPDR_PULLUP(GPIOF_ZIO_D62) | \ | ||
1222 | PIN_PUPDR_PULLUP(GPIOF_ZIO_D61) | \ | ||
1223 | PIN_PUPDR_PULLUP(GPIOF_ZIO_D63) | \ | ||
1224 | PIN_PUPDR_PULLUP(GPIOF_ARD_A5) | \ | ||
1225 | PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ | ||
1226 | PIN_PUPDR_PULLUP(GPIOF_ARD_D8) | \ | ||
1227 | PIN_PUPDR_PULLUP(GPIOF_ARD_D7) | \ | ||
1228 | PIN_PUPDR_PULLUP(GPIOF_ARD_D4) | \ | ||
1229 | PIN_PUPDR_PULLUP(GPIOF_ARD_D2)) | ||
1230 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_ZIO_D68) | \ | ||
1231 | PIN_ODR_HIGH(GPIOF_ZIO_D69) | \ | ||
1232 | PIN_ODR_HIGH(GPIOF_ZIO_D70) | \ | ||
1233 | PIN_ODR_HIGH(GPIOF_ARD_A3) | \ | ||
1234 | PIN_ODR_HIGH(GPIOF_ZIO_A8) | \ | ||
1235 | PIN_ODR_HIGH(GPIOF_ARD_A4) | \ | ||
1236 | PIN_ODR_HIGH(GPIOF_PIN6) | \ | ||
1237 | PIN_ODR_HIGH(GPIOF_ZIO_D62) | \ | ||
1238 | PIN_ODR_HIGH(GPIOF_ZIO_D61) | \ | ||
1239 | PIN_ODR_HIGH(GPIOF_ZIO_D63) | \ | ||
1240 | PIN_ODR_HIGH(GPIOF_ARD_A5) | \ | ||
1241 | PIN_ODR_HIGH(GPIOF_PIN11) | \ | ||
1242 | PIN_ODR_HIGH(GPIOF_ARD_D8) | \ | ||
1243 | PIN_ODR_HIGH(GPIOF_ARD_D7) | \ | ||
1244 | PIN_ODR_HIGH(GPIOF_ARD_D4) | \ | ||
1245 | PIN_ODR_HIGH(GPIOF_ARD_D2)) | ||
1246 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_ZIO_D68, 0U) | \ | ||
1247 | PIN_AFIO_AF(GPIOF_ZIO_D69, 0U) | \ | ||
1248 | PIN_AFIO_AF(GPIOF_ZIO_D70, 0U) | \ | ||
1249 | PIN_AFIO_AF(GPIOF_ARD_A3, 0U) | \ | ||
1250 | PIN_AFIO_AF(GPIOF_ZIO_A8, 0U) | \ | ||
1251 | PIN_AFIO_AF(GPIOF_ARD_A4, 0U) | \ | ||
1252 | PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ | ||
1253 | PIN_AFIO_AF(GPIOF_ZIO_D62, 0U)) | ||
1254 | #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_ZIO_D61, 0U) | \ | ||
1255 | PIN_AFIO_AF(GPIOF_ZIO_D63, 0U) | \ | ||
1256 | PIN_AFIO_AF(GPIOF_ARD_A5, 0U) | \ | ||
1257 | PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ | ||
1258 | PIN_AFIO_AF(GPIOF_ARD_D8, 0U) | \ | ||
1259 | PIN_AFIO_AF(GPIOF_ARD_D7, 0U) | \ | ||
1260 | PIN_AFIO_AF(GPIOF_ARD_D4, 0U) | \ | ||
1261 | PIN_AFIO_AF(GPIOF_ARD_D2, 0U)) | ||
1262 | |||
1263 | /* | ||
1264 | * GPIOG setup: | ||
1265 | * | ||
1266 | * PG0 - ZIO_D65 (input pullup). | ||
1267 | * PG1 - ZIO_D64 (input pullup). | ||
1268 | * PG2 - ZIO_D49 (input pullup). | ||
1269 | * PG3 - ZIO_D50 (input pullup). | ||
1270 | * PG4 - PIN4 (input pullup). | ||
1271 | * PG5 - PIN5 (input pullup). | ||
1272 | * PG6 - USB_GPIO_OUT (input pullup). | ||
1273 | * PG7 - USB_GPIO_IN (input pullup). | ||
1274 | * PG8 - PIN8 (input pullup). | ||
1275 | * PG9 - ARD_D0 USART6_RX (input pullup). | ||
1276 | * PG10 - PIN10 (input pullup). | ||
1277 | * PG11 - RMII_TX_EN (alternate 11). | ||
1278 | * PG12 - PIN12 (input pullup). | ||
1279 | * PG13 - RMII_TXD0 (alternate 11). | ||
1280 | * PG14 - ARD_D1 USART6_TX (input pullup). | ||
1281 | * PG15 - PIN15 (input pullup). | ||
1282 | */ | ||
1283 | #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_ZIO_D65) | \ | ||
1284 | PIN_MODE_INPUT(GPIOG_ZIO_D64) | \ | ||
1285 | PIN_MODE_INPUT(GPIOG_ZIO_D49) | \ | ||
1286 | PIN_MODE_INPUT(GPIOG_ZIO_D50) | \ | ||
1287 | PIN_MODE_INPUT(GPIOG_PIN4) | \ | ||
1288 | PIN_MODE_INPUT(GPIOG_PIN5) | \ | ||
1289 | PIN_MODE_INPUT(GPIOG_USB_GPIO_OUT) | \ | ||
1290 | PIN_MODE_INPUT(GPIOG_USB_GPIO_IN) | \ | ||
1291 | PIN_MODE_INPUT(GPIOG_PIN8) | \ | ||
1292 | PIN_MODE_INPUT(GPIOG_ARD_D0) | \ | ||
1293 | PIN_MODE_INPUT(GPIOG_PIN10) | \ | ||
1294 | PIN_MODE_ALTERNATE(GPIOG_RMII_TX_EN) | \ | ||
1295 | PIN_MODE_INPUT(GPIOG_PIN12) | \ | ||
1296 | PIN_MODE_ALTERNATE(GPIOG_RMII_TXD0) | \ | ||
1297 | PIN_MODE_INPUT(GPIOG_ARD_D1) | \ | ||
1298 | PIN_MODE_INPUT(GPIOG_PIN15)) | ||
1299 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D65) | \ | ||
1300 | PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D64) | \ | ||
1301 | PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D49) | \ | ||
1302 | PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D50) | \ | ||
1303 | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ | ||
1304 | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ | ||
1305 | PIN_OTYPE_PUSHPULL(GPIOG_USB_GPIO_OUT) |\ | ||
1306 | PIN_OTYPE_PUSHPULL(GPIOG_USB_GPIO_IN) |\ | ||
1307 | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ | ||
1308 | PIN_OTYPE_PUSHPULL(GPIOG_ARD_D0) | \ | ||
1309 | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ | ||
1310 | PIN_OTYPE_PUSHPULL(GPIOG_RMII_TX_EN) | \ | ||
1311 | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ | ||
1312 | PIN_OTYPE_PUSHPULL(GPIOG_RMII_TXD0) | \ | ||
1313 | PIN_OTYPE_PUSHPULL(GPIOG_ARD_D1) | \ | ||
1314 | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
1315 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_ZIO_D65) | \ | ||
1316 | PIN_OSPEED_VERYLOW(GPIOG_ZIO_D64) | \ | ||
1317 | PIN_OSPEED_VERYLOW(GPIOG_ZIO_D49) | \ | ||
1318 | PIN_OSPEED_VERYLOW(GPIOG_ZIO_D50) | \ | ||
1319 | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ | ||
1320 | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ | ||
1321 | PIN_OSPEED_HIGH(GPIOG_USB_GPIO_OUT) | \ | ||
1322 | PIN_OSPEED_HIGH(GPIOG_USB_GPIO_IN) | \ | ||
1323 | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ | ||
1324 | PIN_OSPEED_HIGH(GPIOG_ARD_D0) | \ | ||
1325 | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ | ||
1326 | PIN_OSPEED_HIGH(GPIOG_RMII_TX_EN) | \ | ||
1327 | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ | ||
1328 | PIN_OSPEED_HIGH(GPIOG_RMII_TXD0) | \ | ||
1329 | PIN_OSPEED_HIGH(GPIOG_ARD_D1) | \ | ||
1330 | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) | ||
1331 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_ZIO_D65) | \ | ||
1332 | PIN_PUPDR_PULLUP(GPIOG_ZIO_D64) | \ | ||
1333 | PIN_PUPDR_PULLUP(GPIOG_ZIO_D49) | \ | ||
1334 | PIN_PUPDR_PULLUP(GPIOG_ZIO_D50) | \ | ||
1335 | PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ | ||
1336 | PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ | ||
1337 | PIN_PUPDR_PULLUP(GPIOG_USB_GPIO_OUT) | \ | ||
1338 | PIN_PUPDR_PULLUP(GPIOG_USB_GPIO_IN) | \ | ||
1339 | PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ | ||
1340 | PIN_PUPDR_PULLUP(GPIOG_ARD_D0) | \ | ||
1341 | PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ | ||
1342 | PIN_PUPDR_FLOATING(GPIOG_RMII_TX_EN) | \ | ||
1343 | PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ | ||
1344 | PIN_PUPDR_FLOATING(GPIOG_RMII_TXD0) | \ | ||
1345 | PIN_PUPDR_PULLUP(GPIOG_ARD_D1) | \ | ||
1346 | PIN_PUPDR_PULLUP(GPIOG_PIN15)) | ||
1347 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_ZIO_D65) | \ | ||
1348 | PIN_ODR_HIGH(GPIOG_ZIO_D64) | \ | ||
1349 | PIN_ODR_HIGH(GPIOG_ZIO_D49) | \ | ||
1350 | PIN_ODR_HIGH(GPIOG_ZIO_D50) | \ | ||
1351 | PIN_ODR_HIGH(GPIOG_PIN4) | \ | ||
1352 | PIN_ODR_HIGH(GPIOG_PIN5) | \ | ||
1353 | PIN_ODR_HIGH(GPIOG_USB_GPIO_OUT) | \ | ||
1354 | PIN_ODR_HIGH(GPIOG_USB_GPIO_IN) | \ | ||
1355 | PIN_ODR_HIGH(GPIOG_PIN8) | \ | ||
1356 | PIN_ODR_HIGH(GPIOG_ARD_D0) | \ | ||
1357 | PIN_ODR_HIGH(GPIOG_PIN10) | \ | ||
1358 | PIN_ODR_HIGH(GPIOG_RMII_TX_EN) | \ | ||
1359 | PIN_ODR_HIGH(GPIOG_PIN12) | \ | ||
1360 | PIN_ODR_HIGH(GPIOG_RMII_TXD0) | \ | ||
1361 | PIN_ODR_HIGH(GPIOG_ARD_D1) | \ | ||
1362 | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
1363 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_ZIO_D65, 0U) | \ | ||
1364 | PIN_AFIO_AF(GPIOG_ZIO_D64, 0U) | \ | ||
1365 | PIN_AFIO_AF(GPIOG_ZIO_D49, 0U) | \ | ||
1366 | PIN_AFIO_AF(GPIOG_ZIO_D50, 0U) | \ | ||
1367 | PIN_AFIO_AF(GPIOG_PIN4, 0U) | \ | ||
1368 | PIN_AFIO_AF(GPIOG_PIN5, 0U) | \ | ||
1369 | PIN_AFIO_AF(GPIOG_USB_GPIO_OUT, 0U) | \ | ||
1370 | PIN_AFIO_AF(GPIOG_USB_GPIO_IN, 0U)) | ||
1371 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \ | ||
1372 | PIN_AFIO_AF(GPIOG_ARD_D0, 0U) | \ | ||
1373 | PIN_AFIO_AF(GPIOG_PIN10, 0U) | \ | ||
1374 | PIN_AFIO_AF(GPIOG_RMII_TX_EN, 11U) | \ | ||
1375 | PIN_AFIO_AF(GPIOG_PIN12, 0U) | \ | ||
1376 | PIN_AFIO_AF(GPIOG_RMII_TXD0, 11U) | \ | ||
1377 | PIN_AFIO_AF(GPIOG_ARD_D1, 0U) | \ | ||
1378 | PIN_AFIO_AF(GPIOG_PIN15, 0U)) | ||
1379 | |||
1380 | /* | ||
1381 | * GPIOH setup: | ||
1382 | * | ||
1383 | * PH0 - OSC_IN (input floating). | ||
1384 | * PH1 - OSC_OUT (input floating). | ||
1385 | * PH2 - PIN2 (input pullup). | ||
1386 | * PH3 - PIN3 (input pullup). | ||
1387 | * PH4 - PIN4 (input pullup). | ||
1388 | * PH5 - PIN5 (input pullup). | ||
1389 | * PH6 - PIN6 (input pullup). | ||
1390 | * PH7 - PIN7 (input pullup). | ||
1391 | * PH8 - PIN8 (input pullup). | ||
1392 | * PH9 - PIN9 (input pullup). | ||
1393 | * PH10 - PIN10 (input pullup). | ||
1394 | * PH11 - PIN11 (input pullup). | ||
1395 | * PH12 - PIN12 (input pullup). | ||
1396 | * PH13 - PIN13 (input pullup). | ||
1397 | * PH14 - PIN14 (input pullup). | ||
1398 | * PH15 - PIN15 (input pullup). | ||
1399 | */ | ||
1400 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \ | ||
1401 | PIN_MODE_INPUT(GPIOH_OSC_OUT) | \ | ||
1402 | PIN_MODE_INPUT(GPIOH_PIN2) | \ | ||
1403 | PIN_MODE_INPUT(GPIOH_PIN3) | \ | ||
1404 | PIN_MODE_INPUT(GPIOH_PIN4) | \ | ||
1405 | PIN_MODE_INPUT(GPIOH_PIN5) | \ | ||
1406 | PIN_MODE_INPUT(GPIOH_PIN6) | \ | ||
1407 | PIN_MODE_INPUT(GPIOH_PIN7) | \ | ||
1408 | PIN_MODE_INPUT(GPIOH_PIN8) | \ | ||
1409 | PIN_MODE_INPUT(GPIOH_PIN9) | \ | ||
1410 | PIN_MODE_INPUT(GPIOH_PIN10) | \ | ||
1411 | PIN_MODE_INPUT(GPIOH_PIN11) | \ | ||
1412 | PIN_MODE_INPUT(GPIOH_PIN12) | \ | ||
1413 | PIN_MODE_INPUT(GPIOH_PIN13) | \ | ||
1414 | PIN_MODE_INPUT(GPIOH_PIN14) | \ | ||
1415 | PIN_MODE_INPUT(GPIOH_PIN15)) | ||
1416 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \ | ||
1417 | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \ | ||
1418 | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ | ||
1419 | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ | ||
1420 | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ | ||
1421 | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ | ||
1422 | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ | ||
1423 | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ | ||
1424 | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ | ||
1425 | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ | ||
1426 | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ | ||
1427 | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ | ||
1428 | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ | ||
1429 | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ | ||
1430 | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ | ||
1431 | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
1432 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \ | ||
1433 | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \ | ||
1434 | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ | ||
1435 | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ | ||
1436 | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ | ||
1437 | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ | ||
1438 | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ | ||
1439 | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ | ||
1440 | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ | ||
1441 | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ | ||
1442 | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ | ||
1443 | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ | ||
1444 | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ | ||
1445 | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ | ||
1446 | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ | ||
1447 | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) | ||
1448 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \ | ||
1449 | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \ | ||
1450 | PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ | ||
1451 | PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ | ||
1452 | PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ | ||
1453 | PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ | ||
1454 | PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ | ||
1455 | PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ | ||
1456 | PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ | ||
1457 | PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ | ||
1458 | PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ | ||
1459 | PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ | ||
1460 | PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ | ||
1461 | PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ | ||
1462 | PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ | ||
1463 | PIN_PUPDR_PULLUP(GPIOH_PIN15)) | ||
1464 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \ | ||
1465 | PIN_ODR_HIGH(GPIOH_OSC_OUT) | \ | ||
1466 | PIN_ODR_HIGH(GPIOH_PIN2) | \ | ||
1467 | PIN_ODR_HIGH(GPIOH_PIN3) | \ | ||
1468 | PIN_ODR_HIGH(GPIOH_PIN4) | \ | ||
1469 | PIN_ODR_HIGH(GPIOH_PIN5) | \ | ||
1470 | PIN_ODR_HIGH(GPIOH_PIN6) | \ | ||
1471 | PIN_ODR_HIGH(GPIOH_PIN7) | \ | ||
1472 | PIN_ODR_HIGH(GPIOH_PIN8) | \ | ||
1473 | PIN_ODR_HIGH(GPIOH_PIN9) | \ | ||
1474 | PIN_ODR_HIGH(GPIOH_PIN10) | \ | ||
1475 | PIN_ODR_HIGH(GPIOH_PIN11) | \ | ||
1476 | PIN_ODR_HIGH(GPIOH_PIN12) | \ | ||
1477 | PIN_ODR_HIGH(GPIOH_PIN13) | \ | ||
1478 | PIN_ODR_HIGH(GPIOH_PIN14) | \ | ||
1479 | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
1480 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \ | ||
1481 | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \ | ||
1482 | PIN_AFIO_AF(GPIOH_PIN2, 0U) | \ | ||
1483 | PIN_AFIO_AF(GPIOH_PIN3, 0U) | \ | ||
1484 | PIN_AFIO_AF(GPIOH_PIN4, 0U) | \ | ||
1485 | PIN_AFIO_AF(GPIOH_PIN5, 0U) | \ | ||
1486 | PIN_AFIO_AF(GPIOH_PIN6, 0U) | \ | ||
1487 | PIN_AFIO_AF(GPIOH_PIN7, 0U)) | ||
1488 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \ | ||
1489 | PIN_AFIO_AF(GPIOH_PIN9, 0U) | \ | ||
1490 | PIN_AFIO_AF(GPIOH_PIN10, 0U) | \ | ||
1491 | PIN_AFIO_AF(GPIOH_PIN11, 0U) | \ | ||
1492 | PIN_AFIO_AF(GPIOH_PIN12, 0U) | \ | ||
1493 | PIN_AFIO_AF(GPIOH_PIN13, 0U) | \ | ||
1494 | PIN_AFIO_AF(GPIOH_PIN14, 0U) | \ | ||
1495 | PIN_AFIO_AF(GPIOH_PIN15, 0U)) | ||
1496 | |||
1497 | /* | ||
1498 | * GPIOI setup: | ||
1499 | * | ||
1500 | * PI0 - PIN0 (input pullup). | ||
1501 | * PI1 - PIN1 (input pullup). | ||
1502 | * PI2 - PIN2 (input pullup). | ||
1503 | * PI3 - PIN3 (input pullup). | ||
1504 | * PI4 - PIN4 (input pullup). | ||
1505 | * PI5 - PIN5 (input pullup). | ||
1506 | * PI6 - PIN6 (input pullup). | ||
1507 | * PI7 - PIN7 (input pullup). | ||
1508 | * PI8 - PIN8 (input pullup). | ||
1509 | * PI9 - PIN9 (input pullup). | ||
1510 | * PI10 - PIN10 (input pullup). | ||
1511 | * PI11 - PIN11 (input pullup). | ||
1512 | * PI12 - PIN12 (input pullup). | ||
1513 | * PI13 - PIN13 (input pullup). | ||
1514 | * PI14 - PIN14 (input pullup). | ||
1515 | * PI15 - PIN15 (input pullup). | ||
1516 | */ | ||
1517 | #define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | \ | ||
1518 | PIN_MODE_INPUT(GPIOI_PIN1) | \ | ||
1519 | PIN_MODE_INPUT(GPIOI_PIN2) | \ | ||
1520 | PIN_MODE_INPUT(GPIOI_PIN3) | \ | ||
1521 | PIN_MODE_INPUT(GPIOI_PIN4) | \ | ||
1522 | PIN_MODE_INPUT(GPIOI_PIN5) | \ | ||
1523 | PIN_MODE_INPUT(GPIOI_PIN6) | \ | ||
1524 | PIN_MODE_INPUT(GPIOI_PIN7) | \ | ||
1525 | PIN_MODE_INPUT(GPIOI_PIN8) | \ | ||
1526 | PIN_MODE_INPUT(GPIOI_PIN9) | \ | ||
1527 | PIN_MODE_INPUT(GPIOI_PIN10) | \ | ||
1528 | PIN_MODE_INPUT(GPIOI_PIN11) | \ | ||
1529 | PIN_MODE_INPUT(GPIOI_PIN12) | \ | ||
1530 | PIN_MODE_INPUT(GPIOI_PIN13) | \ | ||
1531 | PIN_MODE_INPUT(GPIOI_PIN14) | \ | ||
1532 | PIN_MODE_INPUT(GPIOI_PIN15)) | ||
1533 | #define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \ | ||
1534 | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \ | ||
1535 | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \ | ||
1536 | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \ | ||
1537 | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \ | ||
1538 | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \ | ||
1539 | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \ | ||
1540 | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \ | ||
1541 | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \ | ||
1542 | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \ | ||
1543 | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \ | ||
1544 | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \ | ||
1545 | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \ | ||
1546 | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \ | ||
1547 | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \ | ||
1548 | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) | ||
1549 | #define VAL_GPIOI_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOI_PIN0) | \ | ||
1550 | PIN_OSPEED_VERYLOW(GPIOI_PIN1) | \ | ||
1551 | PIN_OSPEED_VERYLOW(GPIOI_PIN2) | \ | ||
1552 | PIN_OSPEED_VERYLOW(GPIOI_PIN3) | \ | ||
1553 | PIN_OSPEED_VERYLOW(GPIOI_PIN4) | \ | ||
1554 | PIN_OSPEED_VERYLOW(GPIOI_PIN5) | \ | ||
1555 | PIN_OSPEED_VERYLOW(GPIOI_PIN6) | \ | ||
1556 | PIN_OSPEED_VERYLOW(GPIOI_PIN7) | \ | ||
1557 | PIN_OSPEED_VERYLOW(GPIOI_PIN8) | \ | ||
1558 | PIN_OSPEED_VERYLOW(GPIOI_PIN9) | \ | ||
1559 | PIN_OSPEED_VERYLOW(GPIOI_PIN10) | \ | ||
1560 | PIN_OSPEED_VERYLOW(GPIOI_PIN11) | \ | ||
1561 | PIN_OSPEED_VERYLOW(GPIOI_PIN12) | \ | ||
1562 | PIN_OSPEED_VERYLOW(GPIOI_PIN13) | \ | ||
1563 | PIN_OSPEED_VERYLOW(GPIOI_PIN14) | \ | ||
1564 | PIN_OSPEED_VERYLOW(GPIOI_PIN15)) | ||
1565 | #define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | \ | ||
1566 | PIN_PUPDR_PULLUP(GPIOI_PIN1) | \ | ||
1567 | PIN_PUPDR_PULLUP(GPIOI_PIN2) | \ | ||
1568 | PIN_PUPDR_PULLUP(GPIOI_PIN3) | \ | ||
1569 | PIN_PUPDR_PULLUP(GPIOI_PIN4) | \ | ||
1570 | PIN_PUPDR_PULLUP(GPIOI_PIN5) | \ | ||
1571 | PIN_PUPDR_PULLUP(GPIOI_PIN6) | \ | ||
1572 | PIN_PUPDR_PULLUP(GPIOI_PIN7) | \ | ||
1573 | PIN_PUPDR_PULLUP(GPIOI_PIN8) | \ | ||
1574 | PIN_PUPDR_PULLUP(GPIOI_PIN9) | \ | ||
1575 | PIN_PUPDR_PULLUP(GPIOI_PIN10) | \ | ||
1576 | PIN_PUPDR_PULLUP(GPIOI_PIN11) | \ | ||
1577 | PIN_PUPDR_PULLUP(GPIOI_PIN12) | \ | ||
1578 | PIN_PUPDR_PULLUP(GPIOI_PIN13) | \ | ||
1579 | PIN_PUPDR_PULLUP(GPIOI_PIN14) | \ | ||
1580 | PIN_PUPDR_PULLUP(GPIOI_PIN15)) | ||
1581 | #define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \ | ||
1582 | PIN_ODR_HIGH(GPIOI_PIN1) | \ | ||
1583 | PIN_ODR_HIGH(GPIOI_PIN2) | \ | ||
1584 | PIN_ODR_HIGH(GPIOI_PIN3) | \ | ||
1585 | PIN_ODR_HIGH(GPIOI_PIN4) | \ | ||
1586 | PIN_ODR_HIGH(GPIOI_PIN5) | \ | ||
1587 | PIN_ODR_HIGH(GPIOI_PIN6) | \ | ||
1588 | PIN_ODR_HIGH(GPIOI_PIN7) | \ | ||
1589 | PIN_ODR_HIGH(GPIOI_PIN8) | \ | ||
1590 | PIN_ODR_HIGH(GPIOI_PIN9) | \ | ||
1591 | PIN_ODR_HIGH(GPIOI_PIN10) | \ | ||
1592 | PIN_ODR_HIGH(GPIOI_PIN11) | \ | ||
1593 | PIN_ODR_HIGH(GPIOI_PIN12) | \ | ||
1594 | PIN_ODR_HIGH(GPIOI_PIN13) | \ | ||
1595 | PIN_ODR_HIGH(GPIOI_PIN14) | \ | ||
1596 | PIN_ODR_HIGH(GPIOI_PIN15)) | ||
1597 | #define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \ | ||
1598 | PIN_AFIO_AF(GPIOI_PIN1, 0U) | \ | ||
1599 | PIN_AFIO_AF(GPIOI_PIN2, 0U) | \ | ||
1600 | PIN_AFIO_AF(GPIOI_PIN3, 0U) | \ | ||
1601 | PIN_AFIO_AF(GPIOI_PIN4, 0U) | \ | ||
1602 | PIN_AFIO_AF(GPIOI_PIN5, 0U) | \ | ||
1603 | PIN_AFIO_AF(GPIOI_PIN6, 0U) | \ | ||
1604 | PIN_AFIO_AF(GPIOI_PIN7, 0U)) | ||
1605 | #define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \ | ||
1606 | PIN_AFIO_AF(GPIOI_PIN9, 0U) | \ | ||
1607 | PIN_AFIO_AF(GPIOI_PIN10, 0U) | \ | ||
1608 | PIN_AFIO_AF(GPIOI_PIN11, 0U) | \ | ||
1609 | PIN_AFIO_AF(GPIOI_PIN12, 0U) | \ | ||
1610 | PIN_AFIO_AF(GPIOI_PIN13, 0U) | \ | ||
1611 | PIN_AFIO_AF(GPIOI_PIN14, 0U) | \ | ||
1612 | PIN_AFIO_AF(GPIOI_PIN15, 0U)) | ||
1613 | |||
1614 | /* | ||
1615 | * GPIOJ setup: | ||
1616 | * | ||
1617 | * PJ0 - PIN0 (input pullup). | ||
1618 | * PJ1 - PIN1 (input pullup). | ||
1619 | * PJ2 - PIN2 (input pullup). | ||
1620 | * PJ3 - PIN3 (input pullup). | ||
1621 | * PJ4 - PIN4 (input pullup). | ||
1622 | * PJ5 - PIN5 (input pullup). | ||
1623 | * PJ6 - PIN6 (input pullup). | ||
1624 | * PJ7 - PIN7 (input pullup). | ||
1625 | * PJ8 - PIN8 (input pullup). | ||
1626 | * PJ9 - PIN9 (input pullup). | ||
1627 | * PJ10 - PIN10 (input pullup). | ||
1628 | * PJ11 - PIN11 (input pullup). | ||
1629 | * PJ12 - PIN12 (input pullup). | ||
1630 | * PJ13 - PIN13 (input pullup). | ||
1631 | * PJ14 - PIN14 (input pullup). | ||
1632 | * PJ15 - PIN15 (input pullup). | ||
1633 | */ | ||
1634 | #define VAL_GPIOJ_MODER (PIN_MODE_INPUT(GPIOJ_PIN0) | \ | ||
1635 | PIN_MODE_INPUT(GPIOJ_PIN1) | \ | ||
1636 | PIN_MODE_INPUT(GPIOJ_PIN2) | \ | ||
1637 | PIN_MODE_INPUT(GPIOJ_PIN3) | \ | ||
1638 | PIN_MODE_INPUT(GPIOJ_PIN4) | \ | ||
1639 | PIN_MODE_INPUT(GPIOJ_PIN5) | \ | ||
1640 | PIN_MODE_INPUT(GPIOJ_PIN6) | \ | ||
1641 | PIN_MODE_INPUT(GPIOJ_PIN7) | \ | ||
1642 | PIN_MODE_INPUT(GPIOJ_PIN8) | \ | ||
1643 | PIN_MODE_INPUT(GPIOJ_PIN9) | \ | ||
1644 | PIN_MODE_INPUT(GPIOJ_PIN10) | \ | ||
1645 | PIN_MODE_INPUT(GPIOJ_PIN11) | \ | ||
1646 | PIN_MODE_INPUT(GPIOJ_PIN12) | \ | ||
1647 | PIN_MODE_INPUT(GPIOJ_PIN13) | \ | ||
1648 | PIN_MODE_INPUT(GPIOJ_PIN14) | \ | ||
1649 | PIN_MODE_INPUT(GPIOJ_PIN15)) | ||
1650 | #define VAL_GPIOJ_OTYPER (PIN_OTYPE_PUSHPULL(GPIOJ_PIN0) | \ | ||
1651 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN1) | \ | ||
1652 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN2) | \ | ||
1653 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN3) | \ | ||
1654 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN4) | \ | ||
1655 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN5) | \ | ||
1656 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN6) | \ | ||
1657 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN7) | \ | ||
1658 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN8) | \ | ||
1659 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN9) | \ | ||
1660 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN10) | \ | ||
1661 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN11) | \ | ||
1662 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN12) | \ | ||
1663 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN13) | \ | ||
1664 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN14) | \ | ||
1665 | PIN_OTYPE_PUSHPULL(GPIOJ_PIN15)) | ||
1666 | #define VAL_GPIOJ_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOJ_PIN0) | \ | ||
1667 | PIN_OSPEED_VERYLOW(GPIOJ_PIN1) | \ | ||
1668 | PIN_OSPEED_VERYLOW(GPIOJ_PIN2) | \ | ||
1669 | PIN_OSPEED_VERYLOW(GPIOJ_PIN3) | \ | ||
1670 | PIN_OSPEED_VERYLOW(GPIOJ_PIN4) | \ | ||
1671 | PIN_OSPEED_VERYLOW(GPIOJ_PIN5) | \ | ||
1672 | PIN_OSPEED_VERYLOW(GPIOJ_PIN6) | \ | ||
1673 | PIN_OSPEED_VERYLOW(GPIOJ_PIN7) | \ | ||
1674 | PIN_OSPEED_VERYLOW(GPIOJ_PIN8) | \ | ||
1675 | PIN_OSPEED_VERYLOW(GPIOJ_PIN9) | \ | ||
1676 | PIN_OSPEED_VERYLOW(GPIOJ_PIN10) | \ | ||
1677 | PIN_OSPEED_VERYLOW(GPIOJ_PIN11) | \ | ||
1678 | PIN_OSPEED_VERYLOW(GPIOJ_PIN12) | \ | ||
1679 | PIN_OSPEED_VERYLOW(GPIOJ_PIN13) | \ | ||
1680 | PIN_OSPEED_VERYLOW(GPIOJ_PIN14) | \ | ||
1681 | PIN_OSPEED_VERYLOW(GPIOJ_PIN15)) | ||
1682 | #define VAL_GPIOJ_PUPDR (PIN_PUPDR_PULLUP(GPIOJ_PIN0) | \ | ||
1683 | PIN_PUPDR_PULLUP(GPIOJ_PIN1) | \ | ||
1684 | PIN_PUPDR_PULLUP(GPIOJ_PIN2) | \ | ||
1685 | PIN_PUPDR_PULLUP(GPIOJ_PIN3) | \ | ||
1686 | PIN_PUPDR_PULLUP(GPIOJ_PIN4) | \ | ||
1687 | PIN_PUPDR_PULLUP(GPIOJ_PIN5) | \ | ||
1688 | PIN_PUPDR_PULLUP(GPIOJ_PIN6) | \ | ||
1689 | PIN_PUPDR_PULLUP(GPIOJ_PIN7) | \ | ||
1690 | PIN_PUPDR_PULLUP(GPIOJ_PIN8) | \ | ||
1691 | PIN_PUPDR_PULLUP(GPIOJ_PIN9) | \ | ||
1692 | PIN_PUPDR_PULLUP(GPIOJ_PIN10) | \ | ||
1693 | PIN_PUPDR_PULLUP(GPIOJ_PIN11) | \ | ||
1694 | PIN_PUPDR_PULLUP(GPIOJ_PIN12) | \ | ||
1695 | PIN_PUPDR_PULLUP(GPIOJ_PIN13) | \ | ||
1696 | PIN_PUPDR_PULLUP(GPIOJ_PIN14) | \ | ||
1697 | PIN_PUPDR_PULLUP(GPIOJ_PIN15)) | ||
1698 | #define VAL_GPIOJ_ODR (PIN_ODR_HIGH(GPIOJ_PIN0) | \ | ||
1699 | PIN_ODR_HIGH(GPIOJ_PIN1) | \ | ||
1700 | PIN_ODR_HIGH(GPIOJ_PIN2) | \ | ||
1701 | PIN_ODR_HIGH(GPIOJ_PIN3) | \ | ||
1702 | PIN_ODR_HIGH(GPIOJ_PIN4) | \ | ||
1703 | PIN_ODR_HIGH(GPIOJ_PIN5) | \ | ||
1704 | PIN_ODR_HIGH(GPIOJ_PIN6) | \ | ||
1705 | PIN_ODR_HIGH(GPIOJ_PIN7) | \ | ||
1706 | PIN_ODR_HIGH(GPIOJ_PIN8) | \ | ||
1707 | PIN_ODR_HIGH(GPIOJ_PIN9) | \ | ||
1708 | PIN_ODR_HIGH(GPIOJ_PIN10) | \ | ||
1709 | PIN_ODR_HIGH(GPIOJ_PIN11) | \ | ||
1710 | PIN_ODR_HIGH(GPIOJ_PIN12) | \ | ||
1711 | PIN_ODR_HIGH(GPIOJ_PIN13) | \ | ||
1712 | PIN_ODR_HIGH(GPIOJ_PIN14) | \ | ||
1713 | PIN_ODR_HIGH(GPIOJ_PIN15)) | ||
1714 | #define VAL_GPIOJ_AFRL (PIN_AFIO_AF(GPIOJ_PIN0, 0U) | \ | ||
1715 | PIN_AFIO_AF(GPIOJ_PIN1, 0U) | \ | ||
1716 | PIN_AFIO_AF(GPIOJ_PIN2, 0U) | \ | ||
1717 | PIN_AFIO_AF(GPIOJ_PIN3, 0U) | \ | ||
1718 | PIN_AFIO_AF(GPIOJ_PIN4, 0U) | \ | ||
1719 | PIN_AFIO_AF(GPIOJ_PIN5, 0U) | \ | ||
1720 | PIN_AFIO_AF(GPIOJ_PIN6, 0U) | \ | ||
1721 | PIN_AFIO_AF(GPIOJ_PIN7, 0U)) | ||
1722 | #define VAL_GPIOJ_AFRH (PIN_AFIO_AF(GPIOJ_PIN8, 0U) | \ | ||
1723 | PIN_AFIO_AF(GPIOJ_PIN9, 0U) | \ | ||
1724 | PIN_AFIO_AF(GPIOJ_PIN10, 0U) | \ | ||
1725 | PIN_AFIO_AF(GPIOJ_PIN11, 0U) | \ | ||
1726 | PIN_AFIO_AF(GPIOJ_PIN12, 0U) | \ | ||
1727 | PIN_AFIO_AF(GPIOJ_PIN13, 0U) | \ | ||
1728 | PIN_AFIO_AF(GPIOJ_PIN14, 0U) | \ | ||
1729 | PIN_AFIO_AF(GPIOJ_PIN15, 0U)) | ||
1730 | |||
1731 | /* | ||
1732 | * GPIOK setup: | ||
1733 | * | ||
1734 | * PK0 - PIN0 (input pullup). | ||
1735 | * PK1 - PIN1 (input pullup). | ||
1736 | * PK2 - PIN2 (input pullup). | ||
1737 | * PK3 - PIN3 (input pullup). | ||
1738 | * PK4 - PIN4 (input pullup). | ||
1739 | * PK5 - PIN5 (input pullup). | ||
1740 | * PK6 - PIN6 (input pullup). | ||
1741 | * PK7 - PIN7 (input pullup). | ||
1742 | * PK8 - PIN8 (input pullup). | ||
1743 | * PK9 - PIN9 (input pullup). | ||
1744 | * PK10 - PIN10 (input pullup). | ||
1745 | * PK11 - PIN11 (input pullup). | ||
1746 | * PK12 - PIN12 (input pullup). | ||
1747 | * PK13 - PIN13 (input pullup). | ||
1748 | * PK14 - PIN14 (input pullup). | ||
1749 | * PK15 - PIN15 (input pullup). | ||
1750 | */ | ||
1751 | #define VAL_GPIOK_MODER (PIN_MODE_INPUT(GPIOK_PIN0) | \ | ||
1752 | PIN_MODE_INPUT(GPIOK_PIN1) | \ | ||
1753 | PIN_MODE_INPUT(GPIOK_PIN2) | \ | ||
1754 | PIN_MODE_INPUT(GPIOK_PIN3) | \ | ||
1755 | PIN_MODE_INPUT(GPIOK_PIN4) | \ | ||
1756 | PIN_MODE_INPUT(GPIOK_PIN5) | \ | ||
1757 | PIN_MODE_INPUT(GPIOK_PIN6) | \ | ||
1758 | PIN_MODE_INPUT(GPIOK_PIN7) | \ | ||
1759 | PIN_MODE_INPUT(GPIOK_PIN8) | \ | ||
1760 | PIN_MODE_INPUT(GPIOK_PIN9) | \ | ||
1761 | PIN_MODE_INPUT(GPIOK_PIN10) | \ | ||
1762 | PIN_MODE_INPUT(GPIOK_PIN11) | \ | ||
1763 | PIN_MODE_INPUT(GPIOK_PIN12) | \ | ||
1764 | PIN_MODE_INPUT(GPIOK_PIN13) | \ | ||
1765 | PIN_MODE_INPUT(GPIOK_PIN14) | \ | ||
1766 | PIN_MODE_INPUT(GPIOK_PIN15)) | ||
1767 | #define VAL_GPIOK_OTYPER (PIN_OTYPE_PUSHPULL(GPIOK_PIN0) | \ | ||
1768 | PIN_OTYPE_PUSHPULL(GPIOK_PIN1) | \ | ||
1769 | PIN_OTYPE_PUSHPULL(GPIOK_PIN2) | \ | ||
1770 | PIN_OTYPE_PUSHPULL(GPIOK_PIN3) | \ | ||
1771 | PIN_OTYPE_PUSHPULL(GPIOK_PIN4) | \ | ||
1772 | PIN_OTYPE_PUSHPULL(GPIOK_PIN5) | \ | ||
1773 | PIN_OTYPE_PUSHPULL(GPIOK_PIN6) | \ | ||
1774 | PIN_OTYPE_PUSHPULL(GPIOK_PIN7) | \ | ||
1775 | PIN_OTYPE_PUSHPULL(GPIOK_PIN8) | \ | ||
1776 | PIN_OTYPE_PUSHPULL(GPIOK_PIN9) | \ | ||
1777 | PIN_OTYPE_PUSHPULL(GPIOK_PIN10) | \ | ||
1778 | PIN_OTYPE_PUSHPULL(GPIOK_PIN11) | \ | ||
1779 | PIN_OTYPE_PUSHPULL(GPIOK_PIN12) | \ | ||
1780 | PIN_OTYPE_PUSHPULL(GPIOK_PIN13) | \ | ||
1781 | PIN_OTYPE_PUSHPULL(GPIOK_PIN14) | \ | ||
1782 | PIN_OTYPE_PUSHPULL(GPIOK_PIN15)) | ||
1783 | #define VAL_GPIOK_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOK_PIN0) | \ | ||
1784 | PIN_OSPEED_VERYLOW(GPIOK_PIN1) | \ | ||
1785 | PIN_OSPEED_VERYLOW(GPIOK_PIN2) | \ | ||
1786 | PIN_OSPEED_VERYLOW(GPIOK_PIN3) | \ | ||
1787 | PIN_OSPEED_VERYLOW(GPIOK_PIN4) | \ | ||
1788 | PIN_OSPEED_VERYLOW(GPIOK_PIN5) | \ | ||
1789 | PIN_OSPEED_VERYLOW(GPIOK_PIN6) | \ | ||
1790 | PIN_OSPEED_VERYLOW(GPIOK_PIN7) | \ | ||
1791 | PIN_OSPEED_VERYLOW(GPIOK_PIN8) | \ | ||
1792 | PIN_OSPEED_VERYLOW(GPIOK_PIN9) | \ | ||
1793 | PIN_OSPEED_VERYLOW(GPIOK_PIN10) | \ | ||
1794 | PIN_OSPEED_VERYLOW(GPIOK_PIN11) | \ | ||
1795 | PIN_OSPEED_VERYLOW(GPIOK_PIN12) | \ | ||
1796 | PIN_OSPEED_VERYLOW(GPIOK_PIN13) | \ | ||
1797 | PIN_OSPEED_VERYLOW(GPIOK_PIN14) | \ | ||
1798 | PIN_OSPEED_VERYLOW(GPIOK_PIN15)) | ||
1799 | #define VAL_GPIOK_PUPDR (PIN_PUPDR_PULLUP(GPIOK_PIN0) | \ | ||
1800 | PIN_PUPDR_PULLUP(GPIOK_PIN1) | \ | ||
1801 | PIN_PUPDR_PULLUP(GPIOK_PIN2) | \ | ||
1802 | PIN_PUPDR_PULLUP(GPIOK_PIN3) | \ | ||
1803 | PIN_PUPDR_PULLUP(GPIOK_PIN4) | \ | ||
1804 | PIN_PUPDR_PULLUP(GPIOK_PIN5) | \ | ||
1805 | PIN_PUPDR_PULLUP(GPIOK_PIN6) | \ | ||
1806 | PIN_PUPDR_PULLUP(GPIOK_PIN7) | \ | ||
1807 | PIN_PUPDR_PULLUP(GPIOK_PIN8) | \ | ||
1808 | PIN_PUPDR_PULLUP(GPIOK_PIN9) | \ | ||
1809 | PIN_PUPDR_PULLUP(GPIOK_PIN10) | \ | ||
1810 | PIN_PUPDR_PULLUP(GPIOK_PIN11) | \ | ||
1811 | PIN_PUPDR_PULLUP(GPIOK_PIN12) | \ | ||
1812 | PIN_PUPDR_PULLUP(GPIOK_PIN13) | \ | ||
1813 | PIN_PUPDR_PULLUP(GPIOK_PIN14) | \ | ||
1814 | PIN_PUPDR_PULLUP(GPIOK_PIN15)) | ||
1815 | #define VAL_GPIOK_ODR (PIN_ODR_HIGH(GPIOK_PIN0) | \ | ||
1816 | PIN_ODR_HIGH(GPIOK_PIN1) | \ | ||
1817 | PIN_ODR_HIGH(GPIOK_PIN2) | \ | ||
1818 | PIN_ODR_HIGH(GPIOK_PIN3) | \ | ||
1819 | PIN_ODR_HIGH(GPIOK_PIN4) | \ | ||
1820 | PIN_ODR_HIGH(GPIOK_PIN5) | \ | ||
1821 | PIN_ODR_HIGH(GPIOK_PIN6) | \ | ||
1822 | PIN_ODR_HIGH(GPIOK_PIN7) | \ | ||
1823 | PIN_ODR_HIGH(GPIOK_PIN8) | \ | ||
1824 | PIN_ODR_HIGH(GPIOK_PIN9) | \ | ||
1825 | PIN_ODR_HIGH(GPIOK_PIN10) | \ | ||
1826 | PIN_ODR_HIGH(GPIOK_PIN11) | \ | ||
1827 | PIN_ODR_HIGH(GPIOK_PIN12) | \ | ||
1828 | PIN_ODR_HIGH(GPIOK_PIN13) | \ | ||
1829 | PIN_ODR_HIGH(GPIOK_PIN14) | \ | ||
1830 | PIN_ODR_HIGH(GPIOK_PIN15)) | ||
1831 | #define VAL_GPIOK_AFRL (PIN_AFIO_AF(GPIOK_PIN0, 0U) | \ | ||
1832 | PIN_AFIO_AF(GPIOK_PIN1, 0U) | \ | ||
1833 | PIN_AFIO_AF(GPIOK_PIN2, 0U) | \ | ||
1834 | PIN_AFIO_AF(GPIOK_PIN3, 0U) | \ | ||
1835 | PIN_AFIO_AF(GPIOK_PIN4, 0U) | \ | ||
1836 | PIN_AFIO_AF(GPIOK_PIN5, 0U) | \ | ||
1837 | PIN_AFIO_AF(GPIOK_PIN6, 0U) | \ | ||
1838 | PIN_AFIO_AF(GPIOK_PIN7, 0U)) | ||
1839 | #define VAL_GPIOK_AFRH (PIN_AFIO_AF(GPIOK_PIN8, 0U) | \ | ||
1840 | PIN_AFIO_AF(GPIOK_PIN9, 0U) | \ | ||
1841 | PIN_AFIO_AF(GPIOK_PIN10, 0U) | \ | ||
1842 | PIN_AFIO_AF(GPIOK_PIN11, 0U) | \ | ||
1843 | PIN_AFIO_AF(GPIOK_PIN12, 0U) | \ | ||
1844 | PIN_AFIO_AF(GPIOK_PIN13, 0U) | \ | ||
1845 | PIN_AFIO_AF(GPIOK_PIN14, 0U) | \ | ||
1846 | PIN_AFIO_AF(GPIOK_PIN15, 0U)) | ||
1847 | |||
1848 | /*===========================================================================*/ | ||
1849 | /* External declarations. */ | ||
1850 | /*===========================================================================*/ | ||
1851 | |||
1852 | #if !defined(_FROM_ASM_) | ||
1853 | #ifdef __cplusplus | ||
1854 | extern "C" { | ||
1855 | #endif | ||
1856 | void boardInit(void); | ||
1857 | #ifdef __cplusplus | ||
1858 | } | ||
1859 | #endif | ||
1860 | #endif /* _FROM_ASM_ */ | ||
1861 | |||
1862 | #endif /* BOARD_H */ | ||