The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
Mikchel
Date:
Sun May 03 16:04:42 2015 +0000
Revision:
99:7f6c6de930c0
Parent:
93:e188a91d3eaa
12

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 90:cb3d968589d8 1 /**
Kojto 90:cb3d968589d8 2 ******************************************************************************
Kojto 90:cb3d968589d8 3 * @file stm32f0xx_hal_gpio_ex.h
Kojto 90:cb3d968589d8 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.2.0
Kojto 93:e188a91d3eaa 6 * @date 11-December-2014
Kojto 90:cb3d968589d8 7 * @brief Header file of GPIO HAL Extension module.
Kojto 90:cb3d968589d8 8 ******************************************************************************
Kojto 90:cb3d968589d8 9 * @attention
Kojto 90:cb3d968589d8 10 *
Kojto 90:cb3d968589d8 11 * <h2><center>&copy; 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 __STM32F0xx_HAL_GPIO_EX_H
Kojto 90:cb3d968589d8 40 #define __STM32F0xx_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 "stm32f0xx_hal_def.h"
Kojto 90:cb3d968589d8 48
Kojto 90:cb3d968589d8 49 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 90:cb3d968589d8 50 * @{
Kojto 90:cb3d968589d8 51 */
Kojto 90:cb3d968589d8 52
Kojto 90:cb3d968589d8 53 /** @defgroup GPIOEx GPIOEx 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 /* Exported constants --------------------------------------------------------*/
Kojto 90:cb3d968589d8 59 /** @defgroup GPIOEx_Exported_Constants GPIOEx Exported Constants
Kojto 90:cb3d968589d8 60 * @{
Kojto 90:cb3d968589d8 61 */
Kojto 90:cb3d968589d8 62
Kojto 90:cb3d968589d8 63 /** @defgroup GPIOEx_Alternate_function_selection GPIOEx Alternate function selection
Kojto 90:cb3d968589d8 64 * @{
Kojto 90:cb3d968589d8 65 */
Kojto 90:cb3d968589d8 66
Kojto 90:cb3d968589d8 67 #if defined (STM32F030x6)
Kojto 90:cb3d968589d8 68 /*------------------------- STM32F030x6---------------------------*/
Kojto 90:cb3d968589d8 69 /* AF 0 */
Kojto 90:cb3d968589d8 70 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 71 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 72 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
Kojto 90:cb3d968589d8 73 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 74 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 75 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 76 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 77 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 78 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 79
Kojto 90:cb3d968589d8 80 /* AF 1 */
Kojto 90:cb3d968589d8 81 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 82 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 83 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 84 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 85
Kojto 90:cb3d968589d8 86 /* AF 2 */
Kojto 90:cb3d968589d8 87 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 88 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 89 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 90 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 91
Kojto 90:cb3d968589d8 92 /* AF 3 */
Kojto 90:cb3d968589d8 93 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 94 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 95
Kojto 90:cb3d968589d8 96 /* AF 4 */
Kojto 90:cb3d968589d8 97 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 98 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 99
Kojto 90:cb3d968589d8 100 /* AF 5 */
Kojto 90:cb3d968589d8 101 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 102 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 103
Kojto 90:cb3d968589d8 104 /* AF 6 */
Kojto 90:cb3d968589d8 105 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 106
Kojto 90:cb3d968589d8 107 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 90:cb3d968589d8 108
Kojto 90:cb3d968589d8 109 #endif /* STM32F030x6 */
Kojto 90:cb3d968589d8 110
Kojto 90:cb3d968589d8 111 /*---------------------------------- STM32F030x8 -------------------------------------------*/
Kojto 90:cb3d968589d8 112 #if defined (STM32F030x8)
Kojto 90:cb3d968589d8 113 /* AF 0 */
Kojto 90:cb3d968589d8 114 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 115 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 116 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
Kojto 90:cb3d968589d8 117 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 118 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 119 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 120 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 121 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 122 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 123 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 124 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 125
Kojto 90:cb3d968589d8 126 /* AF 1 */
Kojto 90:cb3d968589d8 127 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 128 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 129 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 130 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 131 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 132 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 133 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 134 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 135
Kojto 90:cb3d968589d8 136 /* AF 2 */
Kojto 90:cb3d968589d8 137 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 138 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 139 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 140 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 141
Kojto 90:cb3d968589d8 142 /* AF 3 */
Kojto 90:cb3d968589d8 143 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 144 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 145 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 146
Kojto 90:cb3d968589d8 147 /* AF 4 */
Kojto 90:cb3d968589d8 148 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 149
Kojto 90:cb3d968589d8 150 /* AF 5 */
Kojto 90:cb3d968589d8 151 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 152 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 153
Kojto 90:cb3d968589d8 154 /* AF 6 */
Kojto 90:cb3d968589d8 155 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 156
Kojto 90:cb3d968589d8 157 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 90:cb3d968589d8 158
Kojto 90:cb3d968589d8 159 #endif /* STM32F030x8 */
Kojto 90:cb3d968589d8 160
Kojto 90:cb3d968589d8 161 #if defined (STM32F031x6) || defined (STM32F038xx)
Kojto 90:cb3d968589d8 162 /*--------------------------- STM32F031x6/STM32F038xx ---------------------------*/
Kojto 90:cb3d968589d8 163 /* AF 0 */
Kojto 90:cb3d968589d8 164 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 165 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 166 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 167 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 168 #define GPIO_AF0_SWDAT ((uint8_t)0x00) /*!< AF0: SWDAT Alternate Function mapping */
Kojto 90:cb3d968589d8 169 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 170 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 171 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 172 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 173
Kojto 90:cb3d968589d8 174 /* AF 1 */
Kojto 90:cb3d968589d8 175 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 176 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 177 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 178 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 179 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 180
Kojto 90:cb3d968589d8 181 /* AF 2 */
Kojto 90:cb3d968589d8 182 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 183 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 184 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 185 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 186 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 187
Kojto 90:cb3d968589d8 188 /* AF 3 */
Kojto 90:cb3d968589d8 189 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 190 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 191
Kojto 90:cb3d968589d8 192 /* AF 4 */
Kojto 90:cb3d968589d8 193 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 194 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 195
Kojto 90:cb3d968589d8 196 /* AF 5 */
Kojto 90:cb3d968589d8 197 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 198 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 199
Kojto 90:cb3d968589d8 200 /* AF 6 */
Kojto 90:cb3d968589d8 201 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 202
Kojto 90:cb3d968589d8 203 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 90:cb3d968589d8 204
Kojto 90:cb3d968589d8 205 #endif /* STM32F031x6 || STM32F038xx */
Kojto 90:cb3d968589d8 206
Kojto 90:cb3d968589d8 207 #if defined (STM32F051x8) || defined (STM32F058xx)
Kojto 90:cb3d968589d8 208 /*--------------------------- STM32F051x8/STM32F058xx---------------------------*/
Kojto 90:cb3d968589d8 209 /* AF 0 */
Kojto 90:cb3d968589d8 210 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 211 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 212 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 213 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 214 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 215 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 216 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 217 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 218 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 219 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 220 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 221 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 222
Kojto 90:cb3d968589d8 223 /* AF 1 */
Kojto 90:cb3d968589d8 224 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 225 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 226 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 227 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 228 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 229 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 230 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 231 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 232 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 233
Kojto 90:cb3d968589d8 234 /* AF 2 */
Kojto 90:cb3d968589d8 235 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 236 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 237 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 238 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 239 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 240
Kojto 90:cb3d968589d8 241 /* AF 3 */
Kojto 90:cb3d968589d8 242 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 243 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 244 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 245 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 246
Kojto 90:cb3d968589d8 247 /* AF 4 */
Kojto 90:cb3d968589d8 248 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 249
Kojto 90:cb3d968589d8 250 /* AF 5 */
Kojto 90:cb3d968589d8 251 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 252 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 253
Kojto 90:cb3d968589d8 254 /* AF 6 */
Kojto 90:cb3d968589d8 255 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 256
Kojto 90:cb3d968589d8 257 /* AF 7 */
Kojto 90:cb3d968589d8 258 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
Kojto 90:cb3d968589d8 259 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
Kojto 90:cb3d968589d8 260
Kojto 90:cb3d968589d8 261 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
Kojto 90:cb3d968589d8 262
Kojto 90:cb3d968589d8 263 #endif /* STM32F051x8/STM32F058xx */
Kojto 90:cb3d968589d8 264
Kojto 90:cb3d968589d8 265 #if defined (STM32F071xB)
Kojto 90:cb3d968589d8 266 /*--------------------------- STM32F071xB ---------------------------*/
Kojto 90:cb3d968589d8 267 /* AF 0 */
Kojto 90:cb3d968589d8 268 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: AEVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 269 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 270 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 271 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 272 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 273 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 274 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 275 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 276 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
Kojto 90:cb3d968589d8 277 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 278 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 279 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 280 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 281 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 282 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 283 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 284 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 285 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 286 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 287 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 288
Kojto 90:cb3d968589d8 289 /* AF 1 */
Kojto 90:cb3d968589d8 290 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 291 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 292 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 293 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 294 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 295 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 296 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 297 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 298 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 299 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 300 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 301 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
Kojto 90:cb3d968589d8 302 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 303
Kojto 90:cb3d968589d8 304 /* AF 2 */
Kojto 90:cb3d968589d8 305 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 306 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 307 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 308 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 309 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 310
Kojto 90:cb3d968589d8 311 /* AF 3 */
Kojto 90:cb3d968589d8 312 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 313 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 314 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 315 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 316
Kojto 90:cb3d968589d8 317 /* AF 4 */
Kojto 90:cb3d968589d8 318 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 319 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 320 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 321 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 322
Kojto 90:cb3d968589d8 323 /* AF 5 */
Kojto 90:cb3d968589d8 324 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 325 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 326 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 327 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 328 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 329
Kojto 90:cb3d968589d8 330 /* AF 6 */
Kojto 90:cb3d968589d8 331 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 332
Kojto 90:cb3d968589d8 333 /* AF 7 */
Kojto 90:cb3d968589d8 334 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
Kojto 90:cb3d968589d8 335 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
Kojto 90:cb3d968589d8 336
Kojto 90:cb3d968589d8 337 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
Kojto 90:cb3d968589d8 338
Kojto 90:cb3d968589d8 339 #endif /* STM32F071xB */
Kojto 90:cb3d968589d8 340
Kojto 90:cb3d968589d8 341
Kojto 90:cb3d968589d8 342 #if defined(STM32F091xC) || defined(STM32F098xx)
Kojto 90:cb3d968589d8 343 /*--------------------------- STM32F091xC || STM32F098xx ------------------------------*/
Kojto 90:cb3d968589d8 344 /* AF 0 */
Kojto 90:cb3d968589d8 345 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 346 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 347 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 348 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 349 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 350 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 351 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 352 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 353 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
Kojto 90:cb3d968589d8 354 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 355 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 356 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 357 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 358 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 359 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 360 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 361 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 362 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 363 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 364 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 365 #define GPIO_AF0_USART8 ((uint8_t)0x00) /*!< AF0: USART8 Alternate Function mapping */
Kojto 90:cb3d968589d8 366 #define GPIO_AF0_CAN ((uint8_t)0x00) /*!< AF0: CAN Alternate Function mapping */
Kojto 90:cb3d968589d8 367
Kojto 90:cb3d968589d8 368 /* AF 1 */
Kojto 90:cb3d968589d8 369 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 370 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 371 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 372 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 373 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 374 #define GPIO_AF1_USART4 ((uint8_t)0x01) /*!< AF1: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 375 #define GPIO_AF1_USART5 ((uint8_t)0x01) /*!< AF1: USART5 Alternate Function mapping */
Kojto 90:cb3d968589d8 376 #define GPIO_AF1_USART6 ((uint8_t)0x01) /*!< AF1: USART6 Alternate Function mapping */
Kojto 90:cb3d968589d8 377 #define GPIO_AF1_USART7 ((uint8_t)0x01) /*!< AF1: USART7 Alternate Function mapping */
Kojto 90:cb3d968589d8 378 #define GPIO_AF1_USART8 ((uint8_t)0x01) /*!< AF1: USART8 Alternate Function mapping */
Kojto 90:cb3d968589d8 379 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 380 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 381 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 382 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 383 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 384 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 385 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
Kojto 90:cb3d968589d8 386 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 387
Kojto 90:cb3d968589d8 388 /* AF 2 */
Kojto 90:cb3d968589d8 389 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 390 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 391 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 392 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 393 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 394 #define GPIO_AF2_USART5 ((uint8_t)0x02) /*!< AF2: USART5 Alternate Function mapping */
Kojto 90:cb3d968589d8 395 #define GPIO_AF2_USART6 ((uint8_t)0x02) /*!< AF2: USART6 Alternate Function mapping */
Kojto 90:cb3d968589d8 396 #define GPIO_AF2_USART7 ((uint8_t)0x02) /*!< AF2: USART7 Alternate Function mapping */
Kojto 90:cb3d968589d8 397 #define GPIO_AF2_USART8 ((uint8_t)0x02) /*!< AF2: USART8 Alternate Function mapping */
Kojto 90:cb3d968589d8 398
Kojto 90:cb3d968589d8 399 /* AF 3 */
Kojto 90:cb3d968589d8 400 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 401 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 402 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 403 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 404
Kojto 90:cb3d968589d8 405 /* AF 4 */
Kojto 90:cb3d968589d8 406 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 407 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 408 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 409 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 410 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
Kojto 90:cb3d968589d8 411 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 412 #define GPIO_AF4_USART5 ((uint8_t)0x04) /*!< AF4: USART5 Alternate Function mapping */
Kojto 90:cb3d968589d8 413
Kojto 90:cb3d968589d8 414 /* AF 5 */
Kojto 90:cb3d968589d8 415 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 416 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 417 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 418 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 419 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 420 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 421 #define GPIO_AF5_USART6 ((uint8_t)0x05) /*!< AF5: USART6 Alternate Function mapping */
Kojto 90:cb3d968589d8 422
Kojto 90:cb3d968589d8 423 /* AF 6 */
Kojto 90:cb3d968589d8 424 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 425
Kojto 90:cb3d968589d8 426 /* AF 7 */
Kojto 90:cb3d968589d8 427 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
Kojto 90:cb3d968589d8 428 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
Kojto 90:cb3d968589d8 429
Kojto 90:cb3d968589d8 430 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
Kojto 90:cb3d968589d8 431
Kojto 90:cb3d968589d8 432 #endif /* STM32F091xC || STM32F098xx */
Kojto 90:cb3d968589d8 433
Kojto 93:e188a91d3eaa 434 #if defined(STM32F030xC)
Kojto 93:e188a91d3eaa 435 /*--------------------------- STM32F030xC ----------------------------------------------------*/
Kojto 93:e188a91d3eaa 436 /* AF 0 */
Kojto 93:e188a91d3eaa 437 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 438 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 93:e188a91d3eaa 439 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 93:e188a91d3eaa 440 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 93:e188a91d3eaa 441 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 442 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 443 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 444 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 445 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 446 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 447 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 448 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 449 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
Kojto 93:e188a91d3eaa 450
Kojto 93:e188a91d3eaa 451 /* AF 1 */
Kojto 93:e188a91d3eaa 452 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 453 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 454 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 455 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 456 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 457 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 458 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 459 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 460 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 461 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 462
Kojto 93:e188a91d3eaa 463 /* AF 2 */
Kojto 93:e188a91d3eaa 464 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 465 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 466 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 467 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 468 #define GPIO_AF2_USART5 ((uint8_t)0x02) /*!< AF2: USART5 Alternate Function mapping */
Kojto 93:e188a91d3eaa 469 #define GPIO_AF2_USART6 ((uint8_t)0x02) /*!< AF2: USART6 Alternate Function mapping */
Kojto 93:e188a91d3eaa 470
Kojto 93:e188a91d3eaa 471 /* AF 3 */
Kojto 93:e188a91d3eaa 472 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 473 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 474 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 475
Kojto 93:e188a91d3eaa 476 /* AF 4 */
Kojto 93:e188a91d3eaa 477 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 478 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
Kojto 93:e188a91d3eaa 479 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 480 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 481 #define GPIO_AF4_USART5 ((uint8_t)0x04) /*!< AF4: USART5 Alternate Function mapping */
Kojto 93:e188a91d3eaa 482
Kojto 93:e188a91d3eaa 483 /* AF 5 */
Kojto 93:e188a91d3eaa 484 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 485 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 486 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 487 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 488 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 489 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
Kojto 93:e188a91d3eaa 490 #define GPIO_AF5_USART6 ((uint8_t)0x05) /*!< AF5: USART6 Alternate Function mapping */
Kojto 93:e188a91d3eaa 491
Kojto 93:e188a91d3eaa 492 /* AF 6 */
Kojto 93:e188a91d3eaa 493 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 494
Kojto 93:e188a91d3eaa 495 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 93:e188a91d3eaa 496
Kojto 93:e188a91d3eaa 497 #endif /* STM32F030xC */
Kojto 93:e188a91d3eaa 498
Kojto 90:cb3d968589d8 499 #if defined (STM32F072xB) || defined (STM32F078xx)
Kojto 90:cb3d968589d8 500 /*--------------------------- STM32F072xB/STM32F078xx ---------------------------*/
Kojto 90:cb3d968589d8 501 /* AF 0 */
Kojto 90:cb3d968589d8 502 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 503 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 504 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 505 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 506 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 507 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 508 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 509 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 510 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
Kojto 90:cb3d968589d8 511 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 512 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 513 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 514 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 515 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 516 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 517 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 518 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 519 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 520 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 521 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 522 #define GPIO_AF0_CAN ((uint8_t)0x00) /*!< AF0: CAN Alternate Function mapping */
Kojto 90:cb3d968589d8 523
Kojto 90:cb3d968589d8 524 /* AF 1 */
Kojto 90:cb3d968589d8 525 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 526 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 527 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 528 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 529 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 530 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 531 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 532 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 533 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 534 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 535 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 536 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
Kojto 90:cb3d968589d8 537 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 538
Kojto 90:cb3d968589d8 539 /* AF 2 */
Kojto 90:cb3d968589d8 540 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 541 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 542 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 543 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 544 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 545 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
Kojto 90:cb3d968589d8 546
Kojto 90:cb3d968589d8 547 /* AF 3 */
Kojto 90:cb3d968589d8 548 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 549 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 550 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 551 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 552
Kojto 90:cb3d968589d8 553 /* AF 4 */
Kojto 90:cb3d968589d8 554 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 555 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
Kojto 90:cb3d968589d8 556 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
Kojto 90:cb3d968589d8 557 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 558 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
Kojto 90:cb3d968589d8 559
Kojto 90:cb3d968589d8 560 /* AF 5 */
Kojto 90:cb3d968589d8 561 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
Kojto 90:cb3d968589d8 562 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 563 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 564 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 565 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 566
Kojto 90:cb3d968589d8 567 /* AF 6 */
Kojto 90:cb3d968589d8 568 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 569
Kojto 90:cb3d968589d8 570 /* AF 7 */
Kojto 90:cb3d968589d8 571 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
Kojto 90:cb3d968589d8 572 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
Kojto 90:cb3d968589d8 573
Kojto 90:cb3d968589d8 574 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
Kojto 90:cb3d968589d8 575
Kojto 90:cb3d968589d8 576 #endif /* STM32F072xB || STM32F078xx */
Kojto 90:cb3d968589d8 577
Kojto 93:e188a91d3eaa 578 #if defined (STM32F070xB)
Kojto 93:e188a91d3eaa 579 /*---------------------------------- STM32F070xB ---------------------------------------------*/
Kojto 93:e188a91d3eaa 580 /* AF 0 */
Kojto 93:e188a91d3eaa 581 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 582 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 93:e188a91d3eaa 583 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 93:e188a91d3eaa 584 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 93:e188a91d3eaa 585 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 586 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 587 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 588 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 589 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 590 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 591 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 592 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 593 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
Kojto 93:e188a91d3eaa 594
Kojto 93:e188a91d3eaa 595 /* AF 1 */
Kojto 93:e188a91d3eaa 596 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 597 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 598 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 599 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 600 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART4 Alternate Function mapping */
Kojto 93:e188a91d3eaa 601 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 602 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 603 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 604 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 605 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 606
Kojto 93:e188a91d3eaa 607 /* AF 2 */
Kojto 93:e188a91d3eaa 608 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 609 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 610 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 611 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 612 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
Kojto 93:e188a91d3eaa 613
Kojto 93:e188a91d3eaa 614 /* AF 3 */
Kojto 93:e188a91d3eaa 615 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 616 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 617
Kojto 93:e188a91d3eaa 618 /* AF 4 */
Kojto 93:e188a91d3eaa 619 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 620 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
Kojto 93:e188a91d3eaa 621 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 622
Kojto 93:e188a91d3eaa 623 /* AF 5 */
Kojto 93:e188a91d3eaa 624 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
Kojto 93:e188a91d3eaa 625 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 626 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 627 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 628 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 629
Kojto 93:e188a91d3eaa 630 /* AF 6 */
Kojto 93:e188a91d3eaa 631 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 632
Kojto 93:e188a91d3eaa 633 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 93:e188a91d3eaa 634
Kojto 93:e188a91d3eaa 635 #endif /* STM32F070xB */
Kojto 93:e188a91d3eaa 636
Kojto 90:cb3d968589d8 637 #if defined (STM32F042x6) || defined (STM32F048xx)
Kojto 90:cb3d968589d8 638 /*--------------------------- STM32F042x6/STM32F048xx ---------------------------*/
Kojto 90:cb3d968589d8 639 /* AF 0 */
Kojto 90:cb3d968589d8 640 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 641 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 642 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 643 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 644 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 645 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
Kojto 90:cb3d968589d8 646 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
Kojto 90:cb3d968589d8 647 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 90:cb3d968589d8 648 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 90:cb3d968589d8 649 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 650 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 651 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 652
Kojto 90:cb3d968589d8 653 /* AF 1 */
Kojto 90:cb3d968589d8 654 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
Kojto 90:cb3d968589d8 655 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 656 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 657 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 90:cb3d968589d8 658 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 90:cb3d968589d8 659 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 90:cb3d968589d8 660 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 90:cb3d968589d8 661
Kojto 90:cb3d968589d8 662 /* AF 2 */
Kojto 90:cb3d968589d8 663 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 664 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 90:cb3d968589d8 665 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
Kojto 90:cb3d968589d8 666 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 667 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 668 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
Kojto 90:cb3d968589d8 669
Kojto 90:cb3d968589d8 670 /* AF 3 */
Kojto 90:cb3d968589d8 671 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 672 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 673 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
Kojto 90:cb3d968589d8 674
Kojto 90:cb3d968589d8 675 /* AF 4 */
Kojto 90:cb3d968589d8 676 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 90:cb3d968589d8 677 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
Kojto 90:cb3d968589d8 678 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
Kojto 90:cb3d968589d8 679 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 680
Kojto 90:cb3d968589d8 681 /* AF 5 */
Kojto 90:cb3d968589d8 682 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
Kojto 90:cb3d968589d8 683 #define GPIO_AF5_I2C1 ((uint8_t)0x05) /*!< AF5: I2C1 Alternate Function mapping */
Kojto 90:cb3d968589d8 684 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
Kojto 90:cb3d968589d8 685 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
Kojto 90:cb3d968589d8 686 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 90:cb3d968589d8 687 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 90:cb3d968589d8 688 #define GPIO_AF5_USB ((uint8_t)0x05) /*!< AF5: USB Alternate Function mapping */
Kojto 90:cb3d968589d8 689
Kojto 90:cb3d968589d8 690 /* AF 6 */
Kojto 90:cb3d968589d8 691 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 90:cb3d968589d8 692
Kojto 90:cb3d968589d8 693 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 90:cb3d968589d8 694
Kojto 90:cb3d968589d8 695 #endif /* STM32F042x6 || STM32F048xx */
Kojto 93:e188a91d3eaa 696
Kojto 93:e188a91d3eaa 697 #if defined (STM32F070x6)
Kojto 93:e188a91d3eaa 698 /*--------------------------------------- STM32F070x6 ----------------------------------------*/
Kojto 93:e188a91d3eaa 699 /* AF 0 */
Kojto 93:e188a91d3eaa 700 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 701 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 702 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
Kojto 93:e188a91d3eaa 703 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 704 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
Kojto 93:e188a91d3eaa 705 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
Kojto 93:e188a91d3eaa 706 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 707 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 708 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 709
Kojto 93:e188a91d3eaa 710 /* AF 1 */
Kojto 93:e188a91d3eaa 711 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 712 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 713 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
Kojto 93:e188a91d3eaa 714 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 715 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
Kojto 93:e188a91d3eaa 716 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
Kojto 93:e188a91d3eaa 717
Kojto 93:e188a91d3eaa 718 /* AF 2 */
Kojto 93:e188a91d3eaa 719 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 720 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 721 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 722 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 723 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
Kojto 93:e188a91d3eaa 724
Kojto 93:e188a91d3eaa 725 /* AF 3 */
Kojto 93:e188a91d3eaa 726 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 727 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 728
Kojto 93:e188a91d3eaa 729 /* AF 4 */
Kojto 93:e188a91d3eaa 730 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
Kojto 93:e188a91d3eaa 731 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 732
Kojto 93:e188a91d3eaa 733 /* AF 5 */
Kojto 93:e188a91d3eaa 734 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
Kojto 93:e188a91d3eaa 735 #define GPIO_AF5_I2C1 ((uint8_t)0x05) /*!< AF5: I2C1 Alternate Function mapping */
Kojto 93:e188a91d3eaa 736 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
Kojto 93:e188a91d3eaa 737 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
Kojto 93:e188a91d3eaa 738 #define GPIO_AF5_USB ((uint8_t)0x05) /*!< AF5: USB Alternate Function mapping */
Kojto 93:e188a91d3eaa 739
Kojto 93:e188a91d3eaa 740 /* AF 6 */
Kojto 93:e188a91d3eaa 741 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
Kojto 93:e188a91d3eaa 742
Kojto 93:e188a91d3eaa 743 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
Kojto 93:e188a91d3eaa 744
Kojto 93:e188a91d3eaa 745 #endif /* STM32F070x6 */
Kojto 90:cb3d968589d8 746 /**
Kojto 90:cb3d968589d8 747 * @}
Kojto 90:cb3d968589d8 748 */
Kojto 90:cb3d968589d8 749
Kojto 90:cb3d968589d8 750 /**
Kojto 90:cb3d968589d8 751 * @}
Kojto 90:cb3d968589d8 752 */
Kojto 90:cb3d968589d8 753
Kojto 90:cb3d968589d8 754 /* Exported macro ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 755 /** @defgroup GPIOEx_Exported_Macros GPIOEx Exported Macros
Kojto 90:cb3d968589d8 756 * @{
Kojto 90:cb3d968589d8 757 */
Kojto 90:cb3d968589d8 758
Kojto 90:cb3d968589d8 759 /** @defgroup GPIOEx_Get_Port_Index GPIOEx_Get Port Index
Kojto 90:cb3d968589d8 760 * @{
Kojto 90:cb3d968589d8 761 */
Kojto 90:cb3d968589d8 762 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || \
Kojto 90:cb3d968589d8 763 defined (STM32F091xC) || defined (STM32F098xx)
Kojto 93:e188a91d3eaa 764 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
Kojto 90:cb3d968589d8 765 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 90:cb3d968589d8 766 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 90:cb3d968589d8 767 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 90:cb3d968589d8 768 ((__GPIOx__) == (GPIOE))? 4U : 5U)
Kojto 90:cb3d968589d8 769 #endif
Kojto 90:cb3d968589d8 770
Kojto 93:e188a91d3eaa 771 #if defined (STM32F030x6) || defined (STM32F030x8) || defined (STM32F070xB) || defined (STM32F030xC) || \
Kojto 90:cb3d968589d8 772 defined (STM32F051x8) || defined (STM32F058xx)
Kojto 93:e188a91d3eaa 773 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
Kojto 90:cb3d968589d8 774 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 90:cb3d968589d8 775 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 90:cb3d968589d8 776 ((__GPIOx__) == (GPIOD))? 3U : 5U)
Kojto 90:cb3d968589d8 777 #endif
Kojto 90:cb3d968589d8 778
Kojto 90:cb3d968589d8 779 #if defined (STM32F031x6) || defined (STM32F038xx) || \
Kojto 93:e188a91d3eaa 780 defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6)
Kojto 93:e188a91d3eaa 781 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
Kojto 90:cb3d968589d8 782 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 90:cb3d968589d8 783 ((__GPIOx__) == (GPIOC))? 2U : 5U)
Kojto 90:cb3d968589d8 784 #endif
Kojto 90:cb3d968589d8 785
Kojto 90:cb3d968589d8 786 /**
Kojto 90:cb3d968589d8 787 * @}
Kojto 90:cb3d968589d8 788 */
Kojto 90:cb3d968589d8 789
Kojto 90:cb3d968589d8 790 /**
Kojto 90:cb3d968589d8 791 * @}
Kojto 90:cb3d968589d8 792 */
Kojto 90:cb3d968589d8 793
Kojto 90:cb3d968589d8 794 /* Exported functions --------------------------------------------------------*/
Kojto 90:cb3d968589d8 795 /**
Kojto 90:cb3d968589d8 796 * @}
Kojto 90:cb3d968589d8 797 */
Kojto 90:cb3d968589d8 798
Kojto 90:cb3d968589d8 799 /**
Kojto 90:cb3d968589d8 800 * @}
Kojto 90:cb3d968589d8 801 */
Kojto 90:cb3d968589d8 802
Kojto 90:cb3d968589d8 803 #ifdef __cplusplus
Kojto 90:cb3d968589d8 804 }
Kojto 90:cb3d968589d8 805 #endif
Kojto 90:cb3d968589d8 806
Kojto 90:cb3d968589d8 807 #endif /* __STM32F0xx_HAL_GPIO_EX_H */
Kojto 90:cb3d968589d8 808
Kojto 90:cb3d968589d8 809 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Kojto 90:cb3d968589d8 810