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