mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
110:165afa46840b
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 77:869cf507173a 1 /**
emilmont 77:869cf507173a 2 ******************************************************************************
emilmont 77:869cf507173a 3 * @file stm32f4xx_hal_gpio_ex.h
emilmont 77:869cf507173a 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.5.0
Kojto 122:f9eeca106725 6 * @date 06-May-2016
emilmont 77:869cf507173a 7 * @brief Header file of GPIO HAL Extension module.
emilmont 77:869cf507173a 8 ******************************************************************************
emilmont 77:869cf507173a 9 * @attention
emilmont 77:869cf507173a 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
emilmont 77:869cf507173a 12 *
emilmont 77:869cf507173a 13 * Redistribution and use in source and binary forms, with or without modification,
emilmont 77:869cf507173a 14 * are permitted provided that the following conditions are met:
emilmont 77:869cf507173a 15 * 1. Redistributions of source code must retain the above copyright notice,
emilmont 77:869cf507173a 16 * this list of conditions and the following disclaimer.
emilmont 77:869cf507173a 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
emilmont 77:869cf507173a 18 * this list of conditions and the following disclaimer in the documentation
emilmont 77:869cf507173a 19 * and/or other materials provided with the distribution.
emilmont 77:869cf507173a 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
emilmont 77:869cf507173a 21 * may be used to endorse or promote products derived from this software
emilmont 77:869cf507173a 22 * without specific prior written permission.
emilmont 77:869cf507173a 23 *
emilmont 77:869cf507173a 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
emilmont 77:869cf507173a 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
emilmont 77:869cf507173a 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
emilmont 77:869cf507173a 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
emilmont 77:869cf507173a 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
emilmont 77:869cf507173a 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
emilmont 77:869cf507173a 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
emilmont 77:869cf507173a 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
emilmont 77:869cf507173a 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
emilmont 77:869cf507173a 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
emilmont 77:869cf507173a 34 *
emilmont 77:869cf507173a 35 ******************************************************************************
emilmont 77:869cf507173a 36 */
emilmont 77:869cf507173a 37
emilmont 77:869cf507173a 38 /* Define to prevent recursive inclusion -------------------------------------*/
emilmont 77:869cf507173a 39 #ifndef __STM32F4xx_HAL_GPIO_EX_H
emilmont 77:869cf507173a 40 #define __STM32F4xx_HAL_GPIO_EX_H
emilmont 77:869cf507173a 41
emilmont 77:869cf507173a 42 #ifdef __cplusplus
emilmont 77:869cf507173a 43 extern "C" {
emilmont 77:869cf507173a 44 #endif
emilmont 77:869cf507173a 45
emilmont 77:869cf507173a 46 /* Includes ------------------------------------------------------------------*/
emilmont 77:869cf507173a 47 #include "stm32f4xx_hal_def.h"
emilmont 77:869cf507173a 48
emilmont 77:869cf507173a 49 /** @addtogroup STM32F4xx_HAL_Driver
emilmont 77:869cf507173a 50 * @{
emilmont 77:869cf507173a 51 */
emilmont 77:869cf507173a 52
Kojto 99:dbbf35b96557 53 /** @defgroup GPIOEx GPIOEx
emilmont 77:869cf507173a 54 * @{
emilmont 77:869cf507173a 55 */
emilmont 77:869cf507173a 56
emilmont 77:869cf507173a 57 /* Exported types ------------------------------------------------------------*/
emilmont 77:869cf507173a 58 /* Exported constants --------------------------------------------------------*/
Kojto 99:dbbf35b96557 59 /** @defgroup GPIOEx_Exported_Constants GPIO Exported Constants
emilmont 77:869cf507173a 60 * @{
emilmont 77:869cf507173a 61 */
emilmont 77:869cf507173a 62
Kojto 99:dbbf35b96557 63 /** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection
Kojto 99:dbbf35b96557 64 * @{
Kojto 110:165afa46840b 65 */
Kojto 110:165afa46840b 66
Kojto 110:165afa46840b 67 /*------------------------------------------ STM32F429xx/STM32F439xx ---------*/
Kojto 110:165afa46840b 68 #if defined(STM32F429xx) || defined(STM32F439xx)
emilmont 77:869cf507173a 69 /**
emilmont 77:869cf507173a 70 * @brief AF 0 selection
emilmont 77:869cf507173a 71 */
Kojto 122:f9eeca106725 72 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 73 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 74 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 75 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 76 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
emilmont 77:869cf507173a 77
emilmont 77:869cf507173a 78 /**
emilmont 77:869cf507173a 79 * @brief AF 1 selection
emilmont 77:869cf507173a 80 */
Kojto 122:f9eeca106725 81 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 82 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
emilmont 77:869cf507173a 83
emilmont 77:869cf507173a 84 /**
emilmont 77:869cf507173a 85 * @brief AF 2 selection
emilmont 77:869cf507173a 86 */
Kojto 122:f9eeca106725 87 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 88 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 89 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
emilmont 77:869cf507173a 90
emilmont 77:869cf507173a 91 /**
emilmont 77:869cf507173a 92 * @brief AF 3 selection
emilmont 77:869cf507173a 93 */
Kojto 122:f9eeca106725 94 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 95 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 96 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 97 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
emilmont 77:869cf507173a 98
emilmont 77:869cf507173a 99 /**
emilmont 77:869cf507173a 100 * @brief AF 4 selection
emilmont 77:869cf507173a 101 */
Kojto 122:f9eeca106725 102 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 103 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 104 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
emilmont 77:869cf507173a 105
emilmont 77:869cf507173a 106 /**
emilmont 77:869cf507173a 107 * @brief AF 5 selection
emilmont 77:869cf507173a 108 */
Kojto 122:f9eeca106725 109 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 110 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 111 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 112 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 113 #define GPIO_AF5_SPI5 ((uint8_t)0x05U) /* SPI5 Alternate Function mapping */
Kojto 122:f9eeca106725 114 #define GPIO_AF5_SPI6 ((uint8_t)0x05U) /* SPI6 Alternate Function mapping */
Kojto 122:f9eeca106725 115 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 116
emilmont 77:869cf507173a 117 /**
emilmont 77:869cf507173a 118 * @brief AF 6 selection
emilmont 77:869cf507173a 119 */
Kojto 122:f9eeca106725 120 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 121 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 122 #define GPIO_AF6_SAI1 ((uint8_t)0x06U) /* SAI1 Alternate Function mapping */
emilmont 77:869cf507173a 123
emilmont 77:869cf507173a 124 /**
emilmont 77:869cf507173a 125 * @brief AF 7 selection
emilmont 77:869cf507173a 126 */
Kojto 122:f9eeca106725 127 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 128 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 129 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 130 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 131
emilmont 77:869cf507173a 132 /**
emilmont 77:869cf507173a 133 * @brief AF 8 selection
emilmont 77:869cf507173a 134 */
Kojto 122:f9eeca106725 135 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 136 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 137 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 138 #define GPIO_AF8_UART7 ((uint8_t)0x08U) /* UART7 Alternate Function mapping */
Kojto 122:f9eeca106725 139 #define GPIO_AF8_UART8 ((uint8_t)0x08U) /* UART8 Alternate Function mapping */
emilmont 77:869cf507173a 140
emilmont 77:869cf507173a 141 /**
emilmont 77:869cf507173a 142 * @brief AF 9 selection
emilmont 77:869cf507173a 143 */
Kojto 122:f9eeca106725 144 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 145 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 146 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 147 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 148 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 149 #define GPIO_AF9_LTDC ((uint8_t)0x09U) /* LCD-TFT Alternate Function mapping */
emilmont 77:869cf507173a 150
emilmont 77:869cf507173a 151 /**
emilmont 77:869cf507173a 152 * @brief AF 10 selection
emilmont 77:869cf507173a 153 */
Kojto 122:f9eeca106725 154 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 155 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
emilmont 77:869cf507173a 156
emilmont 77:869cf507173a 157 /**
emilmont 77:869cf507173a 158 * @brief AF 11 selection
emilmont 77:869cf507173a 159 */
Kojto 122:f9eeca106725 160 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
emilmont 77:869cf507173a 161
emilmont 77:869cf507173a 162 /**
emilmont 77:869cf507173a 163 * @brief AF 12 selection
emilmont 77:869cf507173a 164 */
Kojto 122:f9eeca106725 165 #define GPIO_AF12_FMC ((uint8_t)0x0CU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 166 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 167 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
emilmont 77:869cf507173a 168
emilmont 77:869cf507173a 169 /**
emilmont 77:869cf507173a 170 * @brief AF 13 selection
emilmont 77:869cf507173a 171 */
Kojto 122:f9eeca106725 172 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
emilmont 77:869cf507173a 173
emilmont 77:869cf507173a 174 /**
emilmont 77:869cf507173a 175 * @brief AF 14 selection
emilmont 77:869cf507173a 176 */
Kojto 122:f9eeca106725 177 #define GPIO_AF14_LTDC ((uint8_t)0x0EU) /* LCD-TFT Alternate Function mapping */
emilmont 77:869cf507173a 178
emilmont 77:869cf507173a 179 /**
emilmont 77:869cf507173a 180 * @brief AF 15 selection
emilmont 77:869cf507173a 181 */
Kojto 122:f9eeca106725 182 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
emilmont 77:869cf507173a 183 #endif /* STM32F429xx || STM32F439xx */
Kojto 110:165afa46840b 184 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 185
Kojto 110:165afa46840b 186 /*---------------------------------- STM32F427xx/STM32F437xx------------------*/
Kojto 110:165afa46840b 187 #if defined(STM32F427xx) || defined(STM32F437xx)
emilmont 77:869cf507173a 188 /**
emilmont 77:869cf507173a 189 * @brief AF 0 selection
emilmont 77:869cf507173a 190 */
Kojto 122:f9eeca106725 191 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 192 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 193 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 194 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 195 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
emilmont 77:869cf507173a 196
emilmont 77:869cf507173a 197 /**
emilmont 77:869cf507173a 198 * @brief AF 1 selection
emilmont 77:869cf507173a 199 */
Kojto 122:f9eeca106725 200 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 201 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
emilmont 77:869cf507173a 202
emilmont 77:869cf507173a 203 /**
emilmont 77:869cf507173a 204 * @brief AF 2 selection
emilmont 77:869cf507173a 205 */
Kojto 122:f9eeca106725 206 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 207 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 208 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
emilmont 77:869cf507173a 209
emilmont 77:869cf507173a 210 /**
emilmont 77:869cf507173a 211 * @brief AF 3 selection
emilmont 77:869cf507173a 212 */
Kojto 122:f9eeca106725 213 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 214 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 215 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 216 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
emilmont 77:869cf507173a 217
emilmont 77:869cf507173a 218 /**
emilmont 77:869cf507173a 219 * @brief AF 4 selection
emilmont 77:869cf507173a 220 */
Kojto 122:f9eeca106725 221 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 222 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 223 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
emilmont 77:869cf507173a 224
emilmont 77:869cf507173a 225 /**
emilmont 77:869cf507173a 226 * @brief AF 5 selection
emilmont 77:869cf507173a 227 */
Kojto 122:f9eeca106725 228 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 229 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 230 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 231 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 232 #define GPIO_AF5_SPI5 ((uint8_t)0x05U) /* SPI5 Alternate Function mapping */
Kojto 122:f9eeca106725 233 #define GPIO_AF5_SPI6 ((uint8_t)0x05U) /* SPI6 Alternate Function mapping */
Kojto 99:dbbf35b96557 234 /** @brief GPIO_Legacy
Kojto 99:dbbf35b96557 235 */
Kojto 99:dbbf35b96557 236 #define GPIO_AF5_I2S3ext GPIO_AF5_SPI3 /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 237
emilmont 77:869cf507173a 238 /**
emilmont 77:869cf507173a 239 * @brief AF 6 selection
emilmont 77:869cf507173a 240 */
Kojto 122:f9eeca106725 241 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 242 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 243 #define GPIO_AF6_SAI1 ((uint8_t)0x06U) /* SAI1 Alternate Function mapping */
emilmont 77:869cf507173a 244
emilmont 77:869cf507173a 245 /**
emilmont 77:869cf507173a 246 * @brief AF 7 selection
emilmont 77:869cf507173a 247 */
Kojto 122:f9eeca106725 248 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 249 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 250 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 251 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 252
emilmont 77:869cf507173a 253 /**
emilmont 77:869cf507173a 254 * @brief AF 8 selection
emilmont 77:869cf507173a 255 */
Kojto 122:f9eeca106725 256 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 257 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 258 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 259 #define GPIO_AF8_UART7 ((uint8_t)0x08U) /* UART7 Alternate Function mapping */
Kojto 122:f9eeca106725 260 #define GPIO_AF8_UART8 ((uint8_t)0x08U) /* UART8 Alternate Function mapping */
emilmont 77:869cf507173a 261
emilmont 77:869cf507173a 262 /**
emilmont 77:869cf507173a 263 * @brief AF 9 selection
emilmont 77:869cf507173a 264 */
Kojto 122:f9eeca106725 265 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 266 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 267 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 268 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 269 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
emilmont 77:869cf507173a 270
emilmont 77:869cf507173a 271 /**
emilmont 77:869cf507173a 272 * @brief AF 10 selection
emilmont 77:869cf507173a 273 */
Kojto 122:f9eeca106725 274 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 275 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
emilmont 77:869cf507173a 276
emilmont 77:869cf507173a 277 /**
emilmont 77:869cf507173a 278 * @brief AF 11 selection
emilmont 77:869cf507173a 279 */
Kojto 122:f9eeca106725 280 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
emilmont 77:869cf507173a 281
emilmont 77:869cf507173a 282 /**
emilmont 77:869cf507173a 283 * @brief AF 12 selection
emilmont 77:869cf507173a 284 */
Kojto 122:f9eeca106725 285 #define GPIO_AF12_FMC ((uint8_t)0x0CU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 286 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 287 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
emilmont 77:869cf507173a 288
emilmont 77:869cf507173a 289 /**
emilmont 77:869cf507173a 290 * @brief AF 13 selection
emilmont 77:869cf507173a 291 */
Kojto 122:f9eeca106725 292 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
emilmont 77:869cf507173a 293
emilmont 77:869cf507173a 294 /**
emilmont 77:869cf507173a 295 * @brief AF 15 selection
emilmont 77:869cf507173a 296 */
Kojto 122:f9eeca106725 297 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
emilmont 77:869cf507173a 298 #endif /* STM32F427xx || STM32F437xx */
Kojto 110:165afa46840b 299 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 300
Kojto 110:165afa46840b 301 /*---------------------------------- STM32F407xx/STM32F417xx------------------*/
Kojto 110:165afa46840b 302 #if defined(STM32F407xx) || defined(STM32F417xx)
emilmont 77:869cf507173a 303 /**
emilmont 77:869cf507173a 304 * @brief AF 0 selection
emilmont 77:869cf507173a 305 */
Kojto 122:f9eeca106725 306 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 307 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 308 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 309 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 310 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
emilmont 77:869cf507173a 311
emilmont 77:869cf507173a 312 /**
emilmont 77:869cf507173a 313 * @brief AF 1 selection
emilmont 77:869cf507173a 314 */
Kojto 122:f9eeca106725 315 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 316 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
emilmont 77:869cf507173a 317
emilmont 77:869cf507173a 318 /**
emilmont 77:869cf507173a 319 * @brief AF 2 selection
emilmont 77:869cf507173a 320 */
Kojto 122:f9eeca106725 321 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 322 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 323 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
emilmont 77:869cf507173a 324
emilmont 77:869cf507173a 325 /**
emilmont 77:869cf507173a 326 * @brief AF 3 selection
emilmont 77:869cf507173a 327 */
Kojto 122:f9eeca106725 328 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 329 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 330 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 331 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
emilmont 77:869cf507173a 332
emilmont 77:869cf507173a 333 /**
emilmont 77:869cf507173a 334 * @brief AF 4 selection
emilmont 77:869cf507173a 335 */
Kojto 122:f9eeca106725 336 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 337 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 338 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
emilmont 77:869cf507173a 339
emilmont 77:869cf507173a 340 /**
emilmont 77:869cf507173a 341 * @brief AF 5 selection
emilmont 77:869cf507173a 342 */
Kojto 122:f9eeca106725 343 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 344 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 345 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 346
emilmont 77:869cf507173a 347 /**
emilmont 77:869cf507173a 348 * @brief AF 6 selection
emilmont 77:869cf507173a 349 */
Kojto 122:f9eeca106725 350 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 351 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 352
emilmont 77:869cf507173a 353 /**
emilmont 77:869cf507173a 354 * @brief AF 7 selection
emilmont 77:869cf507173a 355 */
Kojto 122:f9eeca106725 356 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 357 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 358 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 359 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 360
emilmont 77:869cf507173a 361 /**
emilmont 77:869cf507173a 362 * @brief AF 8 selection
emilmont 77:869cf507173a 363 */
Kojto 122:f9eeca106725 364 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 365 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 366 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
emilmont 77:869cf507173a 367
emilmont 77:869cf507173a 368 /**
emilmont 77:869cf507173a 369 * @brief AF 9 selection
emilmont 77:869cf507173a 370 */
Kojto 122:f9eeca106725 371 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 372 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 373 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 374 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 375 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
emilmont 77:869cf507173a 376
emilmont 77:869cf507173a 377 /**
emilmont 77:869cf507173a 378 * @brief AF 10 selection
emilmont 77:869cf507173a 379 */
Kojto 122:f9eeca106725 380 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 381 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
emilmont 77:869cf507173a 382
emilmont 77:869cf507173a 383 /**
emilmont 77:869cf507173a 384 * @brief AF 11 selection
emilmont 77:869cf507173a 385 */
Kojto 122:f9eeca106725 386 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
emilmont 77:869cf507173a 387
emilmont 77:869cf507173a 388 /**
emilmont 77:869cf507173a 389 * @brief AF 12 selection
emilmont 77:869cf507173a 390 */
Kojto 122:f9eeca106725 391 #define GPIO_AF12_FSMC ((uint8_t)0x0CU) /* FSMC Alternate Function mapping */
Kojto 122:f9eeca106725 392 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 393 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
emilmont 77:869cf507173a 394
emilmont 77:869cf507173a 395 /**
emilmont 77:869cf507173a 396 * @brief AF 13 selection
emilmont 77:869cf507173a 397 */
Kojto 122:f9eeca106725 398 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
emilmont 77:869cf507173a 399
emilmont 77:869cf507173a 400 /**
emilmont 77:869cf507173a 401 * @brief AF 15 selection
emilmont 77:869cf507173a 402 */
Kojto 122:f9eeca106725 403 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
emilmont 77:869cf507173a 404 #endif /* STM32F407xx || STM32F417xx */
Kojto 110:165afa46840b 405 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 406
Kojto 110:165afa46840b 407 /*---------------------------------- STM32F405xx/STM32F415xx------------------*/
Kojto 110:165afa46840b 408 #if defined(STM32F405xx) || defined(STM32F415xx)
emilmont 77:869cf507173a 409 /**
emilmont 77:869cf507173a 410 * @brief AF 0 selection
emilmont 77:869cf507173a 411 */
Kojto 122:f9eeca106725 412 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 413 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 414 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 415 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 416 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
emilmont 77:869cf507173a 417
emilmont 77:869cf507173a 418 /**
emilmont 77:869cf507173a 419 * @brief AF 1 selection
emilmont 77:869cf507173a 420 */
Kojto 122:f9eeca106725 421 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 422 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
emilmont 77:869cf507173a 423
emilmont 77:869cf507173a 424 /**
emilmont 77:869cf507173a 425 * @brief AF 2 selection
emilmont 77:869cf507173a 426 */
Kojto 122:f9eeca106725 427 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 428 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 429 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
emilmont 77:869cf507173a 430
emilmont 77:869cf507173a 431 /**
emilmont 77:869cf507173a 432 * @brief AF 3 selection
emilmont 77:869cf507173a 433 */
Kojto 122:f9eeca106725 434 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 435 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 436 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 437 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
emilmont 77:869cf507173a 438
emilmont 77:869cf507173a 439 /**
emilmont 77:869cf507173a 440 * @brief AF 4 selection
emilmont 77:869cf507173a 441 */
Kojto 122:f9eeca106725 442 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 443 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 444 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
emilmont 77:869cf507173a 445
emilmont 77:869cf507173a 446 /**
emilmont 77:869cf507173a 447 * @brief AF 5 selection
emilmont 77:869cf507173a 448 */
Kojto 122:f9eeca106725 449 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 450 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 451 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 452
emilmont 77:869cf507173a 453 /**
emilmont 77:869cf507173a 454 * @brief AF 6 selection
emilmont 77:869cf507173a 455 */
Kojto 122:f9eeca106725 456 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 457 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 458
emilmont 77:869cf507173a 459 /**
emilmont 77:869cf507173a 460 * @brief AF 7 selection
emilmont 77:869cf507173a 461 */
Kojto 122:f9eeca106725 462 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 463 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 464 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 465 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 466
emilmont 77:869cf507173a 467 /**
emilmont 77:869cf507173a 468 * @brief AF 8 selection
emilmont 77:869cf507173a 469 */
Kojto 122:f9eeca106725 470 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 471 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 472 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
emilmont 77:869cf507173a 473
emilmont 77:869cf507173a 474 /**
emilmont 77:869cf507173a 475 * @brief AF 9 selection
emilmont 77:869cf507173a 476 */
Kojto 122:f9eeca106725 477 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 478 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 479 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 480 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 481 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
emilmont 77:869cf507173a 482
emilmont 77:869cf507173a 483 /**
emilmont 77:869cf507173a 484 * @brief AF 10 selection
emilmont 77:869cf507173a 485 */
Kojto 122:f9eeca106725 486 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 487 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
emilmont 77:869cf507173a 488
emilmont 77:869cf507173a 489 /**
emilmont 77:869cf507173a 490 * @brief AF 12 selection
emilmont 77:869cf507173a 491 */
Kojto 122:f9eeca106725 492 #define GPIO_AF12_FSMC ((uint8_t)0x0CU) /* FSMC Alternate Function mapping */
Kojto 122:f9eeca106725 493 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 494 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
emilmont 77:869cf507173a 495
emilmont 77:869cf507173a 496 /**
emilmont 77:869cf507173a 497 * @brief AF 15 selection
emilmont 77:869cf507173a 498 */
Kojto 122:f9eeca106725 499 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
emilmont 77:869cf507173a 500 #endif /* STM32F405xx || STM32F415xx */
emilmont 77:869cf507173a 501
Kojto 110:165afa46840b 502 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 503
Kojto 110:165afa46840b 504 /*---------------------------------------- STM32F401xx------------------------*/
emilmont 77:869cf507173a 505 #if defined(STM32F401xC) || defined(STM32F401xE)
emilmont 77:869cf507173a 506 /**
emilmont 77:869cf507173a 507 * @brief AF 0 selection
emilmont 77:869cf507173a 508 */
Kojto 122:f9eeca106725 509 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 510 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 511 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 512 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 513 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
emilmont 77:869cf507173a 514
emilmont 77:869cf507173a 515 /**
emilmont 77:869cf507173a 516 * @brief AF 1 selection
emilmont 77:869cf507173a 517 */
Kojto 122:f9eeca106725 518 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 519 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
emilmont 77:869cf507173a 520
emilmont 77:869cf507173a 521 /**
emilmont 77:869cf507173a 522 * @brief AF 2 selection
emilmont 77:869cf507173a 523 */
Kojto 122:f9eeca106725 524 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 525 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 526 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
emilmont 77:869cf507173a 527
emilmont 77:869cf507173a 528 /**
emilmont 77:869cf507173a 529 * @brief AF 3 selection
emilmont 77:869cf507173a 530 */
Kojto 122:f9eeca106725 531 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 532 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 533 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
emilmont 77:869cf507173a 534
emilmont 77:869cf507173a 535 /**
emilmont 77:869cf507173a 536 * @brief AF 4 selection
emilmont 77:869cf507173a 537 */
Kojto 122:f9eeca106725 538 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 539 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 540 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
emilmont 77:869cf507173a 541
emilmont 77:869cf507173a 542 /**
emilmont 77:869cf507173a 543 * @brief AF 5 selection
emilmont 77:869cf507173a 544 */
Kojto 122:f9eeca106725 545 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 546 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 547 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 548 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 549
emilmont 77:869cf507173a 550 /**
emilmont 77:869cf507173a 551 * @brief AF 6 selection
emilmont 77:869cf507173a 552 */
Kojto 122:f9eeca106725 553 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 554 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 555
emilmont 77:869cf507173a 556 /**
emilmont 77:869cf507173a 557 * @brief AF 7 selection
emilmont 77:869cf507173a 558 */
Kojto 122:f9eeca106725 559 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 560 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 561 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
emilmont 77:869cf507173a 562
emilmont 77:869cf507173a 563 /**
emilmont 77:869cf507173a 564 * @brief AF 8 selection
emilmont 77:869cf507173a 565 */
Kojto 122:f9eeca106725 566 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
emilmont 77:869cf507173a 567
emilmont 77:869cf507173a 568 /**
emilmont 77:869cf507173a 569 * @brief AF 9 selection
emilmont 77:869cf507173a 570 */
Kojto 122:f9eeca106725 571 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 572 #define GPIO_AF9_I2C2 ((uint8_t)0x09U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 573 #define GPIO_AF9_I2C3 ((uint8_t)0x09U) /* I2C3 Alternate Function mapping */
bogdanm 81:7d30d6019079 574
emilmont 77:869cf507173a 575
emilmont 77:869cf507173a 576 /**
emilmont 77:869cf507173a 577 * @brief AF 10 selection
emilmont 77:869cf507173a 578 */
Kojto 122:f9eeca106725 579 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
emilmont 77:869cf507173a 580
emilmont 77:869cf507173a 581 /**
emilmont 77:869cf507173a 582 * @brief AF 12 selection
emilmont 77:869cf507173a 583 */
Kojto 122:f9eeca106725 584 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
emilmont 77:869cf507173a 585
emilmont 77:869cf507173a 586 /**
emilmont 77:869cf507173a 587 * @brief AF 15 selection
emilmont 77:869cf507173a 588 */
Kojto 122:f9eeca106725 589 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
emilmont 77:869cf507173a 590 #endif /* STM32F401xC || STM32F401xE */
Kojto 110:165afa46840b 591 /*----------------------------------------------------------------------------*/
Kojto 122:f9eeca106725 592
Kojto 122:f9eeca106725 593 /*--------------- STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx-------------*/
Kojto 122:f9eeca106725 594 #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
Kojto 122:f9eeca106725 595 /**
Kojto 122:f9eeca106725 596 * @brief AF 0 selection
Kojto 122:f9eeca106725 597 */
Kojto 122:f9eeca106725 598 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 599 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 600 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 601 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 602 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 122:f9eeca106725 603
Kojto 122:f9eeca106725 604 /**
Kojto 122:f9eeca106725 605 * @brief AF 1 selection
Kojto 122:f9eeca106725 606 */
Kojto 122:f9eeca106725 607 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 608 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
Kojto 122:f9eeca106725 609
Kojto 122:f9eeca106725 610 /**
Kojto 122:f9eeca106725 611 * @brief AF 2 selection
Kojto 122:f9eeca106725 612 */
Kojto 122:f9eeca106725 613 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 614 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 615 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 122:f9eeca106725 616
Kojto 122:f9eeca106725 617 /**
Kojto 122:f9eeca106725 618 * @brief AF 3 selection
Kojto 122:f9eeca106725 619 */
Kojto 122:f9eeca106725 620 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 621 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 622 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 623 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 122:f9eeca106725 624
Kojto 122:f9eeca106725 625 /**
Kojto 122:f9eeca106725 626 * @brief AF 4 selection
Kojto 122:f9eeca106725 627 */
Kojto 122:f9eeca106725 628 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 629 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 630 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
Kojto 122:f9eeca106725 631 #define GPIO_AF4_FMPI2C1 ((uint8_t)0x04U) /* FMPI2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 632
Kojto 122:f9eeca106725 633 /**
Kojto 122:f9eeca106725 634 * @brief AF 5 selection
Kojto 122:f9eeca106725 635 */
Kojto 122:f9eeca106725 636 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1/I2S1 Alternate Function mapping */
Kojto 122:f9eeca106725 637 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 638 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 639 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4/I2S4 Alternate Function mapping */
Kojto 122:f9eeca106725 640 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 641
Kojto 122:f9eeca106725 642 /**
Kojto 122:f9eeca106725 643 * @brief AF 6 selection
Kojto 122:f9eeca106725 644 */
Kojto 122:f9eeca106725 645 #define GPIO_AF6_SPI2 ((uint8_t)0x06U) /* I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 646 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 647 #define GPIO_AF6_SPI4 ((uint8_t)0x06U) /* SPI4/I2S4 Alternate Function mapping */
Kojto 122:f9eeca106725 648 #define GPIO_AF6_SPI5 ((uint8_t)0x06U) /* SPI5/I2S5 Alternate Function mapping */
Kojto 122:f9eeca106725 649 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 650 #define GPIO_AF6_DFSDM1 ((uint8_t)0x06U) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 651 /**
Kojto 122:f9eeca106725 652 * @brief AF 7 selection
Kojto 122:f9eeca106725 653 */
Kojto 122:f9eeca106725 654 #define GPIO_AF7_SPI3 ((uint8_t)0x07U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 655 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 656 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 657 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 658 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 659
Kojto 122:f9eeca106725 660 /**
Kojto 122:f9eeca106725 661 * @brief AF 8 selection
Kojto 122:f9eeca106725 662 */
Kojto 122:f9eeca106725 663 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 664 #define GPIO_AF8_USART3 ((uint8_t)0x08U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 665 #define GPIO_AF8_DFSDM1 ((uint8_t)0x08U) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 666 #define GPIO_AF8_CAN1 ((uint8_t)0x08U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 667
Kojto 122:f9eeca106725 668 /**
Kojto 122:f9eeca106725 669 * @brief AF 9 selection
Kojto 122:f9eeca106725 670 */
Kojto 122:f9eeca106725 671 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 672 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 673 #define GPIO_AF9_I2C2 ((uint8_t)0x09U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 674 #define GPIO_AF9_I2C3 ((uint8_t)0x09U) /* I2C3 Alternate Function mapping */
Kojto 122:f9eeca106725 675 #define GPIO_AF9_FMPI2C1 ((uint8_t)0x09U) /* FMPI2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 676 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 677 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 678 #define GPIO_AF9_QSPI ((uint8_t)0x09U) /* QSPI Alternate Function mapping */
Kojto 122:f9eeca106725 679
Kojto 122:f9eeca106725 680 /**
Kojto 122:f9eeca106725 681 * @brief AF 10 selection
Kojto 122:f9eeca106725 682 */
Kojto 122:f9eeca106725 683 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 684 #define GPIO_AF10_DFSDM1 ((uint8_t)0x0AU) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 685 #define GPIO_AF10_QSPI ((uint8_t)0x0AU) /* QSPI Alternate Function mapping */
Kojto 122:f9eeca106725 686 #define GPIO_AF10_FMC ((uint8_t)0x0AU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 687
Kojto 122:f9eeca106725 688 /**
Kojto 122:f9eeca106725 689 * @brief AF 12 selection
Kojto 122:f9eeca106725 690 */
Kojto 122:f9eeca106725 691 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
Kojto 122:f9eeca106725 692 #define GPIO_AF12_FSMC ((uint8_t)0x0CU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 693
Kojto 122:f9eeca106725 694 /**
Kojto 122:f9eeca106725 695 * @brief AF 15 selection
Kojto 122:f9eeca106725 696 */
Kojto 122:f9eeca106725 697 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 122:f9eeca106725 698 #endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
Kojto 110:165afa46840b 699 /*---------------------------------------- STM32F411xx------------------------*/
Kojto 90:cb3d968589d8 700 #if defined(STM32F411xE)
Kojto 90:cb3d968589d8 701 /**
Kojto 90:cb3d968589d8 702 * @brief AF 0 selection
Kojto 90:cb3d968589d8 703 */
Kojto 122:f9eeca106725 704 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 705 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 706 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 707 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 708 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 90:cb3d968589d8 709
Kojto 90:cb3d968589d8 710 /**
Kojto 90:cb3d968589d8 711 * @brief AF 1 selection
Kojto 90:cb3d968589d8 712 */
Kojto 122:f9eeca106725 713 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 714 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 715
Kojto 90:cb3d968589d8 716 /**
Kojto 90:cb3d968589d8 717 * @brief AF 2 selection
Kojto 90:cb3d968589d8 718 */
Kojto 122:f9eeca106725 719 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 720 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 721 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 90:cb3d968589d8 722
Kojto 90:cb3d968589d8 723 /**
Kojto 90:cb3d968589d8 724 * @brief AF 3 selection
Kojto 90:cb3d968589d8 725 */
Kojto 122:f9eeca106725 726 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 727 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 728 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 90:cb3d968589d8 729
Kojto 90:cb3d968589d8 730 /**
Kojto 90:cb3d968589d8 731 * @brief AF 4 selection
Kojto 90:cb3d968589d8 732 */
Kojto 122:f9eeca106725 733 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 734 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 735 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
Kojto 90:cb3d968589d8 736
Kojto 90:cb3d968589d8 737 /**
Kojto 90:cb3d968589d8 738 * @brief AF 5 selection
Kojto 90:cb3d968589d8 739 */
Kojto 122:f9eeca106725 740 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1/I2S1 Alternate Function mapping */
Kojto 122:f9eeca106725 741 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 742 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 743 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 744 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
Kojto 90:cb3d968589d8 745
Kojto 90:cb3d968589d8 746 /**
Kojto 90:cb3d968589d8 747 * @brief AF 6 selection
Kojto 90:cb3d968589d8 748 */
Kojto 122:f9eeca106725 749 #define GPIO_AF6_SPI2 ((uint8_t)0x06U) /* I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 750 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 751 #define GPIO_AF6_SPI4 ((uint8_t)0x06U) /* SPI4/I2S4 Alternate Function mapping */
Kojto 122:f9eeca106725 752 #define GPIO_AF6_SPI5 ((uint8_t)0x06U) /* SPI5/I2S5 Alternate Function mapping */
Kojto 122:f9eeca106725 753 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
Kojto 110:165afa46840b 754
Kojto 90:cb3d968589d8 755 /**
Kojto 90:cb3d968589d8 756 * @brief AF 7 selection
Kojto 90:cb3d968589d8 757 */
Kojto 122:f9eeca106725 758 #define GPIO_AF7_SPI3 ((uint8_t)0x07U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 759 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 760 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 761 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
Kojto 90:cb3d968589d8 762
Kojto 90:cb3d968589d8 763 /**
Kojto 90:cb3d968589d8 764 * @brief AF 8 selection
Kojto 90:cb3d968589d8 765 */
Kojto 122:f9eeca106725 766 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 90:cb3d968589d8 767
Kojto 90:cb3d968589d8 768 /**
Kojto 90:cb3d968589d8 769 * @brief AF 9 selection
Kojto 90:cb3d968589d8 770 */
Kojto 122:f9eeca106725 771 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 772 #define GPIO_AF9_I2C2 ((uint8_t)0x09U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 773 #define GPIO_AF9_I2C3 ((uint8_t)0x09U) /* I2C3 Alternate Function mapping */
Kojto 90:cb3d968589d8 774
Kojto 90:cb3d968589d8 775 /**
Kojto 90:cb3d968589d8 776 * @brief AF 10 selection
Kojto 90:cb3d968589d8 777 */
Kojto 122:f9eeca106725 778 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 90:cb3d968589d8 779
Kojto 90:cb3d968589d8 780 /**
Kojto 90:cb3d968589d8 781 * @brief AF 12 selection
Kojto 90:cb3d968589d8 782 */
Kojto 122:f9eeca106725 783 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 784
Kojto 90:cb3d968589d8 785 /**
Kojto 90:cb3d968589d8 786 * @brief AF 15 selection
Kojto 90:cb3d968589d8 787 */
Kojto 122:f9eeca106725 788 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 99:dbbf35b96557 789 #endif /* STM32F411xE */
Kojto 110:165afa46840b 790
Kojto 110:165afa46840b 791 /*---------------------------------------- STM32F410xx------------------------*/
Kojto 110:165afa46840b 792 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 110:165afa46840b 793 /**
Kojto 110:165afa46840b 794 * @brief AF 0 selection
Kojto 110:165afa46840b 795 */
Kojto 122:f9eeca106725 796 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 797 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 798 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 799 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 800 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 110:165afa46840b 801
Kojto 110:165afa46840b 802 /**
Kojto 110:165afa46840b 803 * @brief AF 1 selection
Kojto 110:165afa46840b 804 */
Kojto 122:f9eeca106725 805 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 806 #define GPIO_AF1_LPTIM1 ((uint8_t)0x01U) /* LPTIM1 Alternate Function mapping */
Kojto 110:165afa46840b 807
Kojto 110:165afa46840b 808 /**
Kojto 110:165afa46840b 809 * @brief AF 2 selection
Kojto 110:165afa46840b 810 */
Kojto 122:f9eeca106725 811 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 110:165afa46840b 812
Kojto 110:165afa46840b 813 /**
Kojto 110:165afa46840b 814 * @brief AF 3 selection
Kojto 110:165afa46840b 815 */
Kojto 122:f9eeca106725 816 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 817 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 110:165afa46840b 818
Kojto 110:165afa46840b 819 /**
Kojto 110:165afa46840b 820 * @brief AF 4 selection
Kojto 110:165afa46840b 821 */
Kojto 122:f9eeca106725 822 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 823 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 824 #define GPIO_AF4_FMPI2C1 ((uint8_t)0x04U) /* FMPI2C1 Alternate Function mapping */
Kojto 110:165afa46840b 825
Kojto 110:165afa46840b 826 /**
Kojto 110:165afa46840b 827 * @brief AF 5 selection
Kojto 110:165afa46840b 828 */
Kojto 122:f9eeca106725 829 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1/I2S1 Alternate Function mapping */
Kojto 110:165afa46840b 830 #if defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 122:f9eeca106725 831 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 110:165afa46840b 832 #endif /* STM32F410Cx || STM32F410Rx */
Kojto 110:165afa46840b 833
Kojto 110:165afa46840b 834 /**
Kojto 110:165afa46840b 835 * @brief AF 6 selection
Kojto 110:165afa46840b 836 */
Kojto 122:f9eeca106725 837 #define GPIO_AF6_SPI1 ((uint8_t)0x06U) /* SPI1 Alternate Function mapping */
Kojto 110:165afa46840b 838 #if defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 122:f9eeca106725 839 #define GPIO_AF6_SPI2 ((uint8_t)0x06U) /* I2S2 Alternate Function mapping */
Kojto 110:165afa46840b 840 #endif /* STM32F410Cx || STM32F410Rx */
Kojto 122:f9eeca106725 841 #define GPIO_AF6_SPI5 ((uint8_t)0x06U) /* SPI5/I2S5 Alternate Function mapping */
Kojto 110:165afa46840b 842 /**
Kojto 110:165afa46840b 843 * @brief AF 7 selection
Kojto 110:165afa46840b 844 */
Kojto 122:f9eeca106725 845 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 846 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 110:165afa46840b 847
Kojto 110:165afa46840b 848 /**
Kojto 110:165afa46840b 849 * @brief AF 8 selection
Kojto 110:165afa46840b 850 */
Kojto 122:f9eeca106725 851 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 110:165afa46840b 852
Kojto 110:165afa46840b 853 /**
Kojto 110:165afa46840b 854 * @brief AF 9 selection
Kojto 110:165afa46840b 855 */
Kojto 122:f9eeca106725 856 #define GPIO_AF9_I2C2 ((uint8_t)0x09U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 857 #define GPIO_AF9_FMPI2C1 ((uint8_t)0x09U) /* FMPI2C1 Alternate Function mapping */
Kojto 110:165afa46840b 858
Kojto 110:165afa46840b 859 /**
Kojto 110:165afa46840b 860 * @brief AF 15 selection
Kojto 110:165afa46840b 861 */
Kojto 122:f9eeca106725 862 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 110:165afa46840b 863 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx */
Kojto 110:165afa46840b 864
Kojto 110:165afa46840b 865 /*---------------------------------------- STM32F446xx -----------------------*/
Kojto 110:165afa46840b 866 #if defined(STM32F446xx)
Kojto 99:dbbf35b96557 867 /**
Kojto 99:dbbf35b96557 868 * @brief AF 0 selection
Kojto 99:dbbf35b96557 869 */
Kojto 122:f9eeca106725 870 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 871 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 872 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 873 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 874 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 90:cb3d968589d8 875
Kojto 99:dbbf35b96557 876 /**
Kojto 99:dbbf35b96557 877 * @brief AF 1 selection
Kojto 99:dbbf35b96557 878 */
Kojto 122:f9eeca106725 879 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 880 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
Kojto 99:dbbf35b96557 881
Kojto 99:dbbf35b96557 882 /**
Kojto 99:dbbf35b96557 883 * @brief AF 2 selection
Kojto 99:dbbf35b96557 884 */
Kojto 122:f9eeca106725 885 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 886 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 887 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 99:dbbf35b96557 888
Kojto 99:dbbf35b96557 889 /**
Kojto 99:dbbf35b96557 890 * @brief AF 3 selection
Kojto 99:dbbf35b96557 891 */
Kojto 122:f9eeca106725 892 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 893 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 894 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 895 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 122:f9eeca106725 896 #define GPIO_AF3_CEC ((uint8_t)0x03U) /* CEC Alternate Function mapping */
Kojto 99:dbbf35b96557 897
Kojto 99:dbbf35b96557 898 /**
Kojto 99:dbbf35b96557 899 * @brief AF 4 selection
Kojto 99:dbbf35b96557 900 */
Kojto 122:f9eeca106725 901 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 902 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 903 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
Kojto 122:f9eeca106725 904 #define GPIO_AF4_FMPI2C1 ((uint8_t)0x04U) /* FMPI2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 905 #define GPIO_AF4_CEC ((uint8_t)0x04U) /* CEC Alternate Function mapping */
Kojto 99:dbbf35b96557 906
Kojto 99:dbbf35b96557 907 /**
Kojto 99:dbbf35b96557 908 * @brief AF 5 selection
Kojto 99:dbbf35b96557 909 */
Kojto 122:f9eeca106725 910 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1/I2S1 Alternate Function mapping */
Kojto 122:f9eeca106725 911 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 912 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 913 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 99:dbbf35b96557 914
Kojto 99:dbbf35b96557 915 /**
Kojto 99:dbbf35b96557 916 * @brief AF 6 selection
Kojto 99:dbbf35b96557 917 */
Kojto 122:f9eeca106725 918 #define GPIO_AF6_SPI2 ((uint8_t)0x06U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 919 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 920 #define GPIO_AF6_SPI4 ((uint8_t)0x06U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 921 #define GPIO_AF6_SAI1 ((uint8_t)0x06U) /* SAI1 Alternate Function mapping */
Kojto 99:dbbf35b96557 922
Kojto 99:dbbf35b96557 923 /**
Kojto 99:dbbf35b96557 924 * @brief AF 7 selection
Kojto 99:dbbf35b96557 925 */
Kojto 122:f9eeca106725 926 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 927 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 928 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 929 #define GPIO_AF7_UART5 ((uint8_t)0x07U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 930 #define GPIO_AF7_SPI2 ((uint8_t)0x07U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 931 #define GPIO_AF7_SPI3 ((uint8_t)0x07U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 932 #define GPIO_AF7_SPDIFRX ((uint8_t)0x07U) /* SPDIFRX Alternate Function mapping */
Kojto 99:dbbf35b96557 933
Kojto 99:dbbf35b96557 934 /**
Kojto 99:dbbf35b96557 935 * @brief AF 8 selection
Kojto 99:dbbf35b96557 936 */
Kojto 122:f9eeca106725 937 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 938 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 939 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 940 #define GPIO_AF8_SPDIFRX ((uint8_t)0x08U) /* SPDIFRX Alternate Function mapping */
Kojto 122:f9eeca106725 941 #define GPIO_AF8_SAI2 ((uint8_t)0x08U) /* SAI2 Alternate Function mapping */
Kojto 99:dbbf35b96557 942
Kojto 99:dbbf35b96557 943 /**
Kojto 99:dbbf35b96557 944 * @brief AF 9 selection
Kojto 99:dbbf35b96557 945 */
Kojto 122:f9eeca106725 946 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 947 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 948 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 949 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 950 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 951 #define GPIO_AF9_QSPI ((uint8_t)0x09U) /* QSPI Alternate Function mapping */
Kojto 99:dbbf35b96557 952
Kojto 99:dbbf35b96557 953 /**
Kojto 99:dbbf35b96557 954 * @brief AF 10 selection
Kojto 99:dbbf35b96557 955 */
Kojto 122:f9eeca106725 956 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 957 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
Kojto 122:f9eeca106725 958 #define GPIO_AF10_SAI2 ((uint8_t)0x0AU) /* SAI2 Alternate Function mapping */
Kojto 122:f9eeca106725 959 #define GPIO_AF10_QSPI ((uint8_t)0x0AU) /* QSPI Alternate Function mapping */
Kojto 99:dbbf35b96557 960
Kojto 99:dbbf35b96557 961 /**
Kojto 99:dbbf35b96557 962 * @brief AF 11 selection
Kojto 99:dbbf35b96557 963 */
Kojto 122:f9eeca106725 964 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
Kojto 99:dbbf35b96557 965
Kojto 99:dbbf35b96557 966 /**
Kojto 99:dbbf35b96557 967 * @brief AF 12 selection
Kojto 99:dbbf35b96557 968 */
Kojto 122:f9eeca106725 969 #define GPIO_AF12_FMC ((uint8_t)0x0CU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 970 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 971 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
Kojto 99:dbbf35b96557 972
Kojto 99:dbbf35b96557 973 /**
Kojto 99:dbbf35b96557 974 * @brief AF 13 selection
Kojto 99:dbbf35b96557 975 */
Kojto 122:f9eeca106725 976 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
Kojto 99:dbbf35b96557 977
Kojto 99:dbbf35b96557 978 /**
Kojto 99:dbbf35b96557 979 * @brief AF 15 selection
Kojto 99:dbbf35b96557 980 */
Kojto 122:f9eeca106725 981 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 99:dbbf35b96557 982
Kojto 99:dbbf35b96557 983 #endif /* STM32F446xx */
Kojto 110:165afa46840b 984 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 985
Kojto 110:165afa46840b 986 /*-------------------------------- STM32F469xx/STM32F479xx--------------------*/
Kojto 110:165afa46840b 987 #if defined(STM32F469xx) || defined(STM32F479xx)
Kojto 110:165afa46840b 988 /**
Kojto 110:165afa46840b 989 * @brief AF 0 selection
Kojto 110:165afa46840b 990 */
Kojto 122:f9eeca106725 991 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 992 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 993 #define GPIO_AF0_TAMPER ((uint8_t)0x00U) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
Kojto 122:f9eeca106725 994 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 995 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 110:165afa46840b 996
Kojto 110:165afa46840b 997 /**
Kojto 110:165afa46840b 998 * @brief AF 1 selection
Kojto 110:165afa46840b 999 */
Kojto 122:f9eeca106725 1000 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 1001 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
Kojto 110:165afa46840b 1002
Kojto 110:165afa46840b 1003 /**
Kojto 110:165afa46840b 1004 * @brief AF 2 selection
Kojto 110:165afa46840b 1005 */
Kojto 122:f9eeca106725 1006 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 1007 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 1008 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 110:165afa46840b 1009
Kojto 110:165afa46840b 1010 /**
Kojto 110:165afa46840b 1011 * @brief AF 3 selection
Kojto 110:165afa46840b 1012 */
Kojto 122:f9eeca106725 1013 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 1014 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 1015 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 1016 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 110:165afa46840b 1017
Kojto 110:165afa46840b 1018 /**
Kojto 110:165afa46840b 1019 * @brief AF 4 selection
Kojto 110:165afa46840b 1020 */
Kojto 122:f9eeca106725 1021 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 1022 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 1023 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
Kojto 110:165afa46840b 1024
Kojto 110:165afa46840b 1025 /**
Kojto 110:165afa46840b 1026 * @brief AF 5 selection
Kojto 110:165afa46840b 1027 */
Kojto 122:f9eeca106725 1028 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 1029 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 1030 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 1031 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 1032 #define GPIO_AF5_SPI5 ((uint8_t)0x05U) /* SPI5 Alternate Function mapping */
Kojto 122:f9eeca106725 1033 #define GPIO_AF5_SPI6 ((uint8_t)0x05U) /* SPI6 Alternate Function mapping */
Kojto 122:f9eeca106725 1034 #define GPIO_AF5_I2S3ext ((uint8_t)0x05U) /* I2S3ext_SD Alternate Function mapping */
Kojto 110:165afa46840b 1035
Kojto 110:165afa46840b 1036 /**
Kojto 110:165afa46840b 1037 * @brief AF 6 selection
Kojto 110:165afa46840b 1038 */
Kojto 122:f9eeca106725 1039 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 1040 #define GPIO_AF6_I2S2ext ((uint8_t)0x06U) /* I2S2ext_SD Alternate Function mapping */
Kojto 122:f9eeca106725 1041 #define GPIO_AF6_SAI1 ((uint8_t)0x06U) /* SAI1 Alternate Function mapping */
Kojto 110:165afa46840b 1042
Kojto 110:165afa46840b 1043 /**
Kojto 110:165afa46840b 1044 * @brief AF 7 selection
Kojto 110:165afa46840b 1045 */
Kojto 122:f9eeca106725 1046 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 1047 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 1048 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 1049 #define GPIO_AF7_I2S3ext ((uint8_t)0x07U) /* I2S3ext_SD Alternate Function mapping */
Kojto 110:165afa46840b 1050
Kojto 110:165afa46840b 1051 /**
Kojto 110:165afa46840b 1052 * @brief AF 8 selection
Kojto 110:165afa46840b 1053 */
Kojto 122:f9eeca106725 1054 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 1055 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 1056 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 1057 #define GPIO_AF8_UART7 ((uint8_t)0x08U) /* UART7 Alternate Function mapping */
Kojto 122:f9eeca106725 1058 #define GPIO_AF8_UART8 ((uint8_t)0x08U) /* UART8 Alternate Function mapping */
Kojto 110:165afa46840b 1059
Kojto 110:165afa46840b 1060 /**
Kojto 110:165afa46840b 1061 * @brief AF 9 selection
Kojto 110:165afa46840b 1062 */
Kojto 122:f9eeca106725 1063 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 1064 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 1065 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 1066 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 1067 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 1068 #define GPIO_AF9_LTDC ((uint8_t)0x09U) /* LCD-TFT Alternate Function mapping */
Kojto 122:f9eeca106725 1069 #define GPIO_AF9_QSPI ((uint8_t)0x09U) /* QSPI Alternate Function mapping */
Kojto 110:165afa46840b 1070
Kojto 110:165afa46840b 1071 /**
Kojto 110:165afa46840b 1072 * @brief AF 10 selection
Kojto 110:165afa46840b 1073 */
Kojto 122:f9eeca106725 1074 #define GPIO_AF10_OTG_FS ((uint8_t)0x0AU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 1075 #define GPIO_AF10_OTG_HS ((uint8_t)0x0AU) /* OTG_HS Alternate Function mapping */
Kojto 122:f9eeca106725 1076 #define GPIO_AF10_QSPI ((uint8_t)0x0AU) /* QSPI Alternate Function mapping */
Kojto 110:165afa46840b 1077
Kojto 110:165afa46840b 1078 /**
Kojto 110:165afa46840b 1079 * @brief AF 11 selection
Kojto 110:165afa46840b 1080 */
Kojto 122:f9eeca106725 1081 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
Kojto 110:165afa46840b 1082
Kojto 110:165afa46840b 1083 /**
Kojto 110:165afa46840b 1084 * @brief AF 12 selection
Kojto 110:165afa46840b 1085 */
Kojto 122:f9eeca106725 1086 #define GPIO_AF12_FMC ((uint8_t)0x0CU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 1087 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0x0CU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 1088 #define GPIO_AF12_SDIO ((uint8_t)0x0CU) /* SDIO Alternate Function mapping */
Kojto 110:165afa46840b 1089
Kojto 110:165afa46840b 1090 /**
Kojto 110:165afa46840b 1091 * @brief AF 13 selection
Kojto 110:165afa46840b 1092 */
Kojto 122:f9eeca106725 1093 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
Kojto 122:f9eeca106725 1094 #define GPIO_AF13_DSI ((uint8_t)0x0DU) /* DSI Alternate Function mapping */
Kojto 110:165afa46840b 1095
Kojto 110:165afa46840b 1096 /**
Kojto 110:165afa46840b 1097 * @brief AF 14 selection
Kojto 110:165afa46840b 1098 */
Kojto 122:f9eeca106725 1099 #define GPIO_AF14_LTDC ((uint8_t)0x0EU) /* LCD-TFT Alternate Function mapping */
Kojto 110:165afa46840b 1100
Kojto 110:165afa46840b 1101 /**
Kojto 110:165afa46840b 1102 * @brief AF 15 selection
Kojto 110:165afa46840b 1103 */
Kojto 122:f9eeca106725 1104 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 110:165afa46840b 1105
Kojto 110:165afa46840b 1106 #endif /* STM32F469xx || STM32F479xx */
Kojto 110:165afa46840b 1107 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1108 /**
Kojto 99:dbbf35b96557 1109 * @}
Kojto 99:dbbf35b96557 1110 */
Kojto 99:dbbf35b96557 1111
Kojto 99:dbbf35b96557 1112 /**
Kojto 99:dbbf35b96557 1113 * @}
Kojto 99:dbbf35b96557 1114 */
Kojto 99:dbbf35b96557 1115
Kojto 99:dbbf35b96557 1116 /* Exported macro ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1117 /** @defgroup GPIOEx_Exported_Macros GPIO Exported Macros
Kojto 99:dbbf35b96557 1118 * @{
Kojto 99:dbbf35b96557 1119 */
Kojto 99:dbbf35b96557 1120 /**
Kojto 99:dbbf35b96557 1121 * @}
Kojto 99:dbbf35b96557 1122 */
Kojto 99:dbbf35b96557 1123
Kojto 110:165afa46840b 1124 /* Exported functions --------------------------------------------------------*/
Kojto 99:dbbf35b96557 1125 /** @defgroup GPIOEx_Exported_Functions GPIO Exported Functions
Kojto 99:dbbf35b96557 1126 * @{
Kojto 99:dbbf35b96557 1127 */
Kojto 99:dbbf35b96557 1128 /**
Kojto 99:dbbf35b96557 1129 * @}
Kojto 99:dbbf35b96557 1130 */
Kojto 99:dbbf35b96557 1131
Kojto 99:dbbf35b96557 1132 /* Private types -------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1133 /* Private variables ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 1134 /* Private constants ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 1135 /** @defgroup GPIOEx_Private_Constants GPIO Private Constants
Kojto 99:dbbf35b96557 1136 * @{
Kojto 99:dbbf35b96557 1137 */
Kojto 99:dbbf35b96557 1138 /**
Kojto 99:dbbf35b96557 1139 * @}
Kojto 99:dbbf35b96557 1140 */
Kojto 99:dbbf35b96557 1141
Kojto 99:dbbf35b96557 1142 /* Private macros ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1143 /** @defgroup GPIOEx_Private_Macros GPIO Private Macros
Kojto 99:dbbf35b96557 1144 * @{
Kojto 99:dbbf35b96557 1145 */
Kojto 99:dbbf35b96557 1146 /** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index
Kojto 99:dbbf35b96557 1147 * @{
Kojto 99:dbbf35b96557 1148 */
Kojto 110:165afa46840b 1149 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)
Kojto 99:dbbf35b96557 1150 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 99:dbbf35b96557 1151 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 99:dbbf35b96557 1152 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 99:dbbf35b96557 1153 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 99:dbbf35b96557 1154 ((__GPIOx__) == (GPIOE))? 4U :\
Kojto 99:dbbf35b96557 1155 ((__GPIOx__) == (GPIOF))? 5U :\
Kojto 99:dbbf35b96557 1156 ((__GPIOx__) == (GPIOG))? 6U :\
Kojto 99:dbbf35b96557 1157 ((__GPIOx__) == (GPIOH))? 7U :\
Kojto 99:dbbf35b96557 1158 ((__GPIOx__) == (GPIOI))? 8U : 9U)
Kojto 99:dbbf35b96557 1159 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
Kojto 99:dbbf35b96557 1160
Kojto 110:165afa46840b 1161 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
Kojto 110:165afa46840b 1162 defined(STM32F469xx) || defined(STM32F479xx)
Kojto 99:dbbf35b96557 1163 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 99:dbbf35b96557 1164 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 99:dbbf35b96557 1165 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 99:dbbf35b96557 1166 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 99:dbbf35b96557 1167 ((__GPIOx__) == (GPIOE))? 4U :\
Kojto 99:dbbf35b96557 1168 ((__GPIOx__) == (GPIOF))? 5U :\
Kojto 99:dbbf35b96557 1169 ((__GPIOx__) == (GPIOG))? 6U :\
Kojto 99:dbbf35b96557 1170 ((__GPIOx__) == (GPIOH))? 7U :\
Kojto 99:dbbf35b96557 1171 ((__GPIOx__) == (GPIOI))? 8U :\
Kojto 99:dbbf35b96557 1172 ((__GPIOx__) == (GPIOJ))? 9U : 10U)
Kojto 110:165afa46840b 1173 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
Kojto 99:dbbf35b96557 1174
Kojto 110:165afa46840b 1175 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 110:165afa46840b 1176 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 110:165afa46840b 1177 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 110:165afa46840b 1178 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 110:165afa46840b 1179 ((__GPIOx__) == (GPIOH))? 7U : 8U)
Kojto 110:165afa46840b 1180 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx */
Kojto 110:165afa46840b 1181
Kojto 110:165afa46840b 1182 #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
Kojto 99:dbbf35b96557 1183 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 99:dbbf35b96557 1184 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 99:dbbf35b96557 1185 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 99:dbbf35b96557 1186 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 99:dbbf35b96557 1187 ((__GPIOx__) == (GPIOE))? 4U : 5U)
Kojto 99:dbbf35b96557 1188 #endif /* STM32F401xC || STM32F401xE || STM32F411xE */
Kojto 99:dbbf35b96557 1189
Kojto 122:f9eeca106725 1190 #if defined(STM32F446xx) || defined(STM32F412Zx) ||defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
Kojto 99:dbbf35b96557 1191 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 99:dbbf35b96557 1192 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 99:dbbf35b96557 1193 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 99:dbbf35b96557 1194 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 99:dbbf35b96557 1195 ((__GPIOx__) == (GPIOE))? 4U :\
Kojto 99:dbbf35b96557 1196 ((__GPIOx__) == (GPIOF))? 5U :\
Kojto 99:dbbf35b96557 1197 ((__GPIOx__) == (GPIOG))? 6U : 8U)
Kojto 122:f9eeca106725 1198 #endif /* STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
Kojto 99:dbbf35b96557 1199
Kojto 99:dbbf35b96557 1200 /**
Kojto 99:dbbf35b96557 1201 * @}
Kojto 99:dbbf35b96557 1202 */
Kojto 99:dbbf35b96557 1203
Kojto 99:dbbf35b96557 1204 /** @defgroup GPIOEx_IS_Alternat_function_selection GPIO Check Alternate Function
Kojto 99:dbbf35b96557 1205 * @{
Kojto 99:dbbf35b96557 1206 */
Kojto 110:165afa46840b 1207 /*------------------------- STM32F429xx/STM32F439xx---------------------------*/
Kojto 110:165afa46840b 1208 #if defined(STM32F429xx) || defined(STM32F439xx)
Kojto 99:dbbf35b96557 1209 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1210 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1211 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1212 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1213 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1214 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 99:dbbf35b96557 1215 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 99:dbbf35b96557 1216 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 99:dbbf35b96557 1217 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 99:dbbf35b96557 1218 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 99:dbbf35b96557 1219 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1220 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 99:dbbf35b96557 1221 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 99:dbbf35b96557 1222 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 99:dbbf35b96557 1223 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 99:dbbf35b96557 1224 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 99:dbbf35b96557 1225 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 99:dbbf35b96557 1226 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 99:dbbf35b96557 1227 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 99:dbbf35b96557 1228 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 99:dbbf35b96557 1229 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 99:dbbf35b96557 1230 ((AF) == GPIO_AF14_LTDC))
Kojto 99:dbbf35b96557 1231
Kojto 99:dbbf35b96557 1232 #endif /* STM32F429xx || STM32F439xx */
Kojto 110:165afa46840b 1233 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1234
Kojto 110:165afa46840b 1235 /*---------------------------------- STM32F427xx/STM32F437xx------------------*/
Kojto 110:165afa46840b 1236 #if defined(STM32F427xx) || defined(STM32F437xx)
Kojto 99:dbbf35b96557 1237 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1238 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1239 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1240 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1241 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1242 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 99:dbbf35b96557 1243 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 99:dbbf35b96557 1244 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 99:dbbf35b96557 1245 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 99:dbbf35b96557 1246 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 99:dbbf35b96557 1247 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1248 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 99:dbbf35b96557 1249 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 99:dbbf35b96557 1250 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 99:dbbf35b96557 1251 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 99:dbbf35b96557 1252 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 99:dbbf35b96557 1253 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 99:dbbf35b96557 1254 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 99:dbbf35b96557 1255 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 99:dbbf35b96557 1256 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 99:dbbf35b96557 1257 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1))
Kojto 99:dbbf35b96557 1258
Kojto 99:dbbf35b96557 1259 #endif /* STM32F427xx || STM32F437xx */
Kojto 110:165afa46840b 1260 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1261
Kojto 110:165afa46840b 1262 /*---------------------------------- STM32F407xx/STM32F417xx------------------*/
Kojto 110:165afa46840b 1263 #if defined(STM32F407xx) || defined(STM32F417xx)
Kojto 99:dbbf35b96557 1264 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1265 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1266 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1267 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1268 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1269 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 99:dbbf35b96557 1270 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 99:dbbf35b96557 1271 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 99:dbbf35b96557 1272 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 99:dbbf35b96557 1273 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 99:dbbf35b96557 1274 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1275 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 99:dbbf35b96557 1276 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 99:dbbf35b96557 1277 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 99:dbbf35b96557 1278 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 99:dbbf35b96557 1279 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 99:dbbf35b96557 1280 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 99:dbbf35b96557 1281 ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT))
Kojto 99:dbbf35b96557 1282
Kojto 99:dbbf35b96557 1283 #endif /* STM32F407xx || STM32F417xx */
Kojto 110:165afa46840b 1284 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1285
Kojto 110:165afa46840b 1286 /*---------------------------------- STM32F405xx/STM32F415xx------------------*/
Kojto 110:165afa46840b 1287 #if defined(STM32F405xx) || defined(STM32F415xx)
Kojto 99:dbbf35b96557 1288 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1289 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1290 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1291 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1292 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1293 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 99:dbbf35b96557 1294 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 99:dbbf35b96557 1295 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 99:dbbf35b96557 1296 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 99:dbbf35b96557 1297 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 99:dbbf35b96557 1298 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1299 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 99:dbbf35b96557 1300 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 99:dbbf35b96557 1301 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 99:dbbf35b96557 1302 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 99:dbbf35b96557 1303 ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDIO) || \
Kojto 99:dbbf35b96557 1304 ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT))
Kojto 99:dbbf35b96557 1305
Kojto 99:dbbf35b96557 1306 #endif /* STM32F405xx || STM32F415xx */
Kojto 99:dbbf35b96557 1307
Kojto 110:165afa46840b 1308 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1309
Kojto 110:165afa46840b 1310 /*---------------------------------------- STM32F401xx------------------------*/
Kojto 99:dbbf35b96557 1311 #if defined(STM32F401xC) || defined(STM32F401xE)
Kojto 99:dbbf35b96557 1312 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1313 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1314 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1315 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1316 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1317 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \
Kojto 99:dbbf35b96557 1318 ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \
Kojto 99:dbbf35b96557 1319 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 99:dbbf35b96557 1320 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 99:dbbf35b96557 1321 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1322 ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \
Kojto 99:dbbf35b96557 1323 ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \
Kojto 99:dbbf35b96557 1324 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT))
Kojto 99:dbbf35b96557 1325
Kojto 99:dbbf35b96557 1326 #endif /* STM32F401xC || STM32F401xE */
Kojto 110:165afa46840b 1327 /*----------------------------------------------------------------------------*/
Kojto 110:165afa46840b 1328 /*---------------------------------------- STM32F410xx------------------------*/
Kojto 110:165afa46840b 1329 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 122:f9eeca106725 1330 #define IS_GPIO_AF(AF) (((AF) < 10U) || ((AF) == 15U))
Kojto 110:165afa46840b 1331 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx */
Kojto 99:dbbf35b96557 1332
Kojto 110:165afa46840b 1333 /*---------------------------------------- STM32F411xx------------------------*/
Kojto 99:dbbf35b96557 1334 #if defined(STM32F411xE)
Kojto 90:cb3d968589d8 1335 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 90:cb3d968589d8 1336 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 90:cb3d968589d8 1337 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 90:cb3d968589d8 1338 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 90:cb3d968589d8 1339 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 90:cb3d968589d8 1340 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \
Kojto 90:cb3d968589d8 1341 ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \
Kojto 90:cb3d968589d8 1342 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 90:cb3d968589d8 1343 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF6_SPI4) || \
Kojto 90:cb3d968589d8 1344 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 90:cb3d968589d8 1345 ((AF) == GPIO_AF6_SPI5) || ((AF) == GPIO_AF7_SPI3) || \
Kojto 90:cb3d968589d8 1346 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 90:cb3d968589d8 1347 ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \
Kojto 90:cb3d968589d8 1348 ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \
Kojto 90:cb3d968589d8 1349 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT))
Kojto 90:cb3d968589d8 1350
Kojto 90:cb3d968589d8 1351 #endif /* STM32F411xE */
Kojto 110:165afa46840b 1352 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1353
Kojto 110:165afa46840b 1354 /*----------------------------------------------- STM32F446xx ----------------*/
Kojto 99:dbbf35b96557 1355 #if defined(STM32F446xx)
Kojto 99:dbbf35b96557 1356 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 99:dbbf35b96557 1357 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 99:dbbf35b96557 1358 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 99:dbbf35b96557 1359 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 99:dbbf35b96557 1360 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 99:dbbf35b96557 1361 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 99:dbbf35b96557 1362 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 99:dbbf35b96557 1363 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 99:dbbf35b96557 1364 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 99:dbbf35b96557 1365 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 99:dbbf35b96557 1366 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 99:dbbf35b96557 1367 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 99:dbbf35b96557 1368 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 99:dbbf35b96557 1369 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 99:dbbf35b96557 1370 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 99:dbbf35b96557 1371 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 99:dbbf35b96557 1372 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 99:dbbf35b96557 1373 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 99:dbbf35b96557 1374 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 99:dbbf35b96557 1375 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 99:dbbf35b96557 1376 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF6_SPI2) || \
Kojto 110:165afa46840b 1377 ((AF) == GPIO_AF6_SPI4) || ((AF) == GPIO_AF7_UART5) || \
Kojto 110:165afa46840b 1378 ((AF) == GPIO_AF7_SPI2) || ((AF) == GPIO_AF7_SPI3) || \
Kojto 110:165afa46840b 1379 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 110:165afa46840b 1380 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF9_QSPI) || \
Kojto 99:dbbf35b96557 1381 ((AF) == GPIO_AF10_SAI2) || ((AF) == GPIO_AF10_QSPI))
Kojto 99:dbbf35b96557 1382
Kojto 99:dbbf35b96557 1383 #endif /* STM32F446xx */
Kojto 110:165afa46840b 1384 /*----------------------------------------------------------------------------*/
Kojto 110:165afa46840b 1385
Kojto 110:165afa46840b 1386 /*------------------------------------------- STM32F469xx/STM32F479xx --------*/
Kojto 110:165afa46840b 1387 #if defined(STM32F469xx) || defined(STM32F479xx)
Kojto 110:165afa46840b 1388 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
Kojto 110:165afa46840b 1389 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
Kojto 110:165afa46840b 1390 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 110:165afa46840b 1391 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 110:165afa46840b 1392 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 110:165afa46840b 1393 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 110:165afa46840b 1394 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 110:165afa46840b 1395 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
Kojto 110:165afa46840b 1396 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
Kojto 110:165afa46840b 1397 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 110:165afa46840b 1398 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 110:165afa46840b 1399 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
Kojto 110:165afa46840b 1400 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
Kojto 110:165afa46840b 1401 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 110:165afa46840b 1402 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
Kojto 110:165afa46840b 1403 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 110:165afa46840b 1404 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 110:165afa46840b 1405 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 110:165afa46840b 1406 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 110:165afa46840b 1407 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 110:165afa46840b 1408 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 110:165afa46840b 1409 ((AF) == GPIO_AF14_LTDC) || ((AF) == GPIO_AF13_DSI) || \
Kojto 110:165afa46840b 1410 ((AF) == GPIO_AF9_QSPI) || ((AF) == GPIO_AF10_QSPI))
Kojto 110:165afa46840b 1411
Kojto 110:165afa46840b 1412 #endif /* STM32F469xx || STM32F479xx */
Kojto 110:165afa46840b 1413 /*----------------------------------------------------------------------------*/
Kojto 99:dbbf35b96557 1414
Kojto 122:f9eeca106725 1415 /*------------------STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx-----------*/
Kojto 122:f9eeca106725 1416 #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
Kojto 122:f9eeca106725 1417 #define IS_GPIO_AF(AF) (((AF) < 16U) && ((AF) != 11U) && ((AF) != 14U) && ((AF) != 13U))
Kojto 122:f9eeca106725 1418 #endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
Kojto 122:f9eeca106725 1419 /*----------------------------------------------------------------------------*/
Kojto 122:f9eeca106725 1420
emilmont 77:869cf507173a 1421 /**
emilmont 77:869cf507173a 1422 * @}
emilmont 77:869cf507173a 1423 */
emilmont 77:869cf507173a 1424
emilmont 77:869cf507173a 1425 /**
emilmont 77:869cf507173a 1426 * @}
emilmont 77:869cf507173a 1427 */
emilmont 77:869cf507173a 1428
Kojto 99:dbbf35b96557 1429 /* Private functions ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 1430 /** @defgroup GPIOEx_Private_Functions GPIO Private Functions
Kojto 99:dbbf35b96557 1431 * @{
Kojto 99:dbbf35b96557 1432 */
emilmont 77:869cf507173a 1433
Kojto 99:dbbf35b96557 1434 /**
Kojto 99:dbbf35b96557 1435 * @}
Kojto 99:dbbf35b96557 1436 */
emilmont 77:869cf507173a 1437
emilmont 77:869cf507173a 1438 /**
emilmont 77:869cf507173a 1439 * @}
emilmont 77:869cf507173a 1440 */
emilmont 77:869cf507173a 1441
emilmont 77:869cf507173a 1442 /**
emilmont 77:869cf507173a 1443 * @}
emilmont 77:869cf507173a 1444 */
emilmont 77:869cf507173a 1445
emilmont 77:869cf507173a 1446 #ifdef __cplusplus
emilmont 77:869cf507173a 1447 }
emilmont 77:869cf507173a 1448 #endif
emilmont 77:869cf507173a 1449
emilmont 77:869cf507173a 1450 #endif /* __STM32F4xx_HAL_GPIO_EX_H */
emilmont 77:869cf507173a 1451
emilmont 77:869cf507173a 1452 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/