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