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