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