cc y / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
116:c0f6e94411f5
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 115:87f2f5183dfb 1 /**
Kojto 115:87f2f5183dfb 2 ******************************************************************************
Kojto 115:87f2f5183dfb 3 * @file stm32f7xx_hal_gpio_ex.h
Kojto 115:87f2f5183dfb 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.1.0
Kojto 122:f9eeca106725 6 * @date 22-April-2016
Kojto 115:87f2f5183dfb 7 * @brief Header file of GPIO HAL Extension module.
Kojto 115:87f2f5183dfb 8 ******************************************************************************
Kojto 115:87f2f5183dfb 9 * @attention
Kojto 115:87f2f5183dfb 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 115:87f2f5183dfb 12 *
Kojto 115:87f2f5183dfb 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 115:87f2f5183dfb 14 * are permitted provided that the following conditions are met:
Kojto 115:87f2f5183dfb 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 115:87f2f5183dfb 16 * this list of conditions and the following disclaimer.
Kojto 115:87f2f5183dfb 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 115:87f2f5183dfb 18 * this list of conditions and the following disclaimer in the documentation
Kojto 115:87f2f5183dfb 19 * and/or other materials provided with the distribution.
Kojto 115:87f2f5183dfb 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 115:87f2f5183dfb 21 * may be used to endorse or promote products derived from this software
Kojto 115:87f2f5183dfb 22 * without specific prior written permission.
Kojto 115:87f2f5183dfb 23 *
Kojto 115:87f2f5183dfb 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 115:87f2f5183dfb 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 115:87f2f5183dfb 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 115:87f2f5183dfb 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 115:87f2f5183dfb 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 115:87f2f5183dfb 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 115:87f2f5183dfb 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 115:87f2f5183dfb 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 115:87f2f5183dfb 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 115:87f2f5183dfb 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 115:87f2f5183dfb 34 *
Kojto 115:87f2f5183dfb 35 ******************************************************************************
Kojto 115:87f2f5183dfb 36 */
Kojto 115:87f2f5183dfb 37
Kojto 115:87f2f5183dfb 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 115:87f2f5183dfb 39 #ifndef __STM32F7xx_HAL_GPIO_EX_H
Kojto 115:87f2f5183dfb 40 #define __STM32F7xx_HAL_GPIO_EX_H
Kojto 115:87f2f5183dfb 41
Kojto 115:87f2f5183dfb 42 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 43 extern "C" {
Kojto 115:87f2f5183dfb 44 #endif
Kojto 115:87f2f5183dfb 45
Kojto 115:87f2f5183dfb 46 /* Includes ------------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 47 #include "stm32f7xx_hal_def.h"
Kojto 115:87f2f5183dfb 48
Kojto 115:87f2f5183dfb 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 115:87f2f5183dfb 50 * @{
Kojto 115:87f2f5183dfb 51 */
Kojto 115:87f2f5183dfb 52
Kojto 115:87f2f5183dfb 53 /** @defgroup GPIOEx GPIOEx
Kojto 115:87f2f5183dfb 54 * @{
Kojto 115:87f2f5183dfb 55 */
Kojto 115:87f2f5183dfb 56
Kojto 115:87f2f5183dfb 57 /* Exported types ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 58
Kojto 115:87f2f5183dfb 59 /* Exported constants --------------------------------------------------------*/
Kojto 115:87f2f5183dfb 60 /** @defgroup GPIOEx_Exported_Constants GPIO Exported Constants
Kojto 115:87f2f5183dfb 61 * @{
Kojto 115:87f2f5183dfb 62 */
Kojto 115:87f2f5183dfb 63
Kojto 115:87f2f5183dfb 64 /** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection
Kojto 115:87f2f5183dfb 65 * @{
Kojto 115:87f2f5183dfb 66 */
Kojto 115:87f2f5183dfb 67
Kojto 115:87f2f5183dfb 68 /**
Kojto 115:87f2f5183dfb 69 * @brief AF 0 selection
Kojto 115:87f2f5183dfb 70 */
Kojto 122:f9eeca106725 71 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00U) /* RTC_50Hz Alternate Function mapping */
Kojto 122:f9eeca106725 72 #define GPIO_AF0_MCO ((uint8_t)0x00U) /* MCO (MCO1 and MCO2) Alternate Function mapping */
Kojto 122:f9eeca106725 73 #define GPIO_AF0_SWJ ((uint8_t)0x00U) /* SWJ (SWD and JTAG) Alternate Function mapping */
Kojto 122:f9eeca106725 74 #define GPIO_AF0_TRACE ((uint8_t)0x00U) /* TRACE Alternate Function mapping */
Kojto 115:87f2f5183dfb 75
Kojto 115:87f2f5183dfb 76 /**
Kojto 115:87f2f5183dfb 77 * @brief AF 1 selection
Kojto 115:87f2f5183dfb 78 */
Kojto 122:f9eeca106725 79 #define GPIO_AF1_TIM1 ((uint8_t)0x01U) /* TIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 80 #define GPIO_AF1_TIM2 ((uint8_t)0x01U) /* TIM2 Alternate Function mapping */
Kojto 122:f9eeca106725 81 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 82 #define GPIO_AF1_UART5 ((uint8_t)0x01U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 83 #define GPIO_AF1_I2C4 ((uint8_t)0x01U) /* I2C4 Alternate Function mapping */
Kojto 122:f9eeca106725 84 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 85
Kojto 115:87f2f5183dfb 86 /**
Kojto 115:87f2f5183dfb 87 * @brief AF 2 selection
Kojto 115:87f2f5183dfb 88 */
Kojto 122:f9eeca106725 89 #define GPIO_AF2_TIM3 ((uint8_t)0x02U) /* TIM3 Alternate Function mapping */
Kojto 122:f9eeca106725 90 #define GPIO_AF2_TIM4 ((uint8_t)0x02U) /* TIM4 Alternate Function mapping */
Kojto 122:f9eeca106725 91 #define GPIO_AF2_TIM5 ((uint8_t)0x02U) /* TIM5 Alternate Function mapping */
Kojto 115:87f2f5183dfb 92
Kojto 115:87f2f5183dfb 93 /**
Kojto 115:87f2f5183dfb 94 * @brief AF 3 selection
Kojto 115:87f2f5183dfb 95 */
Kojto 122:f9eeca106725 96 #define GPIO_AF3_TIM8 ((uint8_t)0x03U) /* TIM8 Alternate Function mapping */
Kojto 122:f9eeca106725 97 #define GPIO_AF3_TIM9 ((uint8_t)0x03U) /* TIM9 Alternate Function mapping */
Kojto 122:f9eeca106725 98 #define GPIO_AF3_TIM10 ((uint8_t)0x03U) /* TIM10 Alternate Function mapping */
Kojto 122:f9eeca106725 99 #define GPIO_AF3_TIM11 ((uint8_t)0x03U) /* TIM11 Alternate Function mapping */
Kojto 122:f9eeca106725 100 #define GPIO_AF3_LPTIM1 ((uint8_t)0x03U) /* LPTIM1 Alternate Function mapping */
Kojto 122:f9eeca106725 101 #define GPIO_AF3_CEC ((uint8_t)0x03U) /* CEC Alternate Function mapping */
Kojto 122:f9eeca106725 102 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 103 #define GPIO_AF3_DFSDM1 ((uint8_t)0x03U) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 104 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 105 /**
Kojto 115:87f2f5183dfb 106 * @brief AF 4 selection
Kojto 115:87f2f5183dfb 107 */
Kojto 122:f9eeca106725 108 #define GPIO_AF4_I2C1 ((uint8_t)0x04U) /* I2C1 Alternate Function mapping */
Kojto 122:f9eeca106725 109 #define GPIO_AF4_I2C2 ((uint8_t)0x04U) /* I2C2 Alternate Function mapping */
Kojto 122:f9eeca106725 110 #define GPIO_AF4_I2C3 ((uint8_t)0x04U) /* I2C3 Alternate Function mapping */
Kojto 122:f9eeca106725 111 #define GPIO_AF4_I2C4 ((uint8_t)0x04U) /* I2C4 Alternate Function mapping */
Kojto 122:f9eeca106725 112 #define GPIO_AF4_CEC ((uint8_t)0x04U) /* CEC Alternate Function mapping */
Kojto 122:f9eeca106725 113 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 114 #define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 115 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 116
Kojto 115:87f2f5183dfb 117 /**
Kojto 115:87f2f5183dfb 118 * @brief AF 5 selection
Kojto 115:87f2f5183dfb 119 */
Kojto 122:f9eeca106725 120 #define GPIO_AF5_SPI1 ((uint8_t)0x05U) /* SPI1 Alternate Function mapping */
Kojto 122:f9eeca106725 121 #define GPIO_AF5_SPI2 ((uint8_t)0x05U) /* SPI2/I2S2 Alternate Function mapping */
Kojto 122:f9eeca106725 122 #define GPIO_AF5_SPI3 ((uint8_t)0x05U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 123 #define GPIO_AF5_SPI4 ((uint8_t)0x05U) /* SPI4 Alternate Function mapping */
Kojto 122:f9eeca106725 124 #define GPIO_AF5_SPI5 ((uint8_t)0x05U) /* SPI5 Alternate Function mapping */
Kojto 122:f9eeca106725 125 #define GPIO_AF5_SPI6 ((uint8_t)0x05U) /* SPI6 Alternate Function mapping */
Kojto 115:87f2f5183dfb 126
Kojto 115:87f2f5183dfb 127 /**
Kojto 115:87f2f5183dfb 128 * @brief AF 6 selection
Kojto 115:87f2f5183dfb 129 */
Kojto 122:f9eeca106725 130 #define GPIO_AF6_SPI3 ((uint8_t)0x06U) /* SPI3/I2S3 Alternate Function mapping */
Kojto 122:f9eeca106725 131 #define GPIO_AF6_SAI1 ((uint8_t)0x06U) /* SAI1 Alternate Function mapping */
Kojto 122:f9eeca106725 132 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 133 #define GPIO_AF6_UART4 ((uint8_t)0x06U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 134 #define GPIO_AF6_DFSDM1 ((uint8_t)0x06U) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 135 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 136
Kojto 115:87f2f5183dfb 137 /**
Kojto 115:87f2f5183dfb 138 * @brief AF 7 selection
Kojto 115:87f2f5183dfb 139 */
Kojto 122:f9eeca106725 140 #define GPIO_AF7_USART1 ((uint8_t)0x07U) /* USART1 Alternate Function mapping */
Kojto 122:f9eeca106725 141 #define GPIO_AF7_USART2 ((uint8_t)0x07U) /* USART2 Alternate Function mapping */
Kojto 122:f9eeca106725 142 #define GPIO_AF7_USART3 ((uint8_t)0x07U) /* USART3 Alternate Function mapping */
Kojto 122:f9eeca106725 143 #define GPIO_AF7_UART5 ((uint8_t)0x07U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 144 #define GPIO_AF7_SPDIFRX ((uint8_t)0x07U) /* SPDIF-RX Alternate Function mapping */
Kojto 122:f9eeca106725 145 #define GPIO_AF7_SPI2 ((uint8_t)0x07U) /* SPI2 Alternate Function mapping */
Kojto 122:f9eeca106725 146 #define GPIO_AF7_SPI3 ((uint8_t)0x07U) /* SPI3 Alternate Function mapping */
Kojto 122:f9eeca106725 147 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 148 #define GPIO_AF7_SPI6 ((uint8_t)0x07U) /* SPI6 Alternate Function mapping */
Kojto 122:f9eeca106725 149 #define GPIO_AF7_DFSDM1 ((uint8_t)0x07U) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 150 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 151
Kojto 115:87f2f5183dfb 152 /**
Kojto 115:87f2f5183dfb 153 * @brief AF 8 selection
Kojto 115:87f2f5183dfb 154 */
Kojto 122:f9eeca106725 155 #define GPIO_AF8_UART4 ((uint8_t)0x08U) /* UART4 Alternate Function mapping */
Kojto 122:f9eeca106725 156 #define GPIO_AF8_UART5 ((uint8_t)0x08U) /* UART5 Alternate Function mapping */
Kojto 122:f9eeca106725 157 #define GPIO_AF8_USART6 ((uint8_t)0x08U) /* USART6 Alternate Function mapping */
Kojto 122:f9eeca106725 158 #define GPIO_AF8_UART7 ((uint8_t)0x08U) /* UART7 Alternate Function mapping */
Kojto 122:f9eeca106725 159 #define GPIO_AF8_UART8 ((uint8_t)0x08U) /* UART8 Alternate Function mapping */
Kojto 122:f9eeca106725 160 #define GPIO_AF8_SPDIFRX ((uint8_t)0x08U) /* SPIDIF-RX Alternate Function mapping */
Kojto 122:f9eeca106725 161 #define GPIO_AF8_SAI2 ((uint8_t)0x08U) /* SAI2 Alternate Function mapping */
Kojto 122:f9eeca106725 162 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 163 #define GPIO_AF8_SPI6 ((uint8_t)0x08U) /* SPI6 Alternate Function mapping */
Kojto 122:f9eeca106725 164 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 165
Kojto 115:87f2f5183dfb 166
Kojto 115:87f2f5183dfb 167 /**
Kojto 115:87f2f5183dfb 168 * @brief AF 9 selection
Kojto 115:87f2f5183dfb 169 */
Kojto 122:f9eeca106725 170 #define GPIO_AF9_CAN1 ((uint8_t)0x09U) /* CAN1 Alternate Function mapping */
Kojto 122:f9eeca106725 171 #define GPIO_AF9_CAN2 ((uint8_t)0x09U) /* CAN2 Alternate Function mapping */
Kojto 122:f9eeca106725 172 #define GPIO_AF9_TIM12 ((uint8_t)0x09U) /* TIM12 Alternate Function mapping */
Kojto 122:f9eeca106725 173 #define GPIO_AF9_TIM13 ((uint8_t)0x09U) /* TIM13 Alternate Function mapping */
Kojto 122:f9eeca106725 174 #define GPIO_AF9_TIM14 ((uint8_t)0x09U) /* TIM14 Alternate Function mapping */
Kojto 122:f9eeca106725 175 #define GPIO_AF9_QUADSPI ((uint8_t)0x09U) /* QUADSPI Alternate Function mapping */
Kojto 122:f9eeca106725 176 #if defined(STM32F746xx) || defined(STM32F756xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 177 #define GPIO_AF9_LTDC ((uint8_t)0x09U) /* LCD-TFT Alternate Function mapping */
Kojto 122:f9eeca106725 178 #endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 179 #if defined(STM32F746xx) || defined(STM32F756xx) || defined(STM32F765xx) || defined(STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 180 #define GPIO_AF9_FMC ((uint8_t)0x09U) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 181 #endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 182 /**
Kojto 115:87f2f5183dfb 183 * @brief AF 10 selection
Kojto 115:87f2f5183dfb 184 */
Kojto 122:f9eeca106725 185 #define GPIO_AF10_OTG_FS ((uint8_t)0xAU) /* OTG_FS Alternate Function mapping */
Kojto 122:f9eeca106725 186 #define GPIO_AF10_OTG_HS ((uint8_t)0xAU) /* OTG_HS Alternate Function mapping */
Kojto 122:f9eeca106725 187 #define GPIO_AF10_QUADSPI ((uint8_t)0xAU) /* QUADSPI Alternate Function mapping */
Kojto 122:f9eeca106725 188 #define GPIO_AF10_SAI2 ((uint8_t)0xAU) /* SAI2 Alternate Function mapping */
Kojto 122:f9eeca106725 189 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 190 #define GPIO_AF10_DFSDM1 ((uint8_t)0x0AU) /* DFSDM1 Alternate Function mapping */
Kojto 122:f9eeca106725 191 #define GPIO_AF10_SDMMC2 ((uint8_t)0x0AU) /* SDMMC2 Alternate Function mapping */
Kojto 122:f9eeca106725 192 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 193
Kojto 115:87f2f5183dfb 194 /**
Kojto 115:87f2f5183dfb 195 * @brief AF 11 selection
Kojto 115:87f2f5183dfb 196 */
Kojto 122:f9eeca106725 197 #define GPIO_AF11_ETH ((uint8_t)0x0BU) /* ETHERNET Alternate Function mapping */
Kojto 122:f9eeca106725 198 #if defined(STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
Kojto 122:f9eeca106725 199 #define GPIO_AF11_CAN3 ((uint8_t)0x0BU) /* CAN3 Alternate Function mapping */
Kojto 122:f9eeca106725 200 #define GPIO_AF11_SDMMC2 ((uint8_t)0x0BU) /* SDMMC2 Alternate Function mapping */
Kojto 122:f9eeca106725 201 #define GPIO_AF11_I2C4 ((uint8_t)0x0BU) /* I2C4 Alternate Function mapping */
Kojto 122:f9eeca106725 202 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 203
Kojto 115:87f2f5183dfb 204 /**
Kojto 115:87f2f5183dfb 205 * @brief AF 12 selection
Kojto 115:87f2f5183dfb 206 */
Kojto 122:f9eeca106725 207 #define GPIO_AF12_FMC ((uint8_t)0xCU) /* FMC Alternate Function mapping */
Kojto 122:f9eeca106725 208 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xCU) /* OTG HS configured in FS, Alternate Function mapping */
Kojto 122:f9eeca106725 209 #define GPIO_AF12_SDMMC1 ((uint8_t)0xCU) /* SDMMC1 Alternate Function mapping */
Kojto 122:f9eeca106725 210 #if defined(STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
Kojto 122:f9eeca106725 211 #define GPIO_AF12_MDIOS ((uint8_t)0xCU) /* SDMMC1 Alternate Function mapping */
Kojto 122:f9eeca106725 212 #define GPIO_AF12_UART7 ((uint8_t)0xCU) /* UART7 Alternate Function mapping */
Kojto 122:f9eeca106725 213 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 214
Kojto 115:87f2f5183dfb 215 /**
Kojto 115:87f2f5183dfb 216 * @brief AF 13 selection
Kojto 115:87f2f5183dfb 217 */
Kojto 122:f9eeca106725 218 #define GPIO_AF13_DCMI ((uint8_t)0x0DU) /* DCMI Alternate Function mapping */
Kojto 122:f9eeca106725 219 #if defined (STM32F769xx) || defined (STM32F779xx)
Kojto 122:f9eeca106725 220 #define GPIO_AF13_DSI ((uint8_t)0x0DU) /* DSI Alternate Function mapping */
Kojto 122:f9eeca106725 221 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 222 #if defined(STM32F746xx) || defined(STM32F756xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 223 #define GPIO_AF13_LTDC ((uint8_t)0x0DU) /* LTDC Alternate Function mapping */
Kojto 122:f9eeca106725 224
Kojto 115:87f2f5183dfb 225 /**
Kojto 115:87f2f5183dfb 226 * @brief AF 14 selection
Kojto 115:87f2f5183dfb 227 */
Kojto 122:f9eeca106725 228 #define GPIO_AF14_LTDC ((uint8_t)0x0EU) /* LCD-TFT Alternate Function mapping */
Kojto 122:f9eeca106725 229 #endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 115:87f2f5183dfb 230 /**
Kojto 115:87f2f5183dfb 231 * @brief AF 15 selection
Kojto 115:87f2f5183dfb 232 */
Kojto 122:f9eeca106725 233 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0FU) /* EVENTOUT Alternate Function mapping */
Kojto 115:87f2f5183dfb 234
Kojto 115:87f2f5183dfb 235
Kojto 115:87f2f5183dfb 236 /**
Kojto 115:87f2f5183dfb 237 * @}
Kojto 115:87f2f5183dfb 238 */
Kojto 115:87f2f5183dfb 239
Kojto 115:87f2f5183dfb 240 /**
Kojto 115:87f2f5183dfb 241 * @}
Kojto 115:87f2f5183dfb 242 */
Kojto 115:87f2f5183dfb 243
Kojto 115:87f2f5183dfb 244 /* Exported macro ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 245 /** @defgroup GPIOEx_Exported_Macros GPIO Exported Macros
Kojto 115:87f2f5183dfb 246 * @{
Kojto 115:87f2f5183dfb 247 */
Kojto 115:87f2f5183dfb 248 /**
Kojto 115:87f2f5183dfb 249 * @}
Kojto 115:87f2f5183dfb 250 */
Kojto 115:87f2f5183dfb 251
Kojto 115:87f2f5183dfb 252 /* Exported functions --------------------------------------------------------*/
Kojto 115:87f2f5183dfb 253 /** @defgroup GPIOEx_Exported_Functions GPIO Exported Functions
Kojto 115:87f2f5183dfb 254 * @{
Kojto 115:87f2f5183dfb 255 */
Kojto 115:87f2f5183dfb 256 /**
Kojto 115:87f2f5183dfb 257 * @}
Kojto 115:87f2f5183dfb 258 */
Kojto 115:87f2f5183dfb 259 /* Private types -------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 260 /* Private variables ---------------------------------------------------------*/
Kojto 115:87f2f5183dfb 261 /* Private constants ---------------------------------------------------------*/
Kojto 115:87f2f5183dfb 262 /** @defgroup GPIOEx_Private_Constants GPIO Private Constants
Kojto 115:87f2f5183dfb 263 * @{
Kojto 115:87f2f5183dfb 264 */
Kojto 115:87f2f5183dfb 265
Kojto 115:87f2f5183dfb 266 /**
Kojto 115:87f2f5183dfb 267 * @brief GPIO pin available on the platform
Kojto 115:87f2f5183dfb 268 */
Kojto 115:87f2f5183dfb 269 /* Defines the available pins per GPIOs */
Kojto 115:87f2f5183dfb 270 #define GPIOA_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 271 #define GPIOB_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 272 #define GPIOC_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 273 #define GPIOD_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 274 #define GPIOE_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 275 #define GPIOF_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 276 #define GPIOG_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 277 #define GPIOI_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 278 #define GPIOJ_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 279 #define GPIOH_PIN_AVAILABLE GPIO_PIN_All
Kojto 115:87f2f5183dfb 280 #define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3 | GPIO_PIN_4 | \
Kojto 115:87f2f5183dfb 281 GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
Kojto 115:87f2f5183dfb 282
Kojto 115:87f2f5183dfb 283 /**
Kojto 115:87f2f5183dfb 284 * @}
Kojto 115:87f2f5183dfb 285 */
Kojto 115:87f2f5183dfb 286
Kojto 115:87f2f5183dfb 287 /* Private macros ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 288 /** @defgroup GPIOEx_Private_Macros GPIO Private Macros
Kojto 115:87f2f5183dfb 289 * @{
Kojto 115:87f2f5183dfb 290 */
Kojto 115:87f2f5183dfb 291 /** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index
Kojto 115:87f2f5183dfb 292 * @{
Kojto 115:87f2f5183dfb 293 */
Kojto 115:87f2f5183dfb 294 #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\
Kojto 115:87f2f5183dfb 295 ((__GPIOx__) == (GPIOB))? 1U :\
Kojto 115:87f2f5183dfb 296 ((__GPIOx__) == (GPIOC))? 2U :\
Kojto 115:87f2f5183dfb 297 ((__GPIOx__) == (GPIOD))? 3U :\
Kojto 115:87f2f5183dfb 298 ((__GPIOx__) == (GPIOE))? 4U :\
Kojto 115:87f2f5183dfb 299 ((__GPIOx__) == (GPIOF))? 5U :\
Kojto 115:87f2f5183dfb 300 ((__GPIOx__) == (GPIOG))? 6U :\
Kojto 115:87f2f5183dfb 301 ((__GPIOx__) == (GPIOH))? 7U :\
Kojto 115:87f2f5183dfb 302 ((__GPIOx__) == (GPIOI))? 8U :\
Kojto 115:87f2f5183dfb 303 ((__GPIOx__) == (GPIOJ))? 9U : 10U)
Kojto 115:87f2f5183dfb 304 /**
Kojto 115:87f2f5183dfb 305 * @}
Kojto 115:87f2f5183dfb 306 */
Kojto 115:87f2f5183dfb 307
Kojto 115:87f2f5183dfb 308 #define IS_GPIO_PIN_AVAILABLE(__INSTANCE__,__PIN__) \
Kojto 115:87f2f5183dfb 309 ((((__INSTANCE__) == GPIOA) && (((__PIN__) & (GPIOA_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOA_PIN_AVAILABLE)) == (GPIOA_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 310 (((__INSTANCE__) == GPIOB) && (((__PIN__) & (GPIOB_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOB_PIN_AVAILABLE)) == (GPIOB_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 311 (((__INSTANCE__) == GPIOC) && (((__PIN__) & (GPIOC_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOC_PIN_AVAILABLE)) == (GPIOC_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 312 (((__INSTANCE__) == GPIOD) && (((__PIN__) & (GPIOD_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOD_PIN_AVAILABLE)) == (GPIOD_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 313 (((__INSTANCE__) == GPIOE) && (((__PIN__) & (GPIOE_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOE_PIN_AVAILABLE)) == (GPIOE_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 314 (((__INSTANCE__) == GPIOF) && (((__PIN__) & (GPIOF_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOF_PIN_AVAILABLE)) == (GPIOF_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 315 (((__INSTANCE__) == GPIOG) && (((__PIN__) & (GPIOG_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOG_PIN_AVAILABLE)) == (GPIOG_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 316 (((__INSTANCE__) == GPIOI) && (((__PIN__) & (GPIOI_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOI_PIN_AVAILABLE)) == (GPIOI_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 317 (((__INSTANCE__) == GPIOJ) && (((__PIN__) & (GPIOJ_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOJ_PIN_AVAILABLE)) == (GPIOJ_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 318 (((__INSTANCE__) == GPIOK) && (((__PIN__) & (GPIOK_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOK_PIN_AVAILABLE)) == (GPIOK_PIN_AVAILABLE))) || \
Kojto 115:87f2f5183dfb 319 (((__INSTANCE__) == GPIOH) && (((__PIN__) & (GPIOH_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOH_PIN_AVAILABLE)) == (GPIOH_PIN_AVAILABLE))))
Kojto 115:87f2f5183dfb 320 /** @defgroup GPIOEx_IS_Alternat_function_selection GPIO Check Alternate Function
Kojto 115:87f2f5183dfb 321 * @{
Kojto 115:87f2f5183dfb 322 */
Kojto 115:87f2f5183dfb 323 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 324 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \
Kojto 115:87f2f5183dfb 325 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 115:87f2f5183dfb 326 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 115:87f2f5183dfb 327 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 115:87f2f5183dfb 328 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 115:87f2f5183dfb 329 ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \
Kojto 115:87f2f5183dfb 330 ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \
Kojto 115:87f2f5183dfb 331 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 115:87f2f5183dfb 332 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 115:87f2f5183dfb 333 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \
Kojto 115:87f2f5183dfb 334 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 115:87f2f5183dfb 335 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 115:87f2f5183dfb 336 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 115:87f2f5183dfb 337 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 115:87f2f5183dfb 338 ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \
Kojto 115:87f2f5183dfb 339 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 115:87f2f5183dfb 340 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \
Kojto 115:87f2f5183dfb 341 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 115:87f2f5183dfb 342 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \
Kojto 115:87f2f5183dfb 343 ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \
Kojto 115:87f2f5183dfb 344 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 115:87f2f5183dfb 345 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 115:87f2f5183dfb 346 ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 115:87f2f5183dfb 347 ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \
Kojto 115:87f2f5183dfb 348 ((AF) == GPIO_AF9_LTDC) || ((AF) == GPIO_AF10_OTG_FS) || \
Kojto 115:87f2f5183dfb 349 ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \
Kojto 115:87f2f5183dfb 350 ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \
Kojto 115:87f2f5183dfb 351 ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1) || \
Kojto 115:87f2f5183dfb 352 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF15_EVENTOUT) || \
Kojto 115:87f2f5183dfb 353 ((AF) == GPIO_AF13_DCMI) || ((AF) == GPIO_AF14_LTDC))
Kojto 115:87f2f5183dfb 354 #elif defined(STM32F745xx)
Kojto 115:87f2f5183dfb 355 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \
Kojto 115:87f2f5183dfb 356 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 115:87f2f5183dfb 357 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 115:87f2f5183dfb 358 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 115:87f2f5183dfb 359 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 115:87f2f5183dfb 360 ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \
Kojto 115:87f2f5183dfb 361 ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \
Kojto 115:87f2f5183dfb 362 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 115:87f2f5183dfb 363 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 115:87f2f5183dfb 364 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \
Kojto 115:87f2f5183dfb 365 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 115:87f2f5183dfb 366 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 115:87f2f5183dfb 367 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 115:87f2f5183dfb 368 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 115:87f2f5183dfb 369 ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \
Kojto 115:87f2f5183dfb 370 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 115:87f2f5183dfb 371 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \
Kojto 115:87f2f5183dfb 372 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 115:87f2f5183dfb 373 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \
Kojto 115:87f2f5183dfb 374 ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \
Kojto 115:87f2f5183dfb 375 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 115:87f2f5183dfb 376 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 115:87f2f5183dfb 377 ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 115:87f2f5183dfb 378 ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \
Kojto 115:87f2f5183dfb 379 ((AF) == GPIO_AF13_DCMI) || ((AF) == GPIO_AF10_OTG_FS) || \
Kojto 115:87f2f5183dfb 380 ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \
Kojto 115:87f2f5183dfb 381 ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \
Kojto 115:87f2f5183dfb 382 ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1) || \
Kojto 115:87f2f5183dfb 383 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF15_EVENTOUT))
Kojto 122:f9eeca106725 384 #elif defined(STM32F767xx) || defined(STM32F777xx)
Kojto 122:f9eeca106725 385 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \
Kojto 122:f9eeca106725 386 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 122:f9eeca106725 387 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 122:f9eeca106725 388 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 122:f9eeca106725 389 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 122:f9eeca106725 390 ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \
Kojto 122:f9eeca106725 391 ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \
Kojto 122:f9eeca106725 392 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 122:f9eeca106725 393 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 122:f9eeca106725 394 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \
Kojto 122:f9eeca106725 395 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 122:f9eeca106725 396 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 122:f9eeca106725 397 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 122:f9eeca106725 398 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 122:f9eeca106725 399 ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \
Kojto 122:f9eeca106725 400 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 122:f9eeca106725 401 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \
Kojto 122:f9eeca106725 402 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 122:f9eeca106725 403 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \
Kojto 122:f9eeca106725 404 ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \
Kojto 122:f9eeca106725 405 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 122:f9eeca106725 406 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 122:f9eeca106725 407 ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 122:f9eeca106725 408 ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \
Kojto 122:f9eeca106725 409 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF9_LTDC) || \
Kojto 122:f9eeca106725 410 ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \
Kojto 122:f9eeca106725 411 ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \
Kojto 122:f9eeca106725 412 ((AF) == GPIO_AF11_CAN3) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 122:f9eeca106725 413 ((AF) == GPIO_AF12_SDMMC1) || ((AF) == GPIO_AF12_FMC) || \
Kojto 122:f9eeca106725 414 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 122:f9eeca106725 415 ((AF) == GPIO_AF14_LTDC))
Kojto 122:f9eeca106725 416 #elif defined(STM32F769xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 417 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \
Kojto 122:f9eeca106725 418 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 122:f9eeca106725 419 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 122:f9eeca106725 420 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 122:f9eeca106725 421 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 122:f9eeca106725 422 ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \
Kojto 122:f9eeca106725 423 ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \
Kojto 122:f9eeca106725 424 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 122:f9eeca106725 425 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 122:f9eeca106725 426 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \
Kojto 122:f9eeca106725 427 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 122:f9eeca106725 428 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 122:f9eeca106725 429 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 122:f9eeca106725 430 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 122:f9eeca106725 431 ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \
Kojto 122:f9eeca106725 432 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 122:f9eeca106725 433 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \
Kojto 122:f9eeca106725 434 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 122:f9eeca106725 435 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \
Kojto 122:f9eeca106725 436 ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \
Kojto 122:f9eeca106725 437 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 122:f9eeca106725 438 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 122:f9eeca106725 439 ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 122:f9eeca106725 440 ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \
Kojto 122:f9eeca106725 441 ((AF) == GPIO_AF9_LTDC) || ((AF) == GPIO_AF10_OTG_FS) || \
Kojto 122:f9eeca106725 442 ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \
Kojto 122:f9eeca106725 443 ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \
Kojto 122:f9eeca106725 444 ((AF) == GPIO_AF11_CAN3) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 122:f9eeca106725 445 ((AF) == GPIO_AF12_SDMMC1) || ((AF) == GPIO_AF12_FMC) || \
Kojto 122:f9eeca106725 446 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 122:f9eeca106725 447 ((AF) == GPIO_AF14_LTDC) || ((AF) == GPIO_AF13_DSI))
Kojto 122:f9eeca106725 448 #elif defined(STM32F765xx)
Kojto 122:f9eeca106725 449 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \
Kojto 122:f9eeca106725 450 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
Kojto 122:f9eeca106725 451 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \
Kojto 122:f9eeca106725 452 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
Kojto 122:f9eeca106725 453 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
Kojto 122:f9eeca106725 454 ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \
Kojto 122:f9eeca106725 455 ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \
Kojto 122:f9eeca106725 456 ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \
Kojto 122:f9eeca106725 457 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
Kojto 122:f9eeca106725 458 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \
Kojto 122:f9eeca106725 459 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
Kojto 122:f9eeca106725 460 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
Kojto 122:f9eeca106725 461 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
Kojto 122:f9eeca106725 462 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \
Kojto 122:f9eeca106725 463 ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \
Kojto 122:f9eeca106725 464 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
Kojto 122:f9eeca106725 465 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \
Kojto 122:f9eeca106725 466 ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \
Kojto 122:f9eeca106725 467 ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \
Kojto 122:f9eeca106725 468 ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \
Kojto 122:f9eeca106725 469 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
Kojto 122:f9eeca106725 470 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
Kojto 122:f9eeca106725 471 ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \
Kojto 122:f9eeca106725 472 ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \
Kojto 122:f9eeca106725 473 ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \
Kojto 122:f9eeca106725 474 ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \
Kojto 122:f9eeca106725 475 ((AF) == GPIO_AF11_CAN3) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
Kojto 122:f9eeca106725 476 ((AF) == GPIO_AF12_SDMMC1) || ((AF) == GPIO_AF12_FMC) || \
Kojto 122:f9eeca106725 477 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF13_DCMI) || \
Kojto 122:f9eeca106725 478 ((AF) == GPIO_AF10_OTG_FS))
Kojto 115:87f2f5183dfb 479 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 480 /**
Kojto 115:87f2f5183dfb 481 * @}
Kojto 115:87f2f5183dfb 482 */
Kojto 115:87f2f5183dfb 483
Kojto 115:87f2f5183dfb 484 /**
Kojto 115:87f2f5183dfb 485 * @}
Kojto 115:87f2f5183dfb 486 */
Kojto 115:87f2f5183dfb 487
Kojto 115:87f2f5183dfb 488 /* Private functions ---------------------------------------------------------*/
Kojto 115:87f2f5183dfb 489 /** @defgroup GPIOEx_Private_Functions GPIO Private Functions
Kojto 115:87f2f5183dfb 490 * @{
Kojto 115:87f2f5183dfb 491 */
Kojto 115:87f2f5183dfb 492
Kojto 115:87f2f5183dfb 493 /**
Kojto 115:87f2f5183dfb 494 * @}
Kojto 115:87f2f5183dfb 495 */
Kojto 115:87f2f5183dfb 496
Kojto 115:87f2f5183dfb 497 /**
Kojto 115:87f2f5183dfb 498 * @}
Kojto 115:87f2f5183dfb 499 */
Kojto 115:87f2f5183dfb 500
Kojto 115:87f2f5183dfb 501 /**
Kojto 115:87f2f5183dfb 502 * @}
Kojto 115:87f2f5183dfb 503 */
Kojto 115:87f2f5183dfb 504
Kojto 115:87f2f5183dfb 505 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 506 }
Kojto 115:87f2f5183dfb 507 #endif
Kojto 115:87f2f5183dfb 508
Kojto 115:87f2f5183dfb 509 #endif /* __STM32F7xx_HAL_GPIO_EX_H */
Kojto 115:87f2f5183dfb 510
Kojto 115:87f2f5183dfb 511 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/