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