mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_DISCO_F407VG/stm32f4xx_hal_gpio_ex.h@242:7074e42da0b2, 2014-06-27 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jun 27 07:30:09 2014 +0100
- Revision:
- 242:7074e42da0b2
- Parent:
- 133:d4dda5c437f0
Synchronized with git revision 124ef5e3add9e74a3221347a3fbeea7c8b3cf353
Full URL: https://github.com/mbedmicro/mbed/commit/124ef5e3add9e74a3221347a3fbeea7c8b3cf353/
[DISCO_F407VG] HAL update.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 133:d4dda5c437f0 | 1 | /** |
mbed_official | 133:d4dda5c437f0 | 2 | ****************************************************************************** |
mbed_official | 133:d4dda5c437f0 | 3 | * @file stm32f4xx_hal_gpio_ex.h |
mbed_official | 133:d4dda5c437f0 | 4 | * @author MCD Application Team |
mbed_official | 242:7074e42da0b2 | 5 | * @version V1.1.0RC2 |
mbed_official | 242:7074e42da0b2 | 6 | * @date 14-May-2014 |
mbed_official | 133:d4dda5c437f0 | 7 | * @brief Header file of GPIO HAL Extension module. |
mbed_official | 133:d4dda5c437f0 | 8 | ****************************************************************************** |
mbed_official | 133:d4dda5c437f0 | 9 | * @attention |
mbed_official | 133:d4dda5c437f0 | 10 | * |
mbed_official | 133:d4dda5c437f0 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 133:d4dda5c437f0 | 12 | * |
mbed_official | 133:d4dda5c437f0 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 133:d4dda5c437f0 | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 133:d4dda5c437f0 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 133:d4dda5c437f0 | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 133:d4dda5c437f0 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 133:d4dda5c437f0 | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 133:d4dda5c437f0 | 19 | * and/or other materials provided with the distribution. |
mbed_official | 133:d4dda5c437f0 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 133:d4dda5c437f0 | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 133:d4dda5c437f0 | 22 | * without specific prior written permission. |
mbed_official | 133:d4dda5c437f0 | 23 | * |
mbed_official | 133:d4dda5c437f0 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 133:d4dda5c437f0 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 133:d4dda5c437f0 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 133:d4dda5c437f0 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 133:d4dda5c437f0 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 133:d4dda5c437f0 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 133:d4dda5c437f0 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 133:d4dda5c437f0 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 133:d4dda5c437f0 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 133:d4dda5c437f0 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 133:d4dda5c437f0 | 34 | * |
mbed_official | 133:d4dda5c437f0 | 35 | ****************************************************************************** |
mbed_official | 133:d4dda5c437f0 | 36 | */ |
mbed_official | 133:d4dda5c437f0 | 37 | |
mbed_official | 133:d4dda5c437f0 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 39 | #ifndef __STM32F4xx_HAL_GPIO_EX_H |
mbed_official | 133:d4dda5c437f0 | 40 | #define __STM32F4xx_HAL_GPIO_EX_H |
mbed_official | 133:d4dda5c437f0 | 41 | |
mbed_official | 133:d4dda5c437f0 | 42 | #ifdef __cplusplus |
mbed_official | 133:d4dda5c437f0 | 43 | extern "C" { |
mbed_official | 133:d4dda5c437f0 | 44 | #endif |
mbed_official | 133:d4dda5c437f0 | 45 | |
mbed_official | 133:d4dda5c437f0 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 47 | #include "stm32f4xx_hal_def.h" |
mbed_official | 133:d4dda5c437f0 | 48 | |
mbed_official | 133:d4dda5c437f0 | 49 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 133:d4dda5c437f0 | 50 | * @{ |
mbed_official | 133:d4dda5c437f0 | 51 | */ |
mbed_official | 133:d4dda5c437f0 | 52 | |
mbed_official | 133:d4dda5c437f0 | 53 | /** @addtogroup GPIO |
mbed_official | 133:d4dda5c437f0 | 54 | * @{ |
mbed_official | 133:d4dda5c437f0 | 55 | */ |
mbed_official | 133:d4dda5c437f0 | 56 | |
mbed_official | 133:d4dda5c437f0 | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 58 | |
mbed_official | 133:d4dda5c437f0 | 59 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 60 | |
mbed_official | 133:d4dda5c437f0 | 61 | /** @defgroup GPIO_Exported_Constants |
mbed_official | 133:d4dda5c437f0 | 62 | * @{ |
mbed_official | 133:d4dda5c437f0 | 63 | */ |
mbed_official | 133:d4dda5c437f0 | 64 | |
mbed_official | 133:d4dda5c437f0 | 65 | /** @defgroup GPIO_Alternat_function_selection |
mbed_official | 133:d4dda5c437f0 | 66 | * @{ |
mbed_official | 133:d4dda5c437f0 | 67 | */ |
mbed_official | 133:d4dda5c437f0 | 68 | |
mbed_official | 133:d4dda5c437f0 | 69 | /*------------------------- STM32F429xx/STM32F439xx---------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 70 | #if defined (STM32F429xx) || defined (STM32F439xx) |
mbed_official | 133:d4dda5c437f0 | 71 | /** |
mbed_official | 133:d4dda5c437f0 | 72 | * @brief AF 0 selection |
mbed_official | 133:d4dda5c437f0 | 73 | */ |
mbed_official | 133:d4dda5c437f0 | 74 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 75 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 76 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 77 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 78 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 79 | |
mbed_official | 133:d4dda5c437f0 | 80 | /** |
mbed_official | 133:d4dda5c437f0 | 81 | * @brief AF 1 selection |
mbed_official | 133:d4dda5c437f0 | 82 | */ |
mbed_official | 133:d4dda5c437f0 | 83 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 84 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 85 | |
mbed_official | 133:d4dda5c437f0 | 86 | /** |
mbed_official | 133:d4dda5c437f0 | 87 | * @brief AF 2 selection |
mbed_official | 133:d4dda5c437f0 | 88 | */ |
mbed_official | 133:d4dda5c437f0 | 89 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 90 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 91 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 92 | |
mbed_official | 133:d4dda5c437f0 | 93 | /** |
mbed_official | 133:d4dda5c437f0 | 94 | * @brief AF 3 selection |
mbed_official | 133:d4dda5c437f0 | 95 | */ |
mbed_official | 133:d4dda5c437f0 | 96 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 97 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 98 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 99 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 100 | |
mbed_official | 133:d4dda5c437f0 | 101 | /** |
mbed_official | 133:d4dda5c437f0 | 102 | * @brief AF 4 selection |
mbed_official | 133:d4dda5c437f0 | 103 | */ |
mbed_official | 133:d4dda5c437f0 | 104 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 105 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 106 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 107 | |
mbed_official | 133:d4dda5c437f0 | 108 | /** |
mbed_official | 133:d4dda5c437f0 | 109 | * @brief AF 5 selection |
mbed_official | 133:d4dda5c437f0 | 110 | */ |
mbed_official | 133:d4dda5c437f0 | 111 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 112 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 113 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 114 | #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 115 | #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 116 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 117 | |
mbed_official | 133:d4dda5c437f0 | 118 | /** |
mbed_official | 133:d4dda5c437f0 | 119 | * @brief AF 6 selection |
mbed_official | 133:d4dda5c437f0 | 120 | */ |
mbed_official | 133:d4dda5c437f0 | 121 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 122 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 123 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 124 | |
mbed_official | 133:d4dda5c437f0 | 125 | /** |
mbed_official | 133:d4dda5c437f0 | 126 | * @brief AF 7 selection |
mbed_official | 133:d4dda5c437f0 | 127 | */ |
mbed_official | 133:d4dda5c437f0 | 128 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 129 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 130 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 131 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 132 | |
mbed_official | 133:d4dda5c437f0 | 133 | /** |
mbed_official | 133:d4dda5c437f0 | 134 | * @brief AF 8 selection |
mbed_official | 133:d4dda5c437f0 | 135 | */ |
mbed_official | 133:d4dda5c437f0 | 136 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 137 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 138 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 139 | #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 140 | #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 141 | |
mbed_official | 133:d4dda5c437f0 | 142 | /** |
mbed_official | 133:d4dda5c437f0 | 143 | * @brief AF 9 selection |
mbed_official | 133:d4dda5c437f0 | 144 | */ |
mbed_official | 133:d4dda5c437f0 | 145 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 146 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 147 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 148 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 149 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 150 | #define GPIO_AF9_LTDC ((uint8_t)0x09) /* LCD-TFT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 151 | |
mbed_official | 133:d4dda5c437f0 | 152 | /** |
mbed_official | 133:d4dda5c437f0 | 153 | * @brief AF 10 selection |
mbed_official | 133:d4dda5c437f0 | 154 | */ |
mbed_official | 133:d4dda5c437f0 | 155 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 156 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 157 | |
mbed_official | 133:d4dda5c437f0 | 158 | /** |
mbed_official | 133:d4dda5c437f0 | 159 | * @brief AF 11 selection |
mbed_official | 133:d4dda5c437f0 | 160 | */ |
mbed_official | 133:d4dda5c437f0 | 161 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 162 | |
mbed_official | 133:d4dda5c437f0 | 163 | /** |
mbed_official | 133:d4dda5c437f0 | 164 | * @brief AF 12 selection |
mbed_official | 133:d4dda5c437f0 | 165 | */ |
mbed_official | 133:d4dda5c437f0 | 166 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 167 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 168 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 169 | |
mbed_official | 133:d4dda5c437f0 | 170 | /** |
mbed_official | 133:d4dda5c437f0 | 171 | * @brief AF 13 selection |
mbed_official | 133:d4dda5c437f0 | 172 | */ |
mbed_official | 133:d4dda5c437f0 | 173 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 174 | |
mbed_official | 133:d4dda5c437f0 | 175 | /** |
mbed_official | 133:d4dda5c437f0 | 176 | * @brief AF 14 selection |
mbed_official | 133:d4dda5c437f0 | 177 | */ |
mbed_official | 133:d4dda5c437f0 | 178 | #define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LCD-TFT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 179 | |
mbed_official | 133:d4dda5c437f0 | 180 | /** |
mbed_official | 133:d4dda5c437f0 | 181 | * @brief AF 15 selection |
mbed_official | 133:d4dda5c437f0 | 182 | */ |
mbed_official | 133:d4dda5c437f0 | 183 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 184 | |
mbed_official | 133:d4dda5c437f0 | 185 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
mbed_official | 133:d4dda5c437f0 | 186 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
mbed_official | 133:d4dda5c437f0 | 187 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
mbed_official | 133:d4dda5c437f0 | 188 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
mbed_official | 133:d4dda5c437f0 | 189 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
mbed_official | 133:d4dda5c437f0 | 190 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
mbed_official | 133:d4dda5c437f0 | 191 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
mbed_official | 133:d4dda5c437f0 | 192 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
mbed_official | 133:d4dda5c437f0 | 193 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
mbed_official | 133:d4dda5c437f0 | 194 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
mbed_official | 133:d4dda5c437f0 | 195 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
mbed_official | 133:d4dda5c437f0 | 196 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
mbed_official | 133:d4dda5c437f0 | 197 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
mbed_official | 133:d4dda5c437f0 | 198 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
mbed_official | 133:d4dda5c437f0 | 199 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
mbed_official | 133:d4dda5c437f0 | 200 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
mbed_official | 133:d4dda5c437f0 | 201 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
mbed_official | 133:d4dda5c437f0 | 202 | ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \ |
mbed_official | 133:d4dda5c437f0 | 203 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
mbed_official | 133:d4dda5c437f0 | 204 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
mbed_official | 133:d4dda5c437f0 | 205 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \ |
mbed_official | 133:d4dda5c437f0 | 206 | ((AF) == GPIO_AF14_LTDC)) |
mbed_official | 133:d4dda5c437f0 | 207 | |
mbed_official | 133:d4dda5c437f0 | 208 | #endif /* STM32F429xx || STM32F439xx */ |
mbed_official | 133:d4dda5c437f0 | 209 | /*------------------------------------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 210 | |
mbed_official | 133:d4dda5c437f0 | 211 | /*---------------------------------- STM32F427xx/STM32F437xx--------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 212 | #if defined (STM32F427xx) || defined (STM32F437xx) |
mbed_official | 133:d4dda5c437f0 | 213 | /** |
mbed_official | 133:d4dda5c437f0 | 214 | * @brief AF 0 selection |
mbed_official | 133:d4dda5c437f0 | 215 | */ |
mbed_official | 133:d4dda5c437f0 | 216 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 217 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 218 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 219 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 220 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 221 | |
mbed_official | 133:d4dda5c437f0 | 222 | /** |
mbed_official | 133:d4dda5c437f0 | 223 | * @brief AF 1 selection |
mbed_official | 133:d4dda5c437f0 | 224 | */ |
mbed_official | 133:d4dda5c437f0 | 225 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 226 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 227 | |
mbed_official | 133:d4dda5c437f0 | 228 | /** |
mbed_official | 133:d4dda5c437f0 | 229 | * @brief AF 2 selection |
mbed_official | 133:d4dda5c437f0 | 230 | */ |
mbed_official | 133:d4dda5c437f0 | 231 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 232 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 233 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 234 | |
mbed_official | 133:d4dda5c437f0 | 235 | /** |
mbed_official | 133:d4dda5c437f0 | 236 | * @brief AF 3 selection |
mbed_official | 133:d4dda5c437f0 | 237 | */ |
mbed_official | 133:d4dda5c437f0 | 238 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 239 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 240 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 241 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 242 | |
mbed_official | 133:d4dda5c437f0 | 243 | /** |
mbed_official | 133:d4dda5c437f0 | 244 | * @brief AF 4 selection |
mbed_official | 133:d4dda5c437f0 | 245 | */ |
mbed_official | 133:d4dda5c437f0 | 246 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 247 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 248 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 249 | |
mbed_official | 133:d4dda5c437f0 | 250 | /** |
mbed_official | 133:d4dda5c437f0 | 251 | * @brief AF 5 selection |
mbed_official | 133:d4dda5c437f0 | 252 | */ |
mbed_official | 133:d4dda5c437f0 | 253 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 254 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 255 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 256 | #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 257 | #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 258 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 259 | |
mbed_official | 133:d4dda5c437f0 | 260 | /** |
mbed_official | 133:d4dda5c437f0 | 261 | * @brief AF 6 selection |
mbed_official | 133:d4dda5c437f0 | 262 | */ |
mbed_official | 133:d4dda5c437f0 | 263 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 264 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 265 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 266 | |
mbed_official | 133:d4dda5c437f0 | 267 | /** |
mbed_official | 133:d4dda5c437f0 | 268 | * @brief AF 7 selection |
mbed_official | 133:d4dda5c437f0 | 269 | */ |
mbed_official | 133:d4dda5c437f0 | 270 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 271 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 272 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 273 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 274 | |
mbed_official | 133:d4dda5c437f0 | 275 | /** |
mbed_official | 133:d4dda5c437f0 | 276 | * @brief AF 8 selection |
mbed_official | 133:d4dda5c437f0 | 277 | */ |
mbed_official | 133:d4dda5c437f0 | 278 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 279 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 280 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 281 | #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 282 | #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 283 | |
mbed_official | 133:d4dda5c437f0 | 284 | /** |
mbed_official | 133:d4dda5c437f0 | 285 | * @brief AF 9 selection |
mbed_official | 133:d4dda5c437f0 | 286 | */ |
mbed_official | 133:d4dda5c437f0 | 287 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 288 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 289 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 290 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 291 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 292 | |
mbed_official | 133:d4dda5c437f0 | 293 | /** |
mbed_official | 133:d4dda5c437f0 | 294 | * @brief AF 10 selection |
mbed_official | 133:d4dda5c437f0 | 295 | */ |
mbed_official | 133:d4dda5c437f0 | 296 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 297 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 298 | |
mbed_official | 133:d4dda5c437f0 | 299 | /** |
mbed_official | 133:d4dda5c437f0 | 300 | * @brief AF 11 selection |
mbed_official | 133:d4dda5c437f0 | 301 | */ |
mbed_official | 133:d4dda5c437f0 | 302 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 303 | |
mbed_official | 133:d4dda5c437f0 | 304 | /** |
mbed_official | 133:d4dda5c437f0 | 305 | * @brief AF 12 selection |
mbed_official | 133:d4dda5c437f0 | 306 | */ |
mbed_official | 133:d4dda5c437f0 | 307 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 308 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 309 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 310 | |
mbed_official | 133:d4dda5c437f0 | 311 | /** |
mbed_official | 133:d4dda5c437f0 | 312 | * @brief AF 13 selection |
mbed_official | 133:d4dda5c437f0 | 313 | */ |
mbed_official | 133:d4dda5c437f0 | 314 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 315 | |
mbed_official | 133:d4dda5c437f0 | 316 | /** |
mbed_official | 133:d4dda5c437f0 | 317 | * @brief AF 15 selection |
mbed_official | 133:d4dda5c437f0 | 318 | */ |
mbed_official | 133:d4dda5c437f0 | 319 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 320 | |
mbed_official | 133:d4dda5c437f0 | 321 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
mbed_official | 133:d4dda5c437f0 | 322 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
mbed_official | 133:d4dda5c437f0 | 323 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
mbed_official | 133:d4dda5c437f0 | 324 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
mbed_official | 133:d4dda5c437f0 | 325 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
mbed_official | 133:d4dda5c437f0 | 326 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
mbed_official | 133:d4dda5c437f0 | 327 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
mbed_official | 133:d4dda5c437f0 | 328 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
mbed_official | 133:d4dda5c437f0 | 329 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
mbed_official | 133:d4dda5c437f0 | 330 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
mbed_official | 133:d4dda5c437f0 | 331 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
mbed_official | 133:d4dda5c437f0 | 332 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
mbed_official | 133:d4dda5c437f0 | 333 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
mbed_official | 133:d4dda5c437f0 | 334 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
mbed_official | 133:d4dda5c437f0 | 335 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
mbed_official | 133:d4dda5c437f0 | 336 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
mbed_official | 133:d4dda5c437f0 | 337 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
mbed_official | 133:d4dda5c437f0 | 338 | ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \ |
mbed_official | 133:d4dda5c437f0 | 339 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
mbed_official | 133:d4dda5c437f0 | 340 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
mbed_official | 133:d4dda5c437f0 | 341 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1)) |
mbed_official | 133:d4dda5c437f0 | 342 | |
mbed_official | 133:d4dda5c437f0 | 343 | #endif /* STM32F427xx || STM32F437xx */ |
mbed_official | 133:d4dda5c437f0 | 344 | /*------------------------------------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 345 | |
mbed_official | 133:d4dda5c437f0 | 346 | /*---------------------------------- STM32F407xx/STM32F417xx--------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 347 | #if defined (STM32F407xx) || defined (STM32F417xx) |
mbed_official | 133:d4dda5c437f0 | 348 | /** |
mbed_official | 133:d4dda5c437f0 | 349 | * @brief AF 0 selection |
mbed_official | 133:d4dda5c437f0 | 350 | */ |
mbed_official | 133:d4dda5c437f0 | 351 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 352 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 353 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 354 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 355 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 356 | |
mbed_official | 133:d4dda5c437f0 | 357 | /** |
mbed_official | 133:d4dda5c437f0 | 358 | * @brief AF 1 selection |
mbed_official | 133:d4dda5c437f0 | 359 | */ |
mbed_official | 133:d4dda5c437f0 | 360 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 361 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 362 | |
mbed_official | 133:d4dda5c437f0 | 363 | /** |
mbed_official | 133:d4dda5c437f0 | 364 | * @brief AF 2 selection |
mbed_official | 133:d4dda5c437f0 | 365 | */ |
mbed_official | 133:d4dda5c437f0 | 366 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 367 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 368 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 369 | |
mbed_official | 133:d4dda5c437f0 | 370 | /** |
mbed_official | 133:d4dda5c437f0 | 371 | * @brief AF 3 selection |
mbed_official | 133:d4dda5c437f0 | 372 | */ |
mbed_official | 133:d4dda5c437f0 | 373 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 374 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 375 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 376 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 377 | |
mbed_official | 133:d4dda5c437f0 | 378 | /** |
mbed_official | 133:d4dda5c437f0 | 379 | * @brief AF 4 selection |
mbed_official | 133:d4dda5c437f0 | 380 | */ |
mbed_official | 133:d4dda5c437f0 | 381 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 382 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 383 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 384 | |
mbed_official | 133:d4dda5c437f0 | 385 | /** |
mbed_official | 133:d4dda5c437f0 | 386 | * @brief AF 5 selection |
mbed_official | 133:d4dda5c437f0 | 387 | */ |
mbed_official | 133:d4dda5c437f0 | 388 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 389 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 390 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 391 | |
mbed_official | 133:d4dda5c437f0 | 392 | /** |
mbed_official | 133:d4dda5c437f0 | 393 | * @brief AF 6 selection |
mbed_official | 133:d4dda5c437f0 | 394 | */ |
mbed_official | 133:d4dda5c437f0 | 395 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 396 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 397 | |
mbed_official | 133:d4dda5c437f0 | 398 | /** |
mbed_official | 133:d4dda5c437f0 | 399 | * @brief AF 7 selection |
mbed_official | 133:d4dda5c437f0 | 400 | */ |
mbed_official | 133:d4dda5c437f0 | 401 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 402 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 403 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 404 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 405 | |
mbed_official | 133:d4dda5c437f0 | 406 | /** |
mbed_official | 133:d4dda5c437f0 | 407 | * @brief AF 8 selection |
mbed_official | 133:d4dda5c437f0 | 408 | */ |
mbed_official | 133:d4dda5c437f0 | 409 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 410 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 411 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 412 | |
mbed_official | 133:d4dda5c437f0 | 413 | /** |
mbed_official | 133:d4dda5c437f0 | 414 | * @brief AF 9 selection |
mbed_official | 133:d4dda5c437f0 | 415 | */ |
mbed_official | 133:d4dda5c437f0 | 416 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 417 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 418 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 419 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 420 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 421 | |
mbed_official | 133:d4dda5c437f0 | 422 | /** |
mbed_official | 133:d4dda5c437f0 | 423 | * @brief AF 10 selection |
mbed_official | 133:d4dda5c437f0 | 424 | */ |
mbed_official | 133:d4dda5c437f0 | 425 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 426 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 427 | |
mbed_official | 133:d4dda5c437f0 | 428 | /** |
mbed_official | 133:d4dda5c437f0 | 429 | * @brief AF 11 selection |
mbed_official | 133:d4dda5c437f0 | 430 | */ |
mbed_official | 133:d4dda5c437f0 | 431 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 432 | |
mbed_official | 133:d4dda5c437f0 | 433 | /** |
mbed_official | 133:d4dda5c437f0 | 434 | * @brief AF 12 selection |
mbed_official | 133:d4dda5c437f0 | 435 | */ |
mbed_official | 133:d4dda5c437f0 | 436 | #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 437 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 438 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 439 | |
mbed_official | 133:d4dda5c437f0 | 440 | /** |
mbed_official | 133:d4dda5c437f0 | 441 | * @brief AF 13 selection |
mbed_official | 133:d4dda5c437f0 | 442 | */ |
mbed_official | 133:d4dda5c437f0 | 443 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 444 | |
mbed_official | 133:d4dda5c437f0 | 445 | /** |
mbed_official | 133:d4dda5c437f0 | 446 | * @brief AF 15 selection |
mbed_official | 133:d4dda5c437f0 | 447 | */ |
mbed_official | 133:d4dda5c437f0 | 448 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 449 | |
mbed_official | 133:d4dda5c437f0 | 450 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
mbed_official | 133:d4dda5c437f0 | 451 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
mbed_official | 133:d4dda5c437f0 | 452 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
mbed_official | 133:d4dda5c437f0 | 453 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
mbed_official | 133:d4dda5c437f0 | 454 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
mbed_official | 133:d4dda5c437f0 | 455 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
mbed_official | 133:d4dda5c437f0 | 456 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
mbed_official | 133:d4dda5c437f0 | 457 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
mbed_official | 133:d4dda5c437f0 | 458 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
mbed_official | 133:d4dda5c437f0 | 459 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
mbed_official | 133:d4dda5c437f0 | 460 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
mbed_official | 133:d4dda5c437f0 | 461 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
mbed_official | 133:d4dda5c437f0 | 462 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
mbed_official | 133:d4dda5c437f0 | 463 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
mbed_official | 133:d4dda5c437f0 | 464 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
mbed_official | 133:d4dda5c437f0 | 465 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
mbed_official | 133:d4dda5c437f0 | 466 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
mbed_official | 133:d4dda5c437f0 | 467 | ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT)) |
mbed_official | 133:d4dda5c437f0 | 468 | |
mbed_official | 133:d4dda5c437f0 | 469 | #endif /* STM32F407xx || STM32F417xx */ |
mbed_official | 133:d4dda5c437f0 | 470 | /*------------------------------------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 471 | |
mbed_official | 133:d4dda5c437f0 | 472 | /*---------------------------------- STM32F405xx/STM32F415xx--------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 473 | #if defined (STM32F405xx) || defined (STM32F415xx) |
mbed_official | 133:d4dda5c437f0 | 474 | /** |
mbed_official | 133:d4dda5c437f0 | 475 | * @brief AF 0 selection |
mbed_official | 133:d4dda5c437f0 | 476 | */ |
mbed_official | 133:d4dda5c437f0 | 477 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 478 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 479 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 480 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 481 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 482 | |
mbed_official | 133:d4dda5c437f0 | 483 | /** |
mbed_official | 133:d4dda5c437f0 | 484 | * @brief AF 1 selection |
mbed_official | 133:d4dda5c437f0 | 485 | */ |
mbed_official | 133:d4dda5c437f0 | 486 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 487 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 488 | |
mbed_official | 133:d4dda5c437f0 | 489 | /** |
mbed_official | 133:d4dda5c437f0 | 490 | * @brief AF 2 selection |
mbed_official | 133:d4dda5c437f0 | 491 | */ |
mbed_official | 133:d4dda5c437f0 | 492 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 493 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 494 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 495 | |
mbed_official | 133:d4dda5c437f0 | 496 | /** |
mbed_official | 133:d4dda5c437f0 | 497 | * @brief AF 3 selection |
mbed_official | 133:d4dda5c437f0 | 498 | */ |
mbed_official | 133:d4dda5c437f0 | 499 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 500 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 501 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 502 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 503 | |
mbed_official | 133:d4dda5c437f0 | 504 | /** |
mbed_official | 133:d4dda5c437f0 | 505 | * @brief AF 4 selection |
mbed_official | 133:d4dda5c437f0 | 506 | */ |
mbed_official | 133:d4dda5c437f0 | 507 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 508 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 509 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 510 | |
mbed_official | 133:d4dda5c437f0 | 511 | /** |
mbed_official | 133:d4dda5c437f0 | 512 | * @brief AF 5 selection |
mbed_official | 133:d4dda5c437f0 | 513 | */ |
mbed_official | 133:d4dda5c437f0 | 514 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 515 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 516 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 517 | |
mbed_official | 133:d4dda5c437f0 | 518 | /** |
mbed_official | 133:d4dda5c437f0 | 519 | * @brief AF 6 selection |
mbed_official | 133:d4dda5c437f0 | 520 | */ |
mbed_official | 133:d4dda5c437f0 | 521 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 522 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 523 | |
mbed_official | 133:d4dda5c437f0 | 524 | /** |
mbed_official | 133:d4dda5c437f0 | 525 | * @brief AF 7 selection |
mbed_official | 133:d4dda5c437f0 | 526 | */ |
mbed_official | 133:d4dda5c437f0 | 527 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 528 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 529 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 530 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 531 | |
mbed_official | 133:d4dda5c437f0 | 532 | /** |
mbed_official | 133:d4dda5c437f0 | 533 | * @brief AF 8 selection |
mbed_official | 133:d4dda5c437f0 | 534 | */ |
mbed_official | 133:d4dda5c437f0 | 535 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 536 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 537 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 538 | |
mbed_official | 133:d4dda5c437f0 | 539 | /** |
mbed_official | 133:d4dda5c437f0 | 540 | * @brief AF 9 selection |
mbed_official | 133:d4dda5c437f0 | 541 | */ |
mbed_official | 133:d4dda5c437f0 | 542 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 543 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 544 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 545 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 546 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 547 | |
mbed_official | 133:d4dda5c437f0 | 548 | /** |
mbed_official | 133:d4dda5c437f0 | 549 | * @brief AF 10 selection |
mbed_official | 133:d4dda5c437f0 | 550 | */ |
mbed_official | 133:d4dda5c437f0 | 551 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 552 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 553 | |
mbed_official | 133:d4dda5c437f0 | 554 | /** |
mbed_official | 133:d4dda5c437f0 | 555 | * @brief AF 12 selection |
mbed_official | 133:d4dda5c437f0 | 556 | */ |
mbed_official | 133:d4dda5c437f0 | 557 | #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 558 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 559 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 560 | |
mbed_official | 133:d4dda5c437f0 | 561 | /** |
mbed_official | 133:d4dda5c437f0 | 562 | * @brief AF 15 selection |
mbed_official | 133:d4dda5c437f0 | 563 | */ |
mbed_official | 133:d4dda5c437f0 | 564 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 565 | |
mbed_official | 133:d4dda5c437f0 | 566 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
mbed_official | 133:d4dda5c437f0 | 567 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
mbed_official | 133:d4dda5c437f0 | 568 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
mbed_official | 133:d4dda5c437f0 | 569 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
mbed_official | 133:d4dda5c437f0 | 570 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
mbed_official | 133:d4dda5c437f0 | 571 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
mbed_official | 133:d4dda5c437f0 | 572 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
mbed_official | 133:d4dda5c437f0 | 573 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
mbed_official | 133:d4dda5c437f0 | 574 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
mbed_official | 133:d4dda5c437f0 | 575 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
mbed_official | 133:d4dda5c437f0 | 576 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
mbed_official | 133:d4dda5c437f0 | 577 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
mbed_official | 133:d4dda5c437f0 | 578 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
mbed_official | 133:d4dda5c437f0 | 579 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
mbed_official | 133:d4dda5c437f0 | 580 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
mbed_official | 133:d4dda5c437f0 | 581 | ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDIO) || \ |
mbed_official | 133:d4dda5c437f0 | 582 | ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT)) |
mbed_official | 133:d4dda5c437f0 | 583 | |
mbed_official | 133:d4dda5c437f0 | 584 | #endif /* STM32F405xx || STM32F415xx */ |
mbed_official | 133:d4dda5c437f0 | 585 | |
mbed_official | 133:d4dda5c437f0 | 586 | /*------------------------------------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 587 | |
mbed_official | 133:d4dda5c437f0 | 588 | /*---------------------------------------- STM32F401xx--------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 589 | #if defined(STM32F401xC) || defined(STM32F401xE) |
mbed_official | 133:d4dda5c437f0 | 590 | /** |
mbed_official | 133:d4dda5c437f0 | 591 | * @brief AF 0 selection |
mbed_official | 133:d4dda5c437f0 | 592 | */ |
mbed_official | 133:d4dda5c437f0 | 593 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 594 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 595 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 596 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 597 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 598 | |
mbed_official | 133:d4dda5c437f0 | 599 | /** |
mbed_official | 133:d4dda5c437f0 | 600 | * @brief AF 1 selection |
mbed_official | 133:d4dda5c437f0 | 601 | */ |
mbed_official | 133:d4dda5c437f0 | 602 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 603 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 604 | |
mbed_official | 133:d4dda5c437f0 | 605 | /** |
mbed_official | 133:d4dda5c437f0 | 606 | * @brief AF 2 selection |
mbed_official | 133:d4dda5c437f0 | 607 | */ |
mbed_official | 133:d4dda5c437f0 | 608 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 609 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 610 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 611 | |
mbed_official | 133:d4dda5c437f0 | 612 | /** |
mbed_official | 133:d4dda5c437f0 | 613 | * @brief AF 3 selection |
mbed_official | 133:d4dda5c437f0 | 614 | */ |
mbed_official | 133:d4dda5c437f0 | 615 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 616 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 617 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 618 | |
mbed_official | 133:d4dda5c437f0 | 619 | /** |
mbed_official | 133:d4dda5c437f0 | 620 | * @brief AF 4 selection |
mbed_official | 133:d4dda5c437f0 | 621 | */ |
mbed_official | 133:d4dda5c437f0 | 622 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 623 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 624 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 625 | |
mbed_official | 133:d4dda5c437f0 | 626 | /** |
mbed_official | 133:d4dda5c437f0 | 627 | * @brief AF 5 selection |
mbed_official | 133:d4dda5c437f0 | 628 | */ |
mbed_official | 133:d4dda5c437f0 | 629 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 630 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 631 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 632 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 633 | |
mbed_official | 133:d4dda5c437f0 | 634 | /** |
mbed_official | 133:d4dda5c437f0 | 635 | * @brief AF 6 selection |
mbed_official | 133:d4dda5c437f0 | 636 | */ |
mbed_official | 133:d4dda5c437f0 | 637 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 638 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 639 | |
mbed_official | 133:d4dda5c437f0 | 640 | /** |
mbed_official | 133:d4dda5c437f0 | 641 | * @brief AF 7 selection |
mbed_official | 133:d4dda5c437f0 | 642 | */ |
mbed_official | 133:d4dda5c437f0 | 643 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 644 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 645 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 646 | |
mbed_official | 133:d4dda5c437f0 | 647 | /** |
mbed_official | 133:d4dda5c437f0 | 648 | * @brief AF 8 selection |
mbed_official | 133:d4dda5c437f0 | 649 | */ |
mbed_official | 133:d4dda5c437f0 | 650 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 651 | |
mbed_official | 133:d4dda5c437f0 | 652 | /** |
mbed_official | 133:d4dda5c437f0 | 653 | * @brief AF 9 selection |
mbed_official | 133:d4dda5c437f0 | 654 | */ |
mbed_official | 133:d4dda5c437f0 | 655 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 656 | #define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 657 | #define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 658 | |
mbed_official | 133:d4dda5c437f0 | 659 | |
mbed_official | 133:d4dda5c437f0 | 660 | /** |
mbed_official | 133:d4dda5c437f0 | 661 | * @brief AF 10 selection |
mbed_official | 133:d4dda5c437f0 | 662 | */ |
mbed_official | 133:d4dda5c437f0 | 663 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 664 | |
mbed_official | 133:d4dda5c437f0 | 665 | /** |
mbed_official | 133:d4dda5c437f0 | 666 | * @brief AF 12 selection |
mbed_official | 133:d4dda5c437f0 | 667 | */ |
mbed_official | 133:d4dda5c437f0 | 668 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 669 | |
mbed_official | 133:d4dda5c437f0 | 670 | /** |
mbed_official | 133:d4dda5c437f0 | 671 | * @brief AF 15 selection |
mbed_official | 133:d4dda5c437f0 | 672 | */ |
mbed_official | 133:d4dda5c437f0 | 673 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 133:d4dda5c437f0 | 674 | |
mbed_official | 133:d4dda5c437f0 | 675 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
mbed_official | 133:d4dda5c437f0 | 676 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
mbed_official | 133:d4dda5c437f0 | 677 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
mbed_official | 133:d4dda5c437f0 | 678 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
mbed_official | 133:d4dda5c437f0 | 679 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
mbed_official | 133:d4dda5c437f0 | 680 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \ |
mbed_official | 133:d4dda5c437f0 | 681 | ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \ |
mbed_official | 133:d4dda5c437f0 | 682 | ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \ |
mbed_official | 133:d4dda5c437f0 | 683 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \ |
mbed_official | 133:d4dda5c437f0 | 684 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
mbed_official | 133:d4dda5c437f0 | 685 | ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \ |
mbed_official | 133:d4dda5c437f0 | 686 | ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \ |
mbed_official | 133:d4dda5c437f0 | 687 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT)) |
mbed_official | 133:d4dda5c437f0 | 688 | |
mbed_official | 133:d4dda5c437f0 | 689 | #endif /* STM32F401xC || STM32F401xE */ |
mbed_official | 133:d4dda5c437f0 | 690 | /** |
mbed_official | 133:d4dda5c437f0 | 691 | * @} |
mbed_official | 133:d4dda5c437f0 | 692 | */ |
mbed_official | 133:d4dda5c437f0 | 693 | |
mbed_official | 133:d4dda5c437f0 | 694 | /** |
mbed_official | 133:d4dda5c437f0 | 695 | * @} |
mbed_official | 133:d4dda5c437f0 | 696 | */ |
mbed_official | 133:d4dda5c437f0 | 697 | |
mbed_official | 133:d4dda5c437f0 | 698 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 699 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 133:d4dda5c437f0 | 700 | |
mbed_official | 133:d4dda5c437f0 | 701 | |
mbed_official | 133:d4dda5c437f0 | 702 | /** |
mbed_official | 133:d4dda5c437f0 | 703 | * @} |
mbed_official | 133:d4dda5c437f0 | 704 | */ |
mbed_official | 133:d4dda5c437f0 | 705 | |
mbed_official | 133:d4dda5c437f0 | 706 | /** |
mbed_official | 133:d4dda5c437f0 | 707 | * @} |
mbed_official | 133:d4dda5c437f0 | 708 | */ |
mbed_official | 133:d4dda5c437f0 | 709 | |
mbed_official | 133:d4dda5c437f0 | 710 | #ifdef __cplusplus |
mbed_official | 133:d4dda5c437f0 | 711 | } |
mbed_official | 133:d4dda5c437f0 | 712 | #endif |
mbed_official | 133:d4dda5c437f0 | 713 | |
mbed_official | 133:d4dda5c437f0 | 714 | #endif /* __STM32F4xx_HAL_GPIO_EX_H */ |
mbed_official | 133:d4dda5c437f0 | 715 | |
mbed_official | 133:d4dda5c437f0 | 716 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |