ads1115 only
Fork of mbed by
TARGET_NUCLEO_F411RE/stm32f4xx_hal_gpio_ex.h@99:dbbf35b96557, 2015-05-13 (annotated)
- Committer:
- Kojto
- Date:
- Wed May 13 08:08:21 2015 +0200
- Revision:
- 99:dbbf35b96557
- Parent:
- 86:04dd9b1680ae
- Child:
- 106:ba1f97679dad
Release 99 of the mbed library
Changes:
- new targets - MAXWSNENV, DISCO_L053C8
- STM32F4xx - ST Cube driver
- KSDK mcu - SPI timing fix
- Nordic - update to softdevice s130
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 86:04dd9b1680ae | 1 | /** |
bogdanm | 86:04dd9b1680ae | 2 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 3 | * @file stm32f4xx_hal_gpio_ex.h |
bogdanm | 86:04dd9b1680ae | 4 | * @author MCD Application Team |
Kojto | 99:dbbf35b96557 | 5 | * @version V1.3.0 |
Kojto | 99:dbbf35b96557 | 6 | * @date 09-March-2015 |
bogdanm | 86:04dd9b1680ae | 7 | * @brief Header file of GPIO HAL Extension module. |
bogdanm | 86:04dd9b1680ae | 8 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 9 | * @attention |
bogdanm | 86:04dd9b1680ae | 10 | * |
Kojto | 99:dbbf35b96557 | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
bogdanm | 86:04dd9b1680ae | 12 | * |
bogdanm | 86:04dd9b1680ae | 13 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 86:04dd9b1680ae | 14 | * are permitted provided that the following conditions are met: |
bogdanm | 86:04dd9b1680ae | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 16 | * this list of conditions and the following disclaimer. |
bogdanm | 86:04dd9b1680ae | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 18 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 86:04dd9b1680ae | 19 | * and/or other materials provided with the distribution. |
bogdanm | 86:04dd9b1680ae | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 86:04dd9b1680ae | 21 | * may be used to endorse or promote products derived from this software |
bogdanm | 86:04dd9b1680ae | 22 | * without specific prior written permission. |
bogdanm | 86:04dd9b1680ae | 23 | * |
bogdanm | 86:04dd9b1680ae | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 86:04dd9b1680ae | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 86:04dd9b1680ae | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 86:04dd9b1680ae | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 86:04dd9b1680ae | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 86:04dd9b1680ae | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 86:04dd9b1680ae | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 86:04dd9b1680ae | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 86:04dd9b1680ae | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 86:04dd9b1680ae | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 86:04dd9b1680ae | 34 | * |
bogdanm | 86:04dd9b1680ae | 35 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 36 | */ |
bogdanm | 86:04dd9b1680ae | 37 | |
bogdanm | 86:04dd9b1680ae | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 39 | #ifndef __STM32F4xx_HAL_GPIO_EX_H |
bogdanm | 86:04dd9b1680ae | 40 | #define __STM32F4xx_HAL_GPIO_EX_H |
bogdanm | 86:04dd9b1680ae | 41 | |
bogdanm | 86:04dd9b1680ae | 42 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 43 | extern "C" { |
bogdanm | 86:04dd9b1680ae | 44 | #endif |
bogdanm | 86:04dd9b1680ae | 45 | |
bogdanm | 86:04dd9b1680ae | 46 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 47 | #include "stm32f4xx_hal_def.h" |
bogdanm | 86:04dd9b1680ae | 48 | |
bogdanm | 86:04dd9b1680ae | 49 | /** @addtogroup STM32F4xx_HAL_Driver |
bogdanm | 86:04dd9b1680ae | 50 | * @{ |
bogdanm | 86:04dd9b1680ae | 51 | */ |
bogdanm | 86:04dd9b1680ae | 52 | |
Kojto | 99:dbbf35b96557 | 53 | /** @defgroup GPIOEx GPIOEx |
bogdanm | 86:04dd9b1680ae | 54 | * @{ |
bogdanm | 86:04dd9b1680ae | 55 | */ |
bogdanm | 86:04dd9b1680ae | 56 | |
bogdanm | 86:04dd9b1680ae | 57 | /* Exported types ------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 58 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 59 | /** @defgroup GPIOEx_Exported_Constants GPIO Exported Constants |
bogdanm | 86:04dd9b1680ae | 60 | * @{ |
bogdanm | 86:04dd9b1680ae | 61 | */ |
bogdanm | 86:04dd9b1680ae | 62 | |
Kojto | 99:dbbf35b96557 | 63 | /** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection |
Kojto | 99:dbbf35b96557 | 64 | * @{ |
Kojto | 99:dbbf35b96557 | 65 | */ |
Kojto | 99:dbbf35b96557 | 66 | |
Kojto | 99:dbbf35b96557 | 67 | /*------------------------------------------ STM32F429xx/STM32F439xx --------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 68 | #if defined (STM32F429xx) || defined (STM32F439xx) |
bogdanm | 86:04dd9b1680ae | 69 | /** |
bogdanm | 86:04dd9b1680ae | 70 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 71 | */ |
bogdanm | 86:04dd9b1680ae | 72 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 73 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 74 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 75 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 76 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 77 | |
bogdanm | 86:04dd9b1680ae | 78 | /** |
bogdanm | 86:04dd9b1680ae | 79 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 80 | */ |
bogdanm | 86:04dd9b1680ae | 81 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 82 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 83 | |
bogdanm | 86:04dd9b1680ae | 84 | /** |
bogdanm | 86:04dd9b1680ae | 85 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 86 | */ |
bogdanm | 86:04dd9b1680ae | 87 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 88 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 89 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 90 | |
bogdanm | 86:04dd9b1680ae | 91 | /** |
bogdanm | 86:04dd9b1680ae | 92 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 93 | */ |
bogdanm | 86:04dd9b1680ae | 94 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 95 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 96 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 97 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 98 | |
bogdanm | 86:04dd9b1680ae | 99 | /** |
bogdanm | 86:04dd9b1680ae | 100 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 101 | */ |
bogdanm | 86:04dd9b1680ae | 102 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 103 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 104 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 105 | |
bogdanm | 86:04dd9b1680ae | 106 | /** |
bogdanm | 86:04dd9b1680ae | 107 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 108 | */ |
bogdanm | 86:04dd9b1680ae | 109 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 110 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 111 | #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 112 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 113 | #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 114 | #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 115 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 116 | |
bogdanm | 86:04dd9b1680ae | 117 | /** |
bogdanm | 86:04dd9b1680ae | 118 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 119 | */ |
bogdanm | 86:04dd9b1680ae | 120 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 121 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 122 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 123 | |
bogdanm | 86:04dd9b1680ae | 124 | /** |
bogdanm | 86:04dd9b1680ae | 125 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 126 | */ |
bogdanm | 86:04dd9b1680ae | 127 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 128 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 129 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 130 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 131 | |
bogdanm | 86:04dd9b1680ae | 132 | /** |
bogdanm | 86:04dd9b1680ae | 133 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 134 | */ |
bogdanm | 86:04dd9b1680ae | 135 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 136 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 137 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 138 | #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 139 | #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 140 | |
bogdanm | 86:04dd9b1680ae | 141 | /** |
bogdanm | 86:04dd9b1680ae | 142 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 143 | */ |
bogdanm | 86:04dd9b1680ae | 144 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 145 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 146 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 147 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 148 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 149 | #define GPIO_AF9_LTDC ((uint8_t)0x09) /* LCD-TFT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 150 | |
bogdanm | 86:04dd9b1680ae | 151 | /** |
bogdanm | 86:04dd9b1680ae | 152 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 153 | */ |
bogdanm | 86:04dd9b1680ae | 154 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 155 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 156 | |
bogdanm | 86:04dd9b1680ae | 157 | /** |
bogdanm | 86:04dd9b1680ae | 158 | * @brief AF 11 selection |
bogdanm | 86:04dd9b1680ae | 159 | */ |
bogdanm | 86:04dd9b1680ae | 160 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 161 | |
bogdanm | 86:04dd9b1680ae | 162 | /** |
bogdanm | 86:04dd9b1680ae | 163 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 164 | */ |
bogdanm | 86:04dd9b1680ae | 165 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 166 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 167 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 168 | |
bogdanm | 86:04dd9b1680ae | 169 | /** |
bogdanm | 86:04dd9b1680ae | 170 | * @brief AF 13 selection |
bogdanm | 86:04dd9b1680ae | 171 | */ |
bogdanm | 86:04dd9b1680ae | 172 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 173 | |
bogdanm | 86:04dd9b1680ae | 174 | /** |
bogdanm | 86:04dd9b1680ae | 175 | * @brief AF 14 selection |
bogdanm | 86:04dd9b1680ae | 176 | */ |
bogdanm | 86:04dd9b1680ae | 177 | #define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LCD-TFT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 178 | |
bogdanm | 86:04dd9b1680ae | 179 | /** |
bogdanm | 86:04dd9b1680ae | 180 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 181 | */ |
bogdanm | 86:04dd9b1680ae | 182 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 183 | #endif /* STM32F429xx || STM32F439xx */ |
bogdanm | 86:04dd9b1680ae | 184 | /*------------------------------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 185 | |
bogdanm | 86:04dd9b1680ae | 186 | /*---------------------------------- STM32F427xx/STM32F437xx--------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 187 | #if defined (STM32F427xx) || defined (STM32F437xx) |
bogdanm | 86:04dd9b1680ae | 188 | /** |
bogdanm | 86:04dd9b1680ae | 189 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 190 | */ |
bogdanm | 86:04dd9b1680ae | 191 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 192 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 193 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 194 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 195 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 196 | |
bogdanm | 86:04dd9b1680ae | 197 | /** |
bogdanm | 86:04dd9b1680ae | 198 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 199 | */ |
bogdanm | 86:04dd9b1680ae | 200 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 201 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 202 | |
bogdanm | 86:04dd9b1680ae | 203 | /** |
bogdanm | 86:04dd9b1680ae | 204 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 205 | */ |
bogdanm | 86:04dd9b1680ae | 206 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 207 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 208 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 209 | |
bogdanm | 86:04dd9b1680ae | 210 | /** |
bogdanm | 86:04dd9b1680ae | 211 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 212 | */ |
bogdanm | 86:04dd9b1680ae | 213 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 214 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 215 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 216 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 217 | |
bogdanm | 86:04dd9b1680ae | 218 | /** |
bogdanm | 86:04dd9b1680ae | 219 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 220 | */ |
bogdanm | 86:04dd9b1680ae | 221 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 222 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 223 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 224 | |
bogdanm | 86:04dd9b1680ae | 225 | /** |
bogdanm | 86:04dd9b1680ae | 226 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 227 | */ |
bogdanm | 86:04dd9b1680ae | 228 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 229 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 230 | #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 231 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 232 | #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 233 | #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 234 | /** @brief GPIO_Legacy |
Kojto | 99:dbbf35b96557 | 235 | */ |
Kojto | 99:dbbf35b96557 | 236 | #define GPIO_AF5_I2S3ext GPIO_AF5_SPI3 /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 237 | |
bogdanm | 86:04dd9b1680ae | 238 | /** |
bogdanm | 86:04dd9b1680ae | 239 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 240 | */ |
bogdanm | 86:04dd9b1680ae | 241 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 242 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 243 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 244 | |
bogdanm | 86:04dd9b1680ae | 245 | /** |
bogdanm | 86:04dd9b1680ae | 246 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 247 | */ |
bogdanm | 86:04dd9b1680ae | 248 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 249 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 250 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 251 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 252 | |
bogdanm | 86:04dd9b1680ae | 253 | /** |
bogdanm | 86:04dd9b1680ae | 254 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 255 | */ |
bogdanm | 86:04dd9b1680ae | 256 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 257 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 258 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 259 | #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 260 | #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 261 | |
bogdanm | 86:04dd9b1680ae | 262 | /** |
bogdanm | 86:04dd9b1680ae | 263 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 264 | */ |
bogdanm | 86:04dd9b1680ae | 265 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 266 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 267 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 268 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 269 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 270 | |
bogdanm | 86:04dd9b1680ae | 271 | /** |
bogdanm | 86:04dd9b1680ae | 272 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 273 | */ |
bogdanm | 86:04dd9b1680ae | 274 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 275 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 276 | |
bogdanm | 86:04dd9b1680ae | 277 | /** |
bogdanm | 86:04dd9b1680ae | 278 | * @brief AF 11 selection |
bogdanm | 86:04dd9b1680ae | 279 | */ |
bogdanm | 86:04dd9b1680ae | 280 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 281 | |
bogdanm | 86:04dd9b1680ae | 282 | /** |
bogdanm | 86:04dd9b1680ae | 283 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 284 | */ |
bogdanm | 86:04dd9b1680ae | 285 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 286 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 287 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 288 | |
bogdanm | 86:04dd9b1680ae | 289 | /** |
bogdanm | 86:04dd9b1680ae | 290 | * @brief AF 13 selection |
bogdanm | 86:04dd9b1680ae | 291 | */ |
bogdanm | 86:04dd9b1680ae | 292 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 293 | |
bogdanm | 86:04dd9b1680ae | 294 | /** |
bogdanm | 86:04dd9b1680ae | 295 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 296 | */ |
bogdanm | 86:04dd9b1680ae | 297 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 298 | #endif /* STM32F427xx || STM32F437xx */ |
bogdanm | 86:04dd9b1680ae | 299 | /*------------------------------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 300 | |
bogdanm | 86:04dd9b1680ae | 301 | /*---------------------------------- STM32F407xx/STM32F417xx--------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 302 | #if defined (STM32F407xx) || defined (STM32F417xx) |
bogdanm | 86:04dd9b1680ae | 303 | /** |
bogdanm | 86:04dd9b1680ae | 304 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 305 | */ |
bogdanm | 86:04dd9b1680ae | 306 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 307 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 308 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 309 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 310 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 311 | |
bogdanm | 86:04dd9b1680ae | 312 | /** |
bogdanm | 86:04dd9b1680ae | 313 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 314 | */ |
bogdanm | 86:04dd9b1680ae | 315 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 316 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 317 | |
bogdanm | 86:04dd9b1680ae | 318 | /** |
bogdanm | 86:04dd9b1680ae | 319 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 320 | */ |
bogdanm | 86:04dd9b1680ae | 321 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 322 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 323 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 324 | |
bogdanm | 86:04dd9b1680ae | 325 | /** |
bogdanm | 86:04dd9b1680ae | 326 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 327 | */ |
bogdanm | 86:04dd9b1680ae | 328 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 329 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 330 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 331 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 332 | |
bogdanm | 86:04dd9b1680ae | 333 | /** |
bogdanm | 86:04dd9b1680ae | 334 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 335 | */ |
bogdanm | 86:04dd9b1680ae | 336 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 337 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 338 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 339 | |
bogdanm | 86:04dd9b1680ae | 340 | /** |
bogdanm | 86:04dd9b1680ae | 341 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 342 | */ |
bogdanm | 86:04dd9b1680ae | 343 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 344 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 345 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 346 | |
bogdanm | 86:04dd9b1680ae | 347 | /** |
bogdanm | 86:04dd9b1680ae | 348 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 349 | */ |
bogdanm | 86:04dd9b1680ae | 350 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 351 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 352 | |
bogdanm | 86:04dd9b1680ae | 353 | /** |
bogdanm | 86:04dd9b1680ae | 354 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 355 | */ |
bogdanm | 86:04dd9b1680ae | 356 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 357 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 358 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 359 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 360 | |
bogdanm | 86:04dd9b1680ae | 361 | /** |
bogdanm | 86:04dd9b1680ae | 362 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 363 | */ |
bogdanm | 86:04dd9b1680ae | 364 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 365 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 366 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 367 | |
bogdanm | 86:04dd9b1680ae | 368 | /** |
bogdanm | 86:04dd9b1680ae | 369 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 370 | */ |
bogdanm | 86:04dd9b1680ae | 371 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 372 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 373 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 374 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 375 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 376 | |
bogdanm | 86:04dd9b1680ae | 377 | /** |
bogdanm | 86:04dd9b1680ae | 378 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 379 | */ |
bogdanm | 86:04dd9b1680ae | 380 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 381 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 382 | |
bogdanm | 86:04dd9b1680ae | 383 | /** |
bogdanm | 86:04dd9b1680ae | 384 | * @brief AF 11 selection |
bogdanm | 86:04dd9b1680ae | 385 | */ |
bogdanm | 86:04dd9b1680ae | 386 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 387 | |
bogdanm | 86:04dd9b1680ae | 388 | /** |
bogdanm | 86:04dd9b1680ae | 389 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 390 | */ |
bogdanm | 86:04dd9b1680ae | 391 | #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 392 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 393 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 394 | |
bogdanm | 86:04dd9b1680ae | 395 | /** |
bogdanm | 86:04dd9b1680ae | 396 | * @brief AF 13 selection |
bogdanm | 86:04dd9b1680ae | 397 | */ |
bogdanm | 86:04dd9b1680ae | 398 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 399 | |
bogdanm | 86:04dd9b1680ae | 400 | /** |
bogdanm | 86:04dd9b1680ae | 401 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 402 | */ |
bogdanm | 86:04dd9b1680ae | 403 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 404 | #endif /* STM32F407xx || STM32F417xx */ |
bogdanm | 86:04dd9b1680ae | 405 | /*------------------------------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 406 | |
bogdanm | 86:04dd9b1680ae | 407 | /*---------------------------------- STM32F405xx/STM32F415xx--------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 408 | #if defined (STM32F405xx) || defined (STM32F415xx) |
bogdanm | 86:04dd9b1680ae | 409 | /** |
bogdanm | 86:04dd9b1680ae | 410 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 411 | */ |
bogdanm | 86:04dd9b1680ae | 412 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 413 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 414 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 415 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 416 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 417 | |
bogdanm | 86:04dd9b1680ae | 418 | /** |
bogdanm | 86:04dd9b1680ae | 419 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 420 | */ |
bogdanm | 86:04dd9b1680ae | 421 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 422 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 423 | |
bogdanm | 86:04dd9b1680ae | 424 | /** |
bogdanm | 86:04dd9b1680ae | 425 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 426 | */ |
bogdanm | 86:04dd9b1680ae | 427 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 428 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 429 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 430 | |
bogdanm | 86:04dd9b1680ae | 431 | /** |
bogdanm | 86:04dd9b1680ae | 432 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 433 | */ |
bogdanm | 86:04dd9b1680ae | 434 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 435 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 436 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 437 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 438 | |
bogdanm | 86:04dd9b1680ae | 439 | /** |
bogdanm | 86:04dd9b1680ae | 440 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 441 | */ |
bogdanm | 86:04dd9b1680ae | 442 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 443 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 444 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 445 | |
bogdanm | 86:04dd9b1680ae | 446 | /** |
bogdanm | 86:04dd9b1680ae | 447 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 448 | */ |
bogdanm | 86:04dd9b1680ae | 449 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 450 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 451 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 452 | |
bogdanm | 86:04dd9b1680ae | 453 | /** |
bogdanm | 86:04dd9b1680ae | 454 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 455 | */ |
bogdanm | 86:04dd9b1680ae | 456 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 457 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 458 | |
bogdanm | 86:04dd9b1680ae | 459 | /** |
bogdanm | 86:04dd9b1680ae | 460 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 461 | */ |
bogdanm | 86:04dd9b1680ae | 462 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 463 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 464 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 465 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 466 | |
bogdanm | 86:04dd9b1680ae | 467 | /** |
bogdanm | 86:04dd9b1680ae | 468 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 469 | */ |
bogdanm | 86:04dd9b1680ae | 470 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 471 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 472 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 473 | |
bogdanm | 86:04dd9b1680ae | 474 | /** |
bogdanm | 86:04dd9b1680ae | 475 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 476 | */ |
bogdanm | 86:04dd9b1680ae | 477 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 478 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 479 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 480 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 481 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 482 | |
bogdanm | 86:04dd9b1680ae | 483 | /** |
bogdanm | 86:04dd9b1680ae | 484 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 485 | */ |
bogdanm | 86:04dd9b1680ae | 486 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 487 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 488 | |
bogdanm | 86:04dd9b1680ae | 489 | /** |
bogdanm | 86:04dd9b1680ae | 490 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 491 | */ |
bogdanm | 86:04dd9b1680ae | 492 | #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 493 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 494 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 495 | |
bogdanm | 86:04dd9b1680ae | 496 | /** |
bogdanm | 86:04dd9b1680ae | 497 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 498 | */ |
bogdanm | 86:04dd9b1680ae | 499 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 500 | #endif /* STM32F405xx || STM32F415xx */ |
bogdanm | 86:04dd9b1680ae | 501 | |
bogdanm | 86:04dd9b1680ae | 502 | /*------------------------------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 503 | |
bogdanm | 86:04dd9b1680ae | 504 | /*---------------------------------------- STM32F401xx--------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 505 | #if defined(STM32F401xC) || defined(STM32F401xE) |
bogdanm | 86:04dd9b1680ae | 506 | /** |
bogdanm | 86:04dd9b1680ae | 507 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 508 | */ |
bogdanm | 86:04dd9b1680ae | 509 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 510 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 511 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 512 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 513 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 514 | |
bogdanm | 86:04dd9b1680ae | 515 | /** |
bogdanm | 86:04dd9b1680ae | 516 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 517 | */ |
bogdanm | 86:04dd9b1680ae | 518 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 519 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 520 | |
bogdanm | 86:04dd9b1680ae | 521 | /** |
bogdanm | 86:04dd9b1680ae | 522 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 523 | */ |
bogdanm | 86:04dd9b1680ae | 524 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 525 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 526 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 527 | |
bogdanm | 86:04dd9b1680ae | 528 | /** |
bogdanm | 86:04dd9b1680ae | 529 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 530 | */ |
bogdanm | 86:04dd9b1680ae | 531 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 532 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 533 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 534 | |
bogdanm | 86:04dd9b1680ae | 535 | /** |
bogdanm | 86:04dd9b1680ae | 536 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 537 | */ |
bogdanm | 86:04dd9b1680ae | 538 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 539 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 540 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 541 | |
bogdanm | 86:04dd9b1680ae | 542 | /** |
bogdanm | 86:04dd9b1680ae | 543 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 544 | */ |
bogdanm | 86:04dd9b1680ae | 545 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 546 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 547 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 548 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 549 | |
bogdanm | 86:04dd9b1680ae | 550 | /** |
bogdanm | 86:04dd9b1680ae | 551 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 552 | */ |
bogdanm | 86:04dd9b1680ae | 553 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 554 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 555 | |
bogdanm | 86:04dd9b1680ae | 556 | /** |
bogdanm | 86:04dd9b1680ae | 557 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 558 | */ |
bogdanm | 86:04dd9b1680ae | 559 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 560 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 561 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 562 | |
bogdanm | 86:04dd9b1680ae | 563 | /** |
bogdanm | 86:04dd9b1680ae | 564 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 565 | */ |
bogdanm | 86:04dd9b1680ae | 566 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 567 | |
bogdanm | 86:04dd9b1680ae | 568 | /** |
bogdanm | 86:04dd9b1680ae | 569 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 570 | */ |
bogdanm | 86:04dd9b1680ae | 571 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 572 | #define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 573 | #define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 574 | |
bogdanm | 86:04dd9b1680ae | 575 | |
bogdanm | 86:04dd9b1680ae | 576 | /** |
bogdanm | 86:04dd9b1680ae | 577 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 578 | */ |
bogdanm | 86:04dd9b1680ae | 579 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 580 | |
bogdanm | 86:04dd9b1680ae | 581 | /** |
bogdanm | 86:04dd9b1680ae | 582 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 583 | */ |
bogdanm | 86:04dd9b1680ae | 584 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 585 | |
bogdanm | 86:04dd9b1680ae | 586 | /** |
bogdanm | 86:04dd9b1680ae | 587 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 588 | */ |
bogdanm | 86:04dd9b1680ae | 589 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 590 | #endif /* STM32F401xC || STM32F401xE */ |
bogdanm | 86:04dd9b1680ae | 591 | /*------------------------------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 592 | |
bogdanm | 86:04dd9b1680ae | 593 | /*---------------------------------------- STM32F411xx--------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 594 | #if defined(STM32F411xE) |
bogdanm | 86:04dd9b1680ae | 595 | /** |
bogdanm | 86:04dd9b1680ae | 596 | * @brief AF 0 selection |
bogdanm | 86:04dd9b1680ae | 597 | */ |
bogdanm | 86:04dd9b1680ae | 598 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 599 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 600 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 601 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 602 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 603 | |
bogdanm | 86:04dd9b1680ae | 604 | /** |
bogdanm | 86:04dd9b1680ae | 605 | * @brief AF 1 selection |
bogdanm | 86:04dd9b1680ae | 606 | */ |
bogdanm | 86:04dd9b1680ae | 607 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 608 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 609 | |
bogdanm | 86:04dd9b1680ae | 610 | /** |
bogdanm | 86:04dd9b1680ae | 611 | * @brief AF 2 selection |
bogdanm | 86:04dd9b1680ae | 612 | */ |
bogdanm | 86:04dd9b1680ae | 613 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 614 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 615 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 616 | |
bogdanm | 86:04dd9b1680ae | 617 | /** |
bogdanm | 86:04dd9b1680ae | 618 | * @brief AF 3 selection |
bogdanm | 86:04dd9b1680ae | 619 | */ |
bogdanm | 86:04dd9b1680ae | 620 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 621 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 622 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 623 | |
bogdanm | 86:04dd9b1680ae | 624 | /** |
bogdanm | 86:04dd9b1680ae | 625 | * @brief AF 4 selection |
bogdanm | 86:04dd9b1680ae | 626 | */ |
bogdanm | 86:04dd9b1680ae | 627 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 628 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 629 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 630 | |
bogdanm | 86:04dd9b1680ae | 631 | /** |
bogdanm | 86:04dd9b1680ae | 632 | * @brief AF 5 selection |
bogdanm | 86:04dd9b1680ae | 633 | */ |
bogdanm | 86:04dd9b1680ae | 634 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1/I2S1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 635 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 636 | #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 637 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 638 | #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 639 | |
bogdanm | 86:04dd9b1680ae | 640 | /** |
bogdanm | 86:04dd9b1680ae | 641 | * @brief AF 6 selection |
bogdanm | 86:04dd9b1680ae | 642 | */ |
bogdanm | 86:04dd9b1680ae | 643 | #define GPIO_AF6_SPI2 ((uint8_t)0x06) /* I2S2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 644 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 645 | #define GPIO_AF6_SPI4 ((uint8_t)0x06) /* SPI4/I2S4 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 646 | #define GPIO_AF6_SPI5 ((uint8_t)0x06) /* SPI5/I2S5 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 647 | #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 648 | /** |
bogdanm | 86:04dd9b1680ae | 649 | * @brief AF 7 selection |
bogdanm | 86:04dd9b1680ae | 650 | */ |
bogdanm | 86:04dd9b1680ae | 651 | #define GPIO_AF7_SPI3 ((uint8_t)0x07) /* SPI3/I2S3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 652 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 653 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 654 | #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 655 | |
bogdanm | 86:04dd9b1680ae | 656 | /** |
bogdanm | 86:04dd9b1680ae | 657 | * @brief AF 8 selection |
bogdanm | 86:04dd9b1680ae | 658 | */ |
bogdanm | 86:04dd9b1680ae | 659 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 660 | |
bogdanm | 86:04dd9b1680ae | 661 | /** |
bogdanm | 86:04dd9b1680ae | 662 | * @brief AF 9 selection |
bogdanm | 86:04dd9b1680ae | 663 | */ |
bogdanm | 86:04dd9b1680ae | 664 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 665 | #define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 666 | #define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 667 | |
bogdanm | 86:04dd9b1680ae | 668 | |
bogdanm | 86:04dd9b1680ae | 669 | /** |
bogdanm | 86:04dd9b1680ae | 670 | * @brief AF 10 selection |
bogdanm | 86:04dd9b1680ae | 671 | */ |
bogdanm | 86:04dd9b1680ae | 672 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 673 | |
bogdanm | 86:04dd9b1680ae | 674 | /** |
bogdanm | 86:04dd9b1680ae | 675 | * @brief AF 12 selection |
bogdanm | 86:04dd9b1680ae | 676 | */ |
bogdanm | 86:04dd9b1680ae | 677 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 678 | |
bogdanm | 86:04dd9b1680ae | 679 | /** |
bogdanm | 86:04dd9b1680ae | 680 | * @brief AF 15 selection |
bogdanm | 86:04dd9b1680ae | 681 | */ |
bogdanm | 86:04dd9b1680ae | 682 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 683 | #endif /* STM32F411xE */ |
Kojto | 99:dbbf35b96557 | 684 | /*---------------------------------------- STM32F446xx -------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 685 | #if defined (STM32F446xx) |
Kojto | 99:dbbf35b96557 | 686 | /** |
Kojto | 99:dbbf35b96557 | 687 | * @brief AF 0 selection |
Kojto | 99:dbbf35b96557 | 688 | */ |
Kojto | 99:dbbf35b96557 | 689 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 690 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 691 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 692 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 693 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
bogdanm | 86:04dd9b1680ae | 694 | |
Kojto | 99:dbbf35b96557 | 695 | /** |
Kojto | 99:dbbf35b96557 | 696 | * @brief AF 1 selection |
Kojto | 99:dbbf35b96557 | 697 | */ |
Kojto | 99:dbbf35b96557 | 698 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 699 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 700 | |
Kojto | 99:dbbf35b96557 | 701 | /** |
Kojto | 99:dbbf35b96557 | 702 | * @brief AF 2 selection |
Kojto | 99:dbbf35b96557 | 703 | */ |
Kojto | 99:dbbf35b96557 | 704 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 705 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 706 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 707 | |
Kojto | 99:dbbf35b96557 | 708 | /** |
Kojto | 99:dbbf35b96557 | 709 | * @brief AF 3 selection |
Kojto | 99:dbbf35b96557 | 710 | */ |
Kojto | 99:dbbf35b96557 | 711 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 712 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 713 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 714 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 715 | #define GPIO_AF3_CEC ((uint8_t)0x03) /* CEC Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 716 | |
Kojto | 99:dbbf35b96557 | 717 | /** |
Kojto | 99:dbbf35b96557 | 718 | * @brief AF 4 selection |
Kojto | 99:dbbf35b96557 | 719 | */ |
Kojto | 99:dbbf35b96557 | 720 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 721 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 722 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 723 | #define GPIO_AF4_FMPI2C1 ((uint8_t)0x04) /* FMPI2C1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 724 | #define GPIO_AF4_CEC ((uint8_t)0x04) /* CEC Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 725 | |
Kojto | 99:dbbf35b96557 | 726 | /** |
Kojto | 99:dbbf35b96557 | 727 | * @brief AF 5 selection |
Kojto | 99:dbbf35b96557 | 728 | */ |
Kojto | 99:dbbf35b96557 | 729 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1/I2S1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 730 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 731 | #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 732 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 733 | |
Kojto | 99:dbbf35b96557 | 734 | /** |
Kojto | 99:dbbf35b96557 | 735 | * @brief AF 6 selection |
Kojto | 99:dbbf35b96557 | 736 | */ |
Kojto | 99:dbbf35b96557 | 737 | #define GPIO_AF6_SPI2 ((uint8_t)0x06) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 738 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 739 | #define GPIO_AF6_SPI4 ((uint8_t)0x06) /* SPI4 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 740 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 741 | |
Kojto | 99:dbbf35b96557 | 742 | /** |
Kojto | 99:dbbf35b96557 | 743 | * @brief AF 7 selection |
Kojto | 99:dbbf35b96557 | 744 | */ |
Kojto | 99:dbbf35b96557 | 745 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 746 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 747 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 748 | #define GPIO_AF7_UART5 ((uint8_t)0x07) /* UART5 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 749 | #define GPIO_AF7_SPI2 ((uint8_t)0x07) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 750 | #define GPIO_AF7_SPI3 ((uint8_t)0x07) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 751 | #define GPIO_AF7_SPDIFRX ((uint8_t)0x07) /* SPDIFRX Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 752 | |
Kojto | 99:dbbf35b96557 | 753 | /** |
Kojto | 99:dbbf35b96557 | 754 | * @brief AF 8 selection |
Kojto | 99:dbbf35b96557 | 755 | */ |
Kojto | 99:dbbf35b96557 | 756 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 757 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 758 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 759 | #define GPIO_AF8_SPDIFRX ((uint8_t)0x08) /* SPDIFRX Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 760 | #define GPIO_AF8_SAI2 ((uint8_t)0x08) /* SAI2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 761 | |
Kojto | 99:dbbf35b96557 | 762 | /** |
Kojto | 99:dbbf35b96557 | 763 | * @brief AF 9 selection |
Kojto | 99:dbbf35b96557 | 764 | */ |
Kojto | 99:dbbf35b96557 | 765 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 766 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 767 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 768 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 769 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 770 | #define GPIO_AF9_QSPI ((uint8_t)0x09) /* QSPI Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 771 | |
Kojto | 99:dbbf35b96557 | 772 | /** |
Kojto | 99:dbbf35b96557 | 773 | * @brief AF 10 selection |
Kojto | 99:dbbf35b96557 | 774 | */ |
Kojto | 99:dbbf35b96557 | 775 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 776 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 777 | #define GPIO_AF10_SAI2 ((uint8_t)0xA) /* SAI2 Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 778 | #define GPIO_AF10_QSPI ((uint8_t)0xA) /* QSPI Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 779 | |
Kojto | 99:dbbf35b96557 | 780 | /** |
Kojto | 99:dbbf35b96557 | 781 | * @brief AF 11 selection |
Kojto | 99:dbbf35b96557 | 782 | */ |
Kojto | 99:dbbf35b96557 | 783 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 784 | |
Kojto | 99:dbbf35b96557 | 785 | /** |
Kojto | 99:dbbf35b96557 | 786 | * @brief AF 12 selection |
Kojto | 99:dbbf35b96557 | 787 | */ |
Kojto | 99:dbbf35b96557 | 788 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 789 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 790 | #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 791 | |
Kojto | 99:dbbf35b96557 | 792 | /** |
Kojto | 99:dbbf35b96557 | 793 | * @brief AF 13 selection |
Kojto | 99:dbbf35b96557 | 794 | */ |
Kojto | 99:dbbf35b96557 | 795 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 796 | |
Kojto | 99:dbbf35b96557 | 797 | /** |
Kojto | 99:dbbf35b96557 | 798 | * @brief AF 15 selection |
Kojto | 99:dbbf35b96557 | 799 | */ |
Kojto | 99:dbbf35b96557 | 800 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
Kojto | 99:dbbf35b96557 | 801 | |
Kojto | 99:dbbf35b96557 | 802 | #endif /* STM32F446xx */ |
Kojto | 99:dbbf35b96557 | 803 | |
Kojto | 99:dbbf35b96557 | 804 | /** |
Kojto | 99:dbbf35b96557 | 805 | * @} |
Kojto | 99:dbbf35b96557 | 806 | */ |
Kojto | 99:dbbf35b96557 | 807 | |
Kojto | 99:dbbf35b96557 | 808 | /** |
Kojto | 99:dbbf35b96557 | 809 | * @} |
Kojto | 99:dbbf35b96557 | 810 | */ |
Kojto | 99:dbbf35b96557 | 811 | |
Kojto | 99:dbbf35b96557 | 812 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 813 | /** @defgroup GPIOEx_Exported_Macros GPIO Exported Macros |
Kojto | 99:dbbf35b96557 | 814 | * @{ |
Kojto | 99:dbbf35b96557 | 815 | */ |
Kojto | 99:dbbf35b96557 | 816 | /** |
Kojto | 99:dbbf35b96557 | 817 | * @} |
Kojto | 99:dbbf35b96557 | 818 | */ |
Kojto | 99:dbbf35b96557 | 819 | |
Kojto | 99:dbbf35b96557 | 820 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 821 | /** @defgroup GPIOEx_Exported_Functions GPIO Exported Functions |
Kojto | 99:dbbf35b96557 | 822 | * @{ |
Kojto | 99:dbbf35b96557 | 823 | */ |
Kojto | 99:dbbf35b96557 | 824 | /** |
Kojto | 99:dbbf35b96557 | 825 | * @} |
Kojto | 99:dbbf35b96557 | 826 | */ |
Kojto | 99:dbbf35b96557 | 827 | |
Kojto | 99:dbbf35b96557 | 828 | /* Private types -------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 829 | /* Private variables ---------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 830 | /* Private constants ---------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 831 | /** @defgroup GPIOEx_Private_Constants GPIO Private Constants |
Kojto | 99:dbbf35b96557 | 832 | * @{ |
Kojto | 99:dbbf35b96557 | 833 | */ |
Kojto | 99:dbbf35b96557 | 834 | /** |
Kojto | 99:dbbf35b96557 | 835 | * @} |
Kojto | 99:dbbf35b96557 | 836 | */ |
Kojto | 99:dbbf35b96557 | 837 | |
Kojto | 99:dbbf35b96557 | 838 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 839 | /** @defgroup GPIOEx_Private_Macros GPIO Private Macros |
Kojto | 99:dbbf35b96557 | 840 | * @{ |
Kojto | 99:dbbf35b96557 | 841 | */ |
Kojto | 99:dbbf35b96557 | 842 | /** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index |
Kojto | 99:dbbf35b96557 | 843 | * @{ |
Kojto | 99:dbbf35b96557 | 844 | */ |
Kojto | 99:dbbf35b96557 | 845 | #if defined (STM32F405xx) || defined (STM32F415xx) || defined (STM32F407xx) || defined (STM32F417xx) |
Kojto | 99:dbbf35b96557 | 846 | #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\ |
Kojto | 99:dbbf35b96557 | 847 | ((__GPIOx__) == (GPIOB))? 1U :\ |
Kojto | 99:dbbf35b96557 | 848 | ((__GPIOx__) == (GPIOC))? 2U :\ |
Kojto | 99:dbbf35b96557 | 849 | ((__GPIOx__) == (GPIOD))? 3U :\ |
Kojto | 99:dbbf35b96557 | 850 | ((__GPIOx__) == (GPIOE))? 4U :\ |
Kojto | 99:dbbf35b96557 | 851 | ((__GPIOx__) == (GPIOF))? 5U :\ |
Kojto | 99:dbbf35b96557 | 852 | ((__GPIOx__) == (GPIOG))? 6U :\ |
Kojto | 99:dbbf35b96557 | 853 | ((__GPIOx__) == (GPIOH))? 7U :\ |
Kojto | 99:dbbf35b96557 | 854 | ((__GPIOx__) == (GPIOI))? 8U : 9U) |
Kojto | 99:dbbf35b96557 | 855 | #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */ |
Kojto | 99:dbbf35b96557 | 856 | |
Kojto | 99:dbbf35b96557 | 857 | #if defined (STM32F427xx) || defined (STM32F437xx) || defined (STM32F429xx) || defined (STM32F439xx) |
Kojto | 99:dbbf35b96557 | 858 | #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\ |
Kojto | 99:dbbf35b96557 | 859 | ((__GPIOx__) == (GPIOB))? 1U :\ |
Kojto | 99:dbbf35b96557 | 860 | ((__GPIOx__) == (GPIOC))? 2U :\ |
Kojto | 99:dbbf35b96557 | 861 | ((__GPIOx__) == (GPIOD))? 3U :\ |
Kojto | 99:dbbf35b96557 | 862 | ((__GPIOx__) == (GPIOE))? 4U :\ |
Kojto | 99:dbbf35b96557 | 863 | ((__GPIOx__) == (GPIOF))? 5U :\ |
Kojto | 99:dbbf35b96557 | 864 | ((__GPIOx__) == (GPIOG))? 6U :\ |
Kojto | 99:dbbf35b96557 | 865 | ((__GPIOx__) == (GPIOH))? 7U :\ |
Kojto | 99:dbbf35b96557 | 866 | ((__GPIOx__) == (GPIOI))? 8U :\ |
Kojto | 99:dbbf35b96557 | 867 | ((__GPIOx__) == (GPIOJ))? 9U : 10U) |
Kojto | 99:dbbf35b96557 | 868 | #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ |
Kojto | 99:dbbf35b96557 | 869 | |
Kojto | 99:dbbf35b96557 | 870 | #if defined (STM32F401xC) || defined (STM32F401xE) || defined (STM32F411xE) |
Kojto | 99:dbbf35b96557 | 871 | #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\ |
Kojto | 99:dbbf35b96557 | 872 | ((__GPIOx__) == (GPIOB))? 1U :\ |
Kojto | 99:dbbf35b96557 | 873 | ((__GPIOx__) == (GPIOC))? 2U :\ |
Kojto | 99:dbbf35b96557 | 874 | ((__GPIOx__) == (GPIOD))? 3U :\ |
Kojto | 99:dbbf35b96557 | 875 | ((__GPIOx__) == (GPIOE))? 4U : 5U) |
Kojto | 99:dbbf35b96557 | 876 | #endif /* STM32F401xC || STM32F401xE || STM32F411xE */ |
Kojto | 99:dbbf35b96557 | 877 | |
Kojto | 99:dbbf35b96557 | 878 | #if defined (STM32F446xx) |
Kojto | 99:dbbf35b96557 | 879 | #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\ |
Kojto | 99:dbbf35b96557 | 880 | ((__GPIOx__) == (GPIOB))? 1U :\ |
Kojto | 99:dbbf35b96557 | 881 | ((__GPIOx__) == (GPIOC))? 2U :\ |
Kojto | 99:dbbf35b96557 | 882 | ((__GPIOx__) == (GPIOD))? 3U :\ |
Kojto | 99:dbbf35b96557 | 883 | ((__GPIOx__) == (GPIOE))? 4U :\ |
Kojto | 99:dbbf35b96557 | 884 | ((__GPIOx__) == (GPIOF))? 5U :\ |
Kojto | 99:dbbf35b96557 | 885 | ((__GPIOx__) == (GPIOG))? 6U : 8U) |
Kojto | 99:dbbf35b96557 | 886 | #endif /* STM32F446xx */ |
Kojto | 99:dbbf35b96557 | 887 | |
Kojto | 99:dbbf35b96557 | 888 | /** |
Kojto | 99:dbbf35b96557 | 889 | * @} |
Kojto | 99:dbbf35b96557 | 890 | */ |
Kojto | 99:dbbf35b96557 | 891 | |
Kojto | 99:dbbf35b96557 | 892 | /** @defgroup GPIOEx_IS_Alternat_function_selection GPIO Check Alternate Function |
Kojto | 99:dbbf35b96557 | 893 | * @{ |
Kojto | 99:dbbf35b96557 | 894 | */ |
Kojto | 99:dbbf35b96557 | 895 | /*------------------------- STM32F429xx/STM32F439xx---------------------------*/ |
Kojto | 99:dbbf35b96557 | 896 | #if defined (STM32F429xx) || defined (STM32F439xx) |
Kojto | 99:dbbf35b96557 | 897 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 898 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 899 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 900 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 901 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 902 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 99:dbbf35b96557 | 903 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 99:dbbf35b96557 | 904 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
Kojto | 99:dbbf35b96557 | 905 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
Kojto | 99:dbbf35b96557 | 906 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 99:dbbf35b96557 | 907 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 908 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
Kojto | 99:dbbf35b96557 | 909 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 99:dbbf35b96557 | 910 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 99:dbbf35b96557 | 911 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
Kojto | 99:dbbf35b96557 | 912 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
Kojto | 99:dbbf35b96557 | 913 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
Kojto | 99:dbbf35b96557 | 914 | ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 99:dbbf35b96557 | 915 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
Kojto | 99:dbbf35b96557 | 916 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
Kojto | 99:dbbf35b96557 | 917 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \ |
Kojto | 99:dbbf35b96557 | 918 | ((AF) == GPIO_AF14_LTDC)) |
Kojto | 99:dbbf35b96557 | 919 | |
Kojto | 99:dbbf35b96557 | 920 | #endif /* STM32F429xx || STM32F439xx */ |
Kojto | 99:dbbf35b96557 | 921 | /*------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 922 | |
Kojto | 99:dbbf35b96557 | 923 | /*---------------------------------- STM32F427xx/STM32F437xx--------------------------------*/ |
Kojto | 99:dbbf35b96557 | 924 | #if defined (STM32F427xx) || defined (STM32F437xx) |
Kojto | 99:dbbf35b96557 | 925 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 926 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 927 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 928 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 929 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 930 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 99:dbbf35b96557 | 931 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 99:dbbf35b96557 | 932 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
Kojto | 99:dbbf35b96557 | 933 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
Kojto | 99:dbbf35b96557 | 934 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 99:dbbf35b96557 | 935 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 936 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
Kojto | 99:dbbf35b96557 | 937 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 99:dbbf35b96557 | 938 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 99:dbbf35b96557 | 939 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
Kojto | 99:dbbf35b96557 | 940 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
Kojto | 99:dbbf35b96557 | 941 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
Kojto | 99:dbbf35b96557 | 942 | ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 99:dbbf35b96557 | 943 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
Kojto | 99:dbbf35b96557 | 944 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
Kojto | 99:dbbf35b96557 | 945 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1)) |
Kojto | 99:dbbf35b96557 | 946 | |
Kojto | 99:dbbf35b96557 | 947 | #endif /* STM32F427xx || STM32F437xx */ |
Kojto | 99:dbbf35b96557 | 948 | /*------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 949 | |
Kojto | 99:dbbf35b96557 | 950 | /*---------------------------------- STM32F407xx/STM32F417xx--------------------------------*/ |
Kojto | 99:dbbf35b96557 | 951 | #if defined (STM32F407xx) || defined (STM32F417xx) |
Kojto | 99:dbbf35b96557 | 952 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 953 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 954 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 955 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 956 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 957 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 99:dbbf35b96557 | 958 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 99:dbbf35b96557 | 959 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
Kojto | 99:dbbf35b96557 | 960 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
Kojto | 99:dbbf35b96557 | 961 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 99:dbbf35b96557 | 962 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 963 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
Kojto | 99:dbbf35b96557 | 964 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 99:dbbf35b96557 | 965 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 99:dbbf35b96557 | 966 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
Kojto | 99:dbbf35b96557 | 967 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
Kojto | 99:dbbf35b96557 | 968 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
Kojto | 99:dbbf35b96557 | 969 | ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT)) |
Kojto | 99:dbbf35b96557 | 970 | |
Kojto | 99:dbbf35b96557 | 971 | #endif /* STM32F407xx || STM32F417xx */ |
Kojto | 99:dbbf35b96557 | 972 | /*------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 973 | |
Kojto | 99:dbbf35b96557 | 974 | /*---------------------------------- STM32F405xx/STM32F415xx--------------------------------*/ |
Kojto | 99:dbbf35b96557 | 975 | #if defined (STM32F405xx) || defined (STM32F415xx) |
Kojto | 99:dbbf35b96557 | 976 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 977 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 978 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 979 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 980 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 981 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 99:dbbf35b96557 | 982 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 99:dbbf35b96557 | 983 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
Kojto | 99:dbbf35b96557 | 984 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
Kojto | 99:dbbf35b96557 | 985 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 99:dbbf35b96557 | 986 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 987 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
Kojto | 99:dbbf35b96557 | 988 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 99:dbbf35b96557 | 989 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 99:dbbf35b96557 | 990 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
Kojto | 99:dbbf35b96557 | 991 | ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDIO) || \ |
Kojto | 99:dbbf35b96557 | 992 | ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT)) |
Kojto | 99:dbbf35b96557 | 993 | |
Kojto | 99:dbbf35b96557 | 994 | #endif /* STM32F405xx || STM32F415xx */ |
Kojto | 99:dbbf35b96557 | 995 | |
Kojto | 99:dbbf35b96557 | 996 | /*------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 997 | |
Kojto | 99:dbbf35b96557 | 998 | /*---------------------------------------- STM32F401xx--------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 999 | #if defined(STM32F401xC) || defined(STM32F401xE) |
Kojto | 99:dbbf35b96557 | 1000 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 1001 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 1002 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 1003 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 1004 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 1005 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \ |
Kojto | 99:dbbf35b96557 | 1006 | ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \ |
Kojto | 99:dbbf35b96557 | 1007 | ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \ |
Kojto | 99:dbbf35b96557 | 1008 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 99:dbbf35b96557 | 1009 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 1010 | ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \ |
Kojto | 99:dbbf35b96557 | 1011 | ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \ |
Kojto | 99:dbbf35b96557 | 1012 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT)) |
Kojto | 99:dbbf35b96557 | 1013 | |
Kojto | 99:dbbf35b96557 | 1014 | #endif /* STM32F401xC || STM32F401xE */ |
Kojto | 99:dbbf35b96557 | 1015 | /*------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 1016 | |
Kojto | 99:dbbf35b96557 | 1017 | /*---------------------------------------- STM32F411xx--------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 1018 | #if defined(STM32F411xE) |
bogdanm | 86:04dd9b1680ae | 1019 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
bogdanm | 86:04dd9b1680ae | 1020 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
bogdanm | 86:04dd9b1680ae | 1021 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
bogdanm | 86:04dd9b1680ae | 1022 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
bogdanm | 86:04dd9b1680ae | 1023 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
bogdanm | 86:04dd9b1680ae | 1024 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \ |
bogdanm | 86:04dd9b1680ae | 1025 | ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \ |
bogdanm | 86:04dd9b1680ae | 1026 | ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \ |
bogdanm | 86:04dd9b1680ae | 1027 | ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF6_SPI4) || \ |
bogdanm | 86:04dd9b1680ae | 1028 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \ |
bogdanm | 86:04dd9b1680ae | 1029 | ((AF) == GPIO_AF6_SPI5) || ((AF) == GPIO_AF7_SPI3) || \ |
bogdanm | 86:04dd9b1680ae | 1030 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
bogdanm | 86:04dd9b1680ae | 1031 | ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \ |
bogdanm | 86:04dd9b1680ae | 1032 | ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \ |
bogdanm | 86:04dd9b1680ae | 1033 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT)) |
bogdanm | 86:04dd9b1680ae | 1034 | |
bogdanm | 86:04dd9b1680ae | 1035 | #endif /* STM32F411xE */ |
Kojto | 99:dbbf35b96557 | 1036 | /*----------------------------------------------------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 1037 | |
Kojto | 99:dbbf35b96557 | 1038 | /*----------------------------------------------- STM32F446xx ----------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 1039 | #if defined(STM32F446xx) |
Kojto | 99:dbbf35b96557 | 1040 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \ |
Kojto | 99:dbbf35b96557 | 1041 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \ |
Kojto | 99:dbbf35b96557 | 1042 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 99:dbbf35b96557 | 1043 | ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 99:dbbf35b96557 | 1044 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 99:dbbf35b96557 | 1045 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 99:dbbf35b96557 | 1046 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 99:dbbf35b96557 | 1047 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \ |
Kojto | 99:dbbf35b96557 | 1048 | ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \ |
Kojto | 99:dbbf35b96557 | 1049 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 99:dbbf35b96557 | 1050 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 99:dbbf35b96557 | 1051 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \ |
Kojto | 99:dbbf35b96557 | 1052 | ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 99:dbbf35b96557 | 1053 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 99:dbbf35b96557 | 1054 | ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \ |
Kojto | 99:dbbf35b96557 | 1055 | ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \ |
Kojto | 99:dbbf35b96557 | 1056 | ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \ |
Kojto | 99:dbbf35b96557 | 1057 | ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 99:dbbf35b96557 | 1058 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \ |
Kojto | 99:dbbf35b96557 | 1059 | ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \ |
Kojto | 99:dbbf35b96557 | 1060 | ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF6_SPI2) || \ |
Kojto | 99:dbbf35b96557 | 1061 | ((AF) == GPIO_AF6_SPI4) || ((AF) == GPIO_AF7_UART5) || \ |
Kojto | 99:dbbf35b96557 | 1062 | ((AF) == GPIO_AF7_SPI2) || ((AF) == GPIO_AF7_SPI3) || \ |
Kojto | 99:dbbf35b96557 | 1063 | ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \ |
Kojto | 99:dbbf35b96557 | 1064 | ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF9_QSPI) || \ |
Kojto | 99:dbbf35b96557 | 1065 | ((AF) == GPIO_AF10_SAI2) || ((AF) == GPIO_AF10_QSPI)) |
Kojto | 99:dbbf35b96557 | 1066 | |
Kojto | 99:dbbf35b96557 | 1067 | #endif /* STM32F446xx */ |
Kojto | 99:dbbf35b96557 | 1068 | |
bogdanm | 86:04dd9b1680ae | 1069 | /** |
bogdanm | 86:04dd9b1680ae | 1070 | * @} |
bogdanm | 86:04dd9b1680ae | 1071 | */ |
bogdanm | 86:04dd9b1680ae | 1072 | |
bogdanm | 86:04dd9b1680ae | 1073 | /** |
bogdanm | 86:04dd9b1680ae | 1074 | * @} |
bogdanm | 86:04dd9b1680ae | 1075 | */ |
bogdanm | 86:04dd9b1680ae | 1076 | |
Kojto | 99:dbbf35b96557 | 1077 | /* Private functions ---------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 1078 | /** @defgroup GPIOEx_Private_Functions GPIO Private Functions |
Kojto | 99:dbbf35b96557 | 1079 | * @{ |
Kojto | 99:dbbf35b96557 | 1080 | */ |
bogdanm | 86:04dd9b1680ae | 1081 | |
Kojto | 99:dbbf35b96557 | 1082 | /** |
Kojto | 99:dbbf35b96557 | 1083 | * @} |
Kojto | 99:dbbf35b96557 | 1084 | */ |
bogdanm | 86:04dd9b1680ae | 1085 | |
bogdanm | 86:04dd9b1680ae | 1086 | /** |
bogdanm | 86:04dd9b1680ae | 1087 | * @} |
bogdanm | 86:04dd9b1680ae | 1088 | */ |
bogdanm | 86:04dd9b1680ae | 1089 | |
bogdanm | 86:04dd9b1680ae | 1090 | /** |
bogdanm | 86:04dd9b1680ae | 1091 | * @} |
bogdanm | 86:04dd9b1680ae | 1092 | */ |
bogdanm | 86:04dd9b1680ae | 1093 | |
bogdanm | 86:04dd9b1680ae | 1094 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 1095 | } |
bogdanm | 86:04dd9b1680ae | 1096 | #endif |
bogdanm | 86:04dd9b1680ae | 1097 | |
bogdanm | 86:04dd9b1680ae | 1098 | #endif /* __STM32F4xx_HAL_GPIO_EX_H */ |
bogdanm | 86:04dd9b1680ae | 1099 | |
bogdanm | 86:04dd9b1680ae | 1100 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |