mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
132:9baf128c2fab
Child:
145:64910690c574
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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