mikroSDK Reference Manual
stm32h7xx_hal_gpio_ex.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef STM32H7xx_HAL_GPIO_EX_H
22#define STM32H7xx_HAL_GPIO_EX_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "stm32h7xx_hal_def.h"
30
39/* Exported types ------------------------------------------------------------*/
40
41/* Exported constants --------------------------------------------------------*/
53#define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
54#define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
55#define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
56#define GPIO_AF0_LCDBIAS ((uint8_t)0x00) /* LCDBIAS Alternate Function mapping */
57#define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
58#if defined (PWR_CPUCR_PDDS_D2) /* PWR D1 and D2 domains exists */
59#define GPIO_AF0_C1DSLEEP ((uint8_t)0x00) /* Cortex-M7 Deep Sleep Alternate Function mapping : available on STM32H7 Rev.B and above */
60#define GPIO_AF0_C1SLEEP ((uint8_t)0x00) /* Cortex-M7 Sleep Alternate Function mapping : available on STM32H7 Rev.B and above */
61#define GPIO_AF0_D1PWREN ((uint8_t)0x00) /* Domain 1 PWR enable Alternate Function mapping : available on STM32H7 Rev.B and above */
62#define GPIO_AF0_D2PWREN ((uint8_t)0x00) /* Domain 2 PWR enable Alternate Function mapping : available on STM32H7 Rev.B and above */
63#if defined(DUAL_CORE)
64#define GPIO_AF0_C2DSLEEP ((uint8_t)0x00) /* Cortex-M4 Deep Sleep Alternate Function mapping : available on STM32H7 Rev.B and above */
65#define GPIO_AF0_C2SLEEP ((uint8_t)0x00) /* Cortex-M4 Sleep Alternate Function mapping : available on STM32H7 Rev.B and above */
66#endif /* DUAL_CORE */
67#endif /* PWR_CPUCR_PDDS_D2 */
68
72#define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
73#define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
74#define GPIO_AF1_TIM16 ((uint8_t)0x01) /* TIM16 Alternate Function mapping */
75#define GPIO_AF1_TIM17 ((uint8_t)0x01) /* TIM17 Alternate Function mapping */
76#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /* LPTIM1 Alternate Function mapping */
77#if defined(HRTIM1)
78#define GPIO_AF1_HRTIM1 ((uint8_t)0x01) /* HRTIM1 Alternate Function mapping */
79#endif /* HRTIM1 */
80#if defined(SAI4)
81#define GPIO_AF1_SAI4 ((uint8_t)0x01) /* SAI4 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
82#endif /* SAI4 */
83#define GPIO_AF1_FMC ((uint8_t)0x01) /* FMC Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
84
85
89#define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
90#define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
91#define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
92#define GPIO_AF2_TIM12 ((uint8_t)0x02) /* TIM12 Alternate Function mapping */
93#define GPIO_AF2_SAI1 ((uint8_t)0x02) /* SAI1 Alternate Function mapping */
94#if defined(HRTIM1)
95#define GPIO_AF2_HRTIM1 ((uint8_t)0x02) /* HRTIM1 Alternate Function mapping */
96#endif /* HRTIM1 */
97#define GPIO_AF2_TIM15 ((uint8_t)0x02) /* TIM15 Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
98#if defined(FDCAN3)
99#define GPIO_AF2_FDCAN3 ((uint8_t)0x02) /* FDCAN3 Alternate Function mapping */
100#endif /*FDCAN3*/
101
105#define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
106#define GPIO_AF3_LPTIM2 ((uint8_t)0x03) /* LPTIM2 Alternate Function mapping */
107#define GPIO_AF3_DFSDM1 ((uint8_t)0x03) /* DFSDM Alternate Function mapping */
108#define GPIO_AF3_LPTIM3 ((uint8_t)0x03) /* LPTIM3 Alternate Function mapping */
109#define GPIO_AF3_LPTIM4 ((uint8_t)0x03) /* LPTIM4 Alternate Function mapping */
110#define GPIO_AF3_LPTIM5 ((uint8_t)0x03) /* LPTIM5 Alternate Function mapping */
111#define GPIO_AF3_LPUART ((uint8_t)0x03) /* LPUART Alternate Function mapping */
112#if defined(OCTOSPIM)
113#define GPIO_AF3_OCTOSPIM_P1 ((uint8_t)0x03) /* OCTOSPI Manager Port 1 Alternate Function mapping */
114#define GPIO_AF3_OCTOSPIM_P2 ((uint8_t)0x03) /* OCTOSPI Manager Port 2 Alternate Function mapping */
115#endif /* OCTOSPIM */
116#if defined(HRTIM1)
117#define GPIO_AF3_HRTIM1 ((uint8_t)0x03) /* HRTIM1 Alternate Function mapping */
118#endif /* HRTIM1 */
119#define GPIO_AF3_LTDC ((uint8_t)0x03) /* LTDC Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
120
124#define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
125#define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
126#define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
127#define GPIO_AF4_I2C4 ((uint8_t)0x04) /* I2C4 Alternate Function mapping */
128#if defined(I2C5)
129#define GPIO_AF4_I2C5 ((uint8_t)0x04) /* I2C5 Alternate Function mapping */
130#endif /* I2C5*/
131#define GPIO_AF4_TIM15 ((uint8_t)0x04) /* TIM15 Alternate Function mapping */
132#define GPIO_AF4_CEC ((uint8_t)0x04) /* CEC Alternate Function mapping */
133#define GPIO_AF4_LPTIM2 ((uint8_t)0x04) /* LPTIM2 Alternate Function mapping */
134#define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */
135#if defined(USART10)
136#define GPIO_AF4_USART10 ((uint8_t)0x04) /* USART10 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
137#endif /*USART10*/
138#define GPIO_AF4_DFSDM1 ((uint8_t)0x04) /* DFSDM Alternate Function mapping */
139#if defined(DFSDM2_BASE)
140#define GPIO_AF4_DFSDM2 ((uint8_t)0x04) /* DFSDM2 Alternate Function mapping */
141#endif /* DFSDM2_BASE */
142#define GPIO_AF4_DCMI ((uint8_t)0x04) /* DCMI Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
143#if defined(PSSI)
144#define GPIO_AF4_PSSI ((uint8_t)0x04) /* PSSI Alternate Function mapping */
145#endif /* PSSI */
146#if defined(OCTOSPIM)
147#define GPIO_AF4_OCTOSPIM_P1 ((uint8_t)0x04) /* OCTOSPI Manager Port 1 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
148#endif /* OCTOSPIM */
149
153#define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
154#define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
155#define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3 Alternate Function mapping */
156#define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */
157#define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */
158#define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */
159#define GPIO_AF5_CEC ((uint8_t)0x05) /* CEC Alternate Function mapping */
160#if defined(FDCAN3)
161#define GPIO_AF5_FDCAN3 ((uint8_t)0x05) /* FDCAN3 Alternate Function mapping */
162#endif /*FDCAN3*/
163
167#define GPIO_AF6_SPI2 ((uint8_t)0x06) /* SPI2 Alternate Function mapping */
168#define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3 Alternate Function mapping */
169#define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */
170#define GPIO_AF6_I2C4 ((uint8_t)0x06) /* I2C4 Alternate Function mapping */
171#if defined(I2C5)
172#define GPIO_AF6_I2C5 ((uint8_t)0x06) /* I2C5 Alternate Function mapping */
173#endif /* I2C5*/
174#define GPIO_AF6_DFSDM1 ((uint8_t)0x06) /* DFSDM Alternate Function mapping */
175#define GPIO_AF6_UART4 ((uint8_t)0x06) /* UART4 Alternate Function mapping */
176#if defined(DFSDM2_BASE)
177#define GPIO_AF6_DFSDM2 ((uint8_t)0x06) /* DFSDM2 Alternate Function mapping */
178#endif /* DFSDM2_BASE */
179#if defined(SAI3)
180#define GPIO_AF6_SAI3 ((uint8_t)0x06) /* SAI3 Alternate Function mapping */
181#endif /* SAI3 */
182#if defined(OCTOSPIM)
183#define GPIO_AF6_OCTOSPIM_P1 ((uint8_t)0x06) /* OCTOSPI Manager Port 1 Alternate Function mapping */
184#endif /* OCTOSPIM */
185
189#define GPIO_AF7_SPI2 ((uint8_t)0x07) /* SPI2 Alternate Function mapping */
190#define GPIO_AF7_SPI3 ((uint8_t)0x07) /* SPI3 Alternate Function mapping */
191#define GPIO_AF7_SPI6 ((uint8_t)0x07) /* SPI6 Alternate Function mapping */
192#define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
193#define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
194#define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
195#define GPIO_AF7_USART6 ((uint8_t)0x07) /* USART6 Alternate Function mapping */
196#define GPIO_AF7_UART7 ((uint8_t)0x07) /* UART7 Alternate Function mapping */
197#define GPIO_AF7_SDMMC1 ((uint8_t)0x07) /* SDMMC1 Alternate Function mapping */
198
202#define GPIO_AF8_SPI6 ((uint8_t)0x08) /* SPI6 Alternate Function mapping */
203#if defined(SAI2)
204#define GPIO_AF8_SAI2 ((uint8_t)0x08) /* SAI2 Alternate Function mapping */
205#endif /*SAI2*/
206#define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
207#define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
208#define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */
209#define GPIO_AF8_SPDIF ((uint8_t)0x08) /* SPDIF Alternate Function mapping */
210#define GPIO_AF8_LPUART ((uint8_t)0x08) /* LPUART Alternate Function mapping */
211#define GPIO_AF8_SDMMC1 ((uint8_t)0x08) /* SDMMC1 Alternate Function mapping */
212#if defined(SAI4)
213#define GPIO_AF8_SAI4 ((uint8_t)0x08) /* SAI4 Alternate Function mapping */
214#endif /* SAI4 */
215
219#define GPIO_AF9_FDCAN1 ((uint8_t)0x09) /* FDCAN1 Alternate Function mapping */
220#define GPIO_AF9_FDCAN2 ((uint8_t)0x09) /* FDCAN2 Alternate Function mapping */
221#define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
222#define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
223#define GPIO_AF9_SDMMC2 ((uint8_t)0x09) /* SDMMC2 Alternate Function mapping */
224#define GPIO_AF9_LTDC ((uint8_t)0x09) /* LTDC Alternate Function mapping */
225#define GPIO_AF9_SPDIF ((uint8_t)0x09) /* SPDIF Alternate Function mapping */
226#define GPIO_AF9_FMC ((uint8_t)0x09) /* FMC Alternate Function mapping */
227#if defined(QUADSPI)
228#define GPIO_AF9_QUADSPI ((uint8_t)0x09) /* QUADSPI Alternate Function mapping */
229#endif /* QUADSPI */
230#if defined(SAI4)
231#define GPIO_AF9_SAI4 ((uint8_t)0x09) /* SAI4 Alternate Function mapping */
232#endif /* SAI4 */
233#if defined(OCTOSPIM)
234#define GPIO_AF9_OCTOSPIM_P1 ((uint8_t)0x09) /* OCTOSPI Manager Port 1 Alternate Function mapping */
235#define GPIO_AF9_OCTOSPIM_P2 ((uint8_t)0x09) /* OCTOSPI Manager Port 2 Alternate Function mapping */
236#endif /* OCTOSPIM */
237
241#if defined(SAI2)
242#define GPIO_AF10_SAI2 ((uint8_t)0x0A) /* SAI2 Alternate Function mapping */
243#endif /*SAI2*/
244#define GPIO_AF10_SDMMC2 ((uint8_t)0x0A) /* SDMMC2 Alternate Function mapping */
245#if defined(USB2_OTG_FS)
246#define GPIO_AF10_OTG2_FS ((uint8_t)0x0A) /* OTG2_FS Alternate Function mapping */
247#endif /*USB2_OTG_FS*/
248#define GPIO_AF10_COMP1 ((uint8_t)0x0A) /* COMP1 Alternate Function mapping */
249#define GPIO_AF10_COMP2 ((uint8_t)0x0A) /* COMP2 Alternate Function mapping */
250#if defined(LTDC)
251#define GPIO_AF10_LTDC ((uint8_t)0x0A) /* LTDC Alternate Function mapping */
252#endif /*LTDC*/
253#define GPIO_AF10_CRS_SYNC ((uint8_t)0x0A) /* CRS Sync Alternate Function mapping : available on STM32H7 Rev.B and above */
254#if defined(QUADSPI)
255#define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /* QUADSPI Alternate Function mapping */
256#endif /* QUADSPI */
257#if defined(SAI4)
258#define GPIO_AF10_SAI4 ((uint8_t)0x0A) /* SAI4 Alternate Function mapping */
259#endif /* SAI4 */
260#if !defined(USB2_OTG_FS)
261#define GPIO_AF10_OTG1_FS ((uint8_t)0x0A) /* OTG1_FS Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
262#endif /* !USB2_OTG_FS */
263#define GPIO_AF10_OTG1_HS ((uint8_t)0x0A) /* OTG1_HS Alternate Function mapping */
264#if defined(OCTOSPIM)
265#define GPIO_AF10_OCTOSPIM_P1 ((uint8_t)0x0A) /* OCTOSPI Manager Port 1 Alternate Function mapping */
266#endif /* OCTOSPIM */
267#define GPIO_AF10_TIM8 ((uint8_t)0x0A) /* TIM8 Alternate Function mapping */
268#define GPIO_AF10_FMC ((uint8_t)0x0A) /* FMC Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
269
273#define GPIO_AF11_SWP ((uint8_t)0x0B) /* SWP Alternate Function mapping */
274#define GPIO_AF11_MDIOS ((uint8_t)0x0B) /* MDIOS Alternate Function mapping */
275#define GPIO_AF11_UART7 ((uint8_t)0x0B) /* UART7 Alternate Function mapping */
276#define GPIO_AF11_SDMMC2 ((uint8_t)0x0B) /* SDMMC2 Alternate Function mapping */
277#define GPIO_AF11_DFSDM1 ((uint8_t)0x0B) /* DFSDM1 Alternate Function mapping */
278#define GPIO_AF11_COMP1 ((uint8_t)0x0B) /* COMP1 Alternate Function mapping */
279#define GPIO_AF11_COMP2 ((uint8_t)0x0B) /* COMP2 Alternate Function mapping */
280#define GPIO_AF11_TIM1 ((uint8_t)0x0B) /* TIM1 Alternate Function mapping */
281#define GPIO_AF11_TIM8 ((uint8_t)0x0B) /* TIM8 Alternate Function mapping */
282#define GPIO_AF11_I2C4 ((uint8_t)0x0B) /* I2C4 Alternate Function mapping */
283#if defined(DFSDM2_BASE)
284#define GPIO_AF11_DFSDM2 ((uint8_t)0x0B) /* DFSDM2 Alternate Function mapping */
285#endif /* DFSDM2_BASE */
286#if defined(USART10)
287#define GPIO_AF11_USART10 ((uint8_t)0x0B) /* USART10 Alternate Function mapping */
288#endif /* USART10 */
289#if defined(UART9)
290#define GPIO_AF11_UART9 ((uint8_t)0x0B) /* UART9 Alternate Function mapping */
291#endif /* UART9 */
292#if defined(ETH)
293#define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETH Alternate Function mapping */
294#endif /* ETH */
295#if defined(LTDC)
296#define GPIO_AF11_LTDC ((uint8_t)0x0B) /* LTDC Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
297#endif /*LTDC*/
298#if defined(OCTOSPIM)
299#define GPIO_AF11_OCTOSPIM_P1 ((uint8_t)0x0B) /* OCTOSPI Manager Port 1 Alternate Function mapping */
300#endif /* OCTOSPIM */
301
305#define GPIO_AF12_FMC ((uint8_t)0x0C) /* FMC Alternate Function mapping */
306#define GPIO_AF12_SDMMC1 ((uint8_t)0x0C) /* SDMMC1 Alternate Function mapping */
307#define GPIO_AF12_MDIOS ((uint8_t)0x0C) /* MDIOS Alternate Function mapping */
308#define GPIO_AF12_COMP1 ((uint8_t)0x0C) /* COMP1 Alternate Function mapping */
309#define GPIO_AF12_COMP2 ((uint8_t)0x0C) /* COMP2 Alternate Function mapping */
310#define GPIO_AF12_TIM1 ((uint8_t)0x0C) /* TIM1 Alternate Function mapping */
311#define GPIO_AF12_TIM8 ((uint8_t)0x0C) /* TIM8 Alternate Function mapping */
312#if defined(LTDC)
313#define GPIO_AF12_LTDC ((uint8_t)0x0C) /* LTDC Alternate Function mapping */
314#endif /*LTDC*/
315#if defined(USB2_OTG_FS)
316#define GPIO_AF12_OTG1_FS ((uint8_t)0x0C) /* OTG1_FS Alternate Function mapping */
317#endif /* USB2_OTG_FS */
318#if defined(OCTOSPIM)
319#define GPIO_AF12_OCTOSPIM_P1 ((uint8_t)0x0C) /* OCTOSPI Manager Port 1 Alternate Function mapping */
320#endif /* OCTOSPIM */
321
325#define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */
326#define GPIO_AF13_COMP1 ((uint8_t)0x0D) /* COMP1 Alternate Function mapping */
327#define GPIO_AF13_COMP2 ((uint8_t)0x0D) /* COMP2 Alternate Function mapping */
328#if defined(LTDC)
329#define GPIO_AF13_LTDC ((uint8_t)0x0D) /* LTDC Alternate Function mapping */
330#endif /*LTDC*/
331#if defined(DSI)
332#define GPIO_AF13_DSI ((uint8_t)0x0D) /* DSI Alternate Function mapping */
333#endif /* DSI */
334#if defined(PSSI)
335#define GPIO_AF13_PSSI ((uint8_t)0x0D) /* PSSI Alternate Function mapping */
336#endif /* PSSI */
337#define GPIO_AF13_TIM1 ((uint8_t)0x0D) /* TIM1 Alternate Function mapping */
338#if defined(TIM23)
339#define GPIO_AF13_TIM23 ((uint8_t)0x0D) /* TIM23 Alternate Function mapping */
340#endif /*TIM23*/
341
345#define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LTDC Alternate Function mapping */
346#define GPIO_AF14_UART5 ((uint8_t)0x0E) /* UART5 Alternate Function mapping */
347#if defined(TIM24)
348#define GPIO_AF14_TIM24 ((uint8_t)0x0E) /* TIM24 Alternate Function mapping */
349#endif /*TIM24*/
350
354#define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
355
356#define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0F)
357
358
359
368/* Exported macro ------------------------------------------------------------*/
376/* Exported functions --------------------------------------------------------*/
383/* Private types -------------------------------------------------------------*/
384/* Private variables ---------------------------------------------------------*/
385/* Private constants ---------------------------------------------------------*/
393/* Defines the available pins per GPIOs */
394#define GPIOA_PIN_AVAILABLE GPIO_PIN_All
395#define GPIOB_PIN_AVAILABLE GPIO_PIN_All
396#define GPIOC_PIN_AVAILABLE GPIO_PIN_All
397#define GPIOD_PIN_AVAILABLE GPIO_PIN_All
398#define GPIOE_PIN_AVAILABLE GPIO_PIN_All
399#define GPIOF_PIN_AVAILABLE GPIO_PIN_All
400#define GPIOG_PIN_AVAILABLE GPIO_PIN_All
401#if defined(GPIOI)
402#define GPIOI_PIN_AVAILABLE GPIO_PIN_All
403#endif /*GPIOI*/
404#if defined(GPIOI)
405#define GPIOJ_PIN_AVAILABLE GPIO_PIN_All
406#else
407#define GPIOJ_PIN_AVAILABLE (GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 )
408#endif /* GPIOI */
409#define GPIOH_PIN_AVAILABLE GPIO_PIN_All
410#if defined(GPIOI)
411#define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | \
412 GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
413#else
414#define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 )
415#endif /* GPIOI */
416
421/* Private macros ------------------------------------------------------------*/
428#if defined(GPIOI)
429#define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0UL :\
430 ((__GPIOx__) == (GPIOB))? 1UL :\
431 ((__GPIOx__) == (GPIOC))? 2UL :\
432 ((__GPIOx__) == (GPIOD))? 3UL :\
433 ((__GPIOx__) == (GPIOE))? 4UL :\
434 ((__GPIOx__) == (GPIOF))? 5UL :\
435 ((__GPIOx__) == (GPIOG))? 6UL :\
436 ((__GPIOx__) == (GPIOH))? 7UL :\
437 ((__GPIOx__) == (GPIOI))? 8UL :\
438 ((__GPIOx__) == (GPIOJ))? 9UL : 10UL)
439#else
440#define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0UL :\
441 ((__GPIOx__) == (GPIOB))? 1UL :\
442 ((__GPIOx__) == (GPIOC))? 2UL :\
443 ((__GPIOx__) == (GPIOD))? 3UL :\
444 ((__GPIOx__) == (GPIOE))? 4UL :\
445 ((__GPIOx__) == (GPIOF))? 5UL :\
446 ((__GPIOx__) == (GPIOG))? 6UL :\
447 ((__GPIOx__) == (GPIOH))? 7UL :\
448 ((__GPIOx__) == (GPIOJ))? 9UL : 10UL)
449#endif /* GPIOI */
450
466/* Private functions ---------------------------------------------------------*/
483#ifdef __cplusplus
484}
485#endif
486
487#endif /* STM32H7xx_HAL_GPIO_EX_H */
488
489/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
This file contains HAL common defines, enumeration, macros and structures definitions.