Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_DISCO_F746NG/stm32f7xx_hal_gpio_ex.h@116:c0f6e94411f5, 2016-03-15 (annotated)
- Committer:
- Kojto
- Date:
- Tue Mar 15 14:34:00 2016 +0000
- Revision:
- 116:c0f6e94411f5
- Parent:
- 107:4f6c30876dfa
Release 116 of the mbed library
Changes:
- new targets - NUCLEO_L073RZ
- fixes to IOTSS BEID platform
- LPC824, LPC1549 and LPC11U68 - fix PWMOut SCT bugs
- STM32F7 - Cube driver
- STM32F4 - add RTC LSI macro, defined as 0
- STM32F3 - fix multiple ADC clock initialization
- retarget - binary mode fix for GCC
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 107:4f6c30876dfa | 1 | /** |
Kojto | 107:4f6c30876dfa | 2 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 3 | * @file stm32f7xx_hal_gpio_ex.h |
Kojto | 107:4f6c30876dfa | 4 | * @author MCD Application Team |
Kojto | 116:c0f6e94411f5 | 5 | * @version V1.0.4 |
Kojto | 116:c0f6e94411f5 | 6 | * @date 09-December-2015 |
Kojto | 107:4f6c30876dfa | 7 | * @brief Header file of GPIO HAL Extension module. |
Kojto | 107:4f6c30876dfa | 8 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 9 | * @attention |
Kojto | 107:4f6c30876dfa | 10 | * |
Kojto | 107:4f6c30876dfa | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
Kojto | 107:4f6c30876dfa | 12 | * |
Kojto | 107:4f6c30876dfa | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 107:4f6c30876dfa | 14 | * are permitted provided that the following conditions are met: |
Kojto | 107:4f6c30876dfa | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 107:4f6c30876dfa | 16 | * this list of conditions and the following disclaimer. |
Kojto | 107:4f6c30876dfa | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 107:4f6c30876dfa | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 107:4f6c30876dfa | 19 | * and/or other materials provided with the distribution. |
Kojto | 107:4f6c30876dfa | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 107:4f6c30876dfa | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 107:4f6c30876dfa | 22 | * without specific prior written permission. |
Kojto | 107:4f6c30876dfa | 23 | * |
Kojto | 107:4f6c30876dfa | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 107:4f6c30876dfa | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 107:4f6c30876dfa | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 107:4f6c30876dfa | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 107:4f6c30876dfa | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 107:4f6c30876dfa | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 107:4f6c30876dfa | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 107:4f6c30876dfa | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 107:4f6c30876dfa | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 107:4f6c30876dfa | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 107:4f6c30876dfa | 34 | * |
Kojto | 107:4f6c30876dfa | 35 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 36 | */ |
Kojto | 107:4f6c30876dfa | 37 | |
Kojto | 107:4f6c30876dfa | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 39 | #ifndef __STM32F7xx_HAL_GPIO_EX_H |
Kojto | 107:4f6c30876dfa | 40 | #define __STM32F7xx_HAL_GPIO_EX_H |
Kojto | 107:4f6c30876dfa | 41 | |
Kojto | 107:4f6c30876dfa | 42 | #ifdef __cplusplus |
Kojto | 107:4f6c30876dfa | 43 | extern "C" { |
Kojto | 107:4f6c30876dfa | 44 | #endif |
Kojto | 107:4f6c30876dfa | 45 | |
Kojto | 107:4f6c30876dfa | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 47 | #include "stm32f7xx_hal_def.h" |
Kojto | 107:4f6c30876dfa | 48 | |
Kojto | 107:4f6c30876dfa | 49 | /** @addtogroup STM32F7xx_HAL_Driver |
Kojto | 107:4f6c30876dfa | 50 | * @{ |
Kojto | 107:4f6c30876dfa | 51 | */ |
Kojto | 107:4f6c30876dfa | 52 | |
Kojto | 107:4f6c30876dfa | 53 | /** @defgroup GPIOEx GPIOEx |
Kojto | 107:4f6c30876dfa | 54 | * @{ |
Kojto | 107:4f6c30876dfa | 55 | */ |
Kojto | 107:4f6c30876dfa | 56 | |
Kojto | 107:4f6c30876dfa | 57 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 58 | |
Kojto | 107:4f6c30876dfa | 59 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 60 | /** @defgroup GPIOEx_Exported_Constants GPIO Exported Constants |
Kojto | 107:4f6c30876dfa | 61 | * @{ |
Kojto | 107:4f6c30876dfa | 62 | */ |
Kojto | 107:4f6c30876dfa | 63 | |
Kojto | 107:4f6c30876dfa | 64 | /** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection |
Kojto | 107:4f6c30876dfa | 65 | * @{ |
Kojto | 107:4f6c30876dfa | 66 | */ |
Kojto | 107:4f6c30876dfa | 67 | |
Kojto | 107:4f6c30876dfa | 68 | /** |
Kojto | 107:4f6c30876dfa | 69 | * @brief AF 0 selection |
Kojto | 107:4f6c30876dfa | 70 | */ |
Kojto | 107:4f6c30876dfa | 71 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 72 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 73 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 74 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 75 | |
Kojto | 107:4f6c30876dfa | 76 | /** |
Kojto | 107:4f6c30876dfa | 77 | * @brief AF 1 selection |
Kojto | 107:4f6c30876dfa | 78 | */ |
Kojto | 107:4f6c30876dfa | 79 | #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 80 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 81 | |
Kojto | 107:4f6c30876dfa | 82 | /** |
Kojto | 107:4f6c30876dfa | 83 | * @brief AF 2 selection |
Kojto | 107:4f6c30876dfa | 84 | */ |
Kojto | 107:4f6c30876dfa | 85 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 86 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 87 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 88 | |
Kojto | 107:4f6c30876dfa | 89 | /** |
Kojto | 107:4f6c30876dfa | 90 | * @brief AF 3 selection |
Kojto | 107:4f6c30876dfa | 91 | */ |
Kojto | 107:4f6c30876dfa | 92 | #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 93 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 94 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 95 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 96 | #define GPIO_AF3_LPTIM1 ((uint8_t)0x03) /* LPTIM1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 97 | #define GPIO_AF3_CEC ((uint8_t)0x03) /* CEC Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 98 | |
Kojto | 107:4f6c30876dfa | 99 | /** |
Kojto | 107:4f6c30876dfa | 100 | * @brief AF 4 selection |
Kojto | 107:4f6c30876dfa | 101 | */ |
Kojto | 107:4f6c30876dfa | 102 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 103 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 104 | #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 105 | #define GPIO_AF4_I2C4 ((uint8_t)0x04) /* I2C4 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 106 | #define GPIO_AF4_CEC ((uint8_t)0x04) /* CEC Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 107 | |
Kojto | 107:4f6c30876dfa | 108 | /** |
Kojto | 107:4f6c30876dfa | 109 | * @brief AF 5 selection |
Kojto | 107:4f6c30876dfa | 110 | */ |
Kojto | 107:4f6c30876dfa | 111 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 112 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 113 | #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 114 | #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 115 | #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 116 | #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 117 | |
Kojto | 107:4f6c30876dfa | 118 | /** |
Kojto | 107:4f6c30876dfa | 119 | * @brief AF 6 selection |
Kojto | 107:4f6c30876dfa | 120 | */ |
Kojto | 107:4f6c30876dfa | 121 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 122 | #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 123 | |
Kojto | 107:4f6c30876dfa | 124 | /** |
Kojto | 107:4f6c30876dfa | 125 | * @brief AF 7 selection |
Kojto | 107:4f6c30876dfa | 126 | */ |
Kojto | 107:4f6c30876dfa | 127 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 128 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 129 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 130 | #define GPIO_AF7_UART5 ((uint8_t)0x07) /* UART5 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 131 | #define GPIO_AF7_SPDIFRX ((uint8_t)0x07) /* SPDIF-RX Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 132 | #define GPIO_AF7_SPI2 ((uint8_t)0x07) /* SPI2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 133 | #define GPIO_AF7_SPI3 ((uint8_t)0x07) /* SPI3 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 134 | /** |
Kojto | 107:4f6c30876dfa | 135 | * @brief AF 8 selection |
Kojto | 107:4f6c30876dfa | 136 | */ |
Kojto | 107:4f6c30876dfa | 137 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 138 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 139 | #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 140 | #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 141 | #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 142 | #define GPIO_AF8_SPDIFRX ((uint8_t)0x08) /* SPIDIF-RX Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 143 | #define GPIO_AF8_SAI2 ((uint8_t)0x08) /* SAI2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 144 | |
Kojto | 107:4f6c30876dfa | 145 | |
Kojto | 107:4f6c30876dfa | 146 | /** |
Kojto | 107:4f6c30876dfa | 147 | * @brief AF 9 selection |
Kojto | 107:4f6c30876dfa | 148 | */ |
Kojto | 107:4f6c30876dfa | 149 | #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 150 | #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 151 | #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 152 | #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 153 | #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 154 | #define GPIO_AF9_QUADSPI ((uint8_t)0x09) /* QUADSPI Alternate Function mapping */ |
Kojto | 116:c0f6e94411f5 | 155 | #if defined(STM32F746xx) || defined(STM32F756xx) |
Kojto | 107:4f6c30876dfa | 156 | #define GPIO_AF9_LTDC ((uint8_t)0x09) /* LCD-TFT Alternate Function mapping */ |
Kojto | 116:c0f6e94411f5 | 157 | #endif /* STM32F746xx || STM32F756xx */ |
Kojto | 107:4f6c30876dfa | 158 | /** |
Kojto | 107:4f6c30876dfa | 159 | * @brief AF 10 selection |
Kojto | 107:4f6c30876dfa | 160 | */ |
Kojto | 107:4f6c30876dfa | 161 | #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 162 | #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 163 | #define GPIO_AF10_QUADSPI ((uint8_t)0xA) /* QUADSPI Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 164 | #define GPIO_AF10_SAI2 ((uint8_t)0xA) /* SAI2 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 165 | |
Kojto | 107:4f6c30876dfa | 166 | /** |
Kojto | 107:4f6c30876dfa | 167 | * @brief AF 11 selection |
Kojto | 107:4f6c30876dfa | 168 | */ |
Kojto | 107:4f6c30876dfa | 169 | #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 170 | |
Kojto | 107:4f6c30876dfa | 171 | /** |
Kojto | 107:4f6c30876dfa | 172 | * @brief AF 12 selection |
Kojto | 107:4f6c30876dfa | 173 | */ |
Kojto | 107:4f6c30876dfa | 174 | #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 175 | #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 176 | #define GPIO_AF12_SDMMC1 ((uint8_t)0xC) /* SDMMC1 Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 177 | |
Kojto | 107:4f6c30876dfa | 178 | /** |
Kojto | 107:4f6c30876dfa | 179 | * @brief AF 13 selection |
Kojto | 107:4f6c30876dfa | 180 | */ |
Kojto | 107:4f6c30876dfa | 181 | #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 182 | |
Kojto | 116:c0f6e94411f5 | 183 | #if defined(STM32F746xx) || defined(STM32F756xx) |
Kojto | 107:4f6c30876dfa | 184 | /** |
Kojto | 107:4f6c30876dfa | 185 | * @brief AF 14 selection |
Kojto | 107:4f6c30876dfa | 186 | */ |
Kojto | 107:4f6c30876dfa | 187 | #define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LCD-TFT Alternate Function mapping */ |
Kojto | 116:c0f6e94411f5 | 188 | #endif /* STM32F746xx || STM32F756xx */ |
Kojto | 107:4f6c30876dfa | 189 | /** |
Kojto | 107:4f6c30876dfa | 190 | * @brief AF 15 selection |
Kojto | 107:4f6c30876dfa | 191 | */ |
Kojto | 107:4f6c30876dfa | 192 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
Kojto | 107:4f6c30876dfa | 193 | |
Kojto | 107:4f6c30876dfa | 194 | |
Kojto | 107:4f6c30876dfa | 195 | /** |
Kojto | 107:4f6c30876dfa | 196 | * @} |
Kojto | 107:4f6c30876dfa | 197 | */ |
Kojto | 107:4f6c30876dfa | 198 | |
Kojto | 107:4f6c30876dfa | 199 | /** |
Kojto | 107:4f6c30876dfa | 200 | * @} |
Kojto | 107:4f6c30876dfa | 201 | */ |
Kojto | 107:4f6c30876dfa | 202 | |
Kojto | 107:4f6c30876dfa | 203 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 204 | /** @defgroup GPIOEx_Exported_Macros GPIO Exported Macros |
Kojto | 107:4f6c30876dfa | 205 | * @{ |
Kojto | 107:4f6c30876dfa | 206 | */ |
Kojto | 107:4f6c30876dfa | 207 | /** |
Kojto | 107:4f6c30876dfa | 208 | * @} |
Kojto | 107:4f6c30876dfa | 209 | */ |
Kojto | 107:4f6c30876dfa | 210 | |
Kojto | 107:4f6c30876dfa | 211 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 212 | /** @defgroup GPIOEx_Exported_Functions GPIO Exported Functions |
Kojto | 107:4f6c30876dfa | 213 | * @{ |
Kojto | 107:4f6c30876dfa | 214 | */ |
Kojto | 107:4f6c30876dfa | 215 | /** |
Kojto | 107:4f6c30876dfa | 216 | * @} |
Kojto | 107:4f6c30876dfa | 217 | */ |
Kojto | 107:4f6c30876dfa | 218 | /* Private types -------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 219 | /* Private variables ---------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 220 | /* Private constants ---------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 221 | /** @defgroup GPIOEx_Private_Constants GPIO Private Constants |
Kojto | 107:4f6c30876dfa | 222 | * @{ |
Kojto | 107:4f6c30876dfa | 223 | */ |
Kojto | 107:4f6c30876dfa | 224 | |
Kojto | 107:4f6c30876dfa | 225 | /** |
Kojto | 107:4f6c30876dfa | 226 | * @brief GPIO pin available on the platform |
Kojto | 107:4f6c30876dfa | 227 | */ |
Kojto | 107:4f6c30876dfa | 228 | /* Defines the available pins per GPIOs */ |
Kojto | 107:4f6c30876dfa | 229 | #define GPIOA_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 230 | #define GPIOB_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 231 | #define GPIOC_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 232 | #define GPIOD_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 233 | #define GPIOE_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 234 | #define GPIOF_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 235 | #define GPIOG_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 236 | #define GPIOI_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 237 | #define GPIOJ_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 238 | #define GPIOH_PIN_AVAILABLE GPIO_PIN_All |
Kojto | 107:4f6c30876dfa | 239 | #define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3 | GPIO_PIN_4 | \ |
Kojto | 107:4f6c30876dfa | 240 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) |
Kojto | 107:4f6c30876dfa | 241 | |
Kojto | 107:4f6c30876dfa | 242 | /** |
Kojto | 107:4f6c30876dfa | 243 | * @} |
Kojto | 107:4f6c30876dfa | 244 | */ |
Kojto | 107:4f6c30876dfa | 245 | |
Kojto | 107:4f6c30876dfa | 246 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 247 | /** @defgroup GPIOEx_Private_Macros GPIO Private Macros |
Kojto | 107:4f6c30876dfa | 248 | * @{ |
Kojto | 107:4f6c30876dfa | 249 | */ |
Kojto | 107:4f6c30876dfa | 250 | /** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index |
Kojto | 107:4f6c30876dfa | 251 | * @{ |
Kojto | 107:4f6c30876dfa | 252 | */ |
Kojto | 107:4f6c30876dfa | 253 | #define GPIO_GET_INDEX(__GPIOx__) (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\ |
Kojto | 107:4f6c30876dfa | 254 | ((__GPIOx__) == (GPIOB))? 1U :\ |
Kojto | 107:4f6c30876dfa | 255 | ((__GPIOx__) == (GPIOC))? 2U :\ |
Kojto | 107:4f6c30876dfa | 256 | ((__GPIOx__) == (GPIOD))? 3U :\ |
Kojto | 107:4f6c30876dfa | 257 | ((__GPIOx__) == (GPIOE))? 4U :\ |
Kojto | 107:4f6c30876dfa | 258 | ((__GPIOx__) == (GPIOF))? 5U :\ |
Kojto | 107:4f6c30876dfa | 259 | ((__GPIOx__) == (GPIOG))? 6U :\ |
Kojto | 107:4f6c30876dfa | 260 | ((__GPIOx__) == (GPIOH))? 7U :\ |
Kojto | 107:4f6c30876dfa | 261 | ((__GPIOx__) == (GPIOI))? 8U :\ |
Kojto | 107:4f6c30876dfa | 262 | ((__GPIOx__) == (GPIOJ))? 9U : 10U) |
Kojto | 107:4f6c30876dfa | 263 | /** |
Kojto | 107:4f6c30876dfa | 264 | * @} |
Kojto | 107:4f6c30876dfa | 265 | */ |
Kojto | 107:4f6c30876dfa | 266 | |
Kojto | 107:4f6c30876dfa | 267 | #define IS_GPIO_PIN_AVAILABLE(__INSTANCE__,__PIN__) \ |
Kojto | 107:4f6c30876dfa | 268 | ((((__INSTANCE__) == GPIOA) && (((__PIN__) & (GPIOA_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOA_PIN_AVAILABLE)) == (GPIOA_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 269 | (((__INSTANCE__) == GPIOB) && (((__PIN__) & (GPIOB_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOB_PIN_AVAILABLE)) == (GPIOB_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 270 | (((__INSTANCE__) == GPIOC) && (((__PIN__) & (GPIOC_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOC_PIN_AVAILABLE)) == (GPIOC_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 271 | (((__INSTANCE__) == GPIOD) && (((__PIN__) & (GPIOD_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOD_PIN_AVAILABLE)) == (GPIOD_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 272 | (((__INSTANCE__) == GPIOE) && (((__PIN__) & (GPIOE_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOE_PIN_AVAILABLE)) == (GPIOE_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 273 | (((__INSTANCE__) == GPIOF) && (((__PIN__) & (GPIOF_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOF_PIN_AVAILABLE)) == (GPIOF_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 274 | (((__INSTANCE__) == GPIOG) && (((__PIN__) & (GPIOG_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOG_PIN_AVAILABLE)) == (GPIOG_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 275 | (((__INSTANCE__) == GPIOI) && (((__PIN__) & (GPIOI_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOI_PIN_AVAILABLE)) == (GPIOI_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 276 | (((__INSTANCE__) == GPIOJ) && (((__PIN__) & (GPIOJ_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOJ_PIN_AVAILABLE)) == (GPIOJ_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 277 | (((__INSTANCE__) == GPIOK) && (((__PIN__) & (GPIOK_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOK_PIN_AVAILABLE)) == (GPIOK_PIN_AVAILABLE))) || \ |
Kojto | 107:4f6c30876dfa | 278 | (((__INSTANCE__) == GPIOH) && (((__PIN__) & (GPIOH_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOH_PIN_AVAILABLE)) == (GPIOH_PIN_AVAILABLE)))) |
Kojto | 107:4f6c30876dfa | 279 | /** @defgroup GPIOEx_IS_Alternat_function_selection GPIO Check Alternate Function |
Kojto | 107:4f6c30876dfa | 280 | * @{ |
Kojto | 107:4f6c30876dfa | 281 | */ |
Kojto | 107:4f6c30876dfa | 282 | #if defined(STM32F756xx) || defined(STM32F746xx) |
Kojto | 107:4f6c30876dfa | 283 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \ |
Kojto | 107:4f6c30876dfa | 284 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 107:4f6c30876dfa | 285 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 107:4f6c30876dfa | 286 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 107:4f6c30876dfa | 287 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 107:4f6c30876dfa | 288 | ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \ |
Kojto | 107:4f6c30876dfa | 289 | ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \ |
Kojto | 107:4f6c30876dfa | 290 | ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \ |
Kojto | 107:4f6c30876dfa | 291 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 107:4f6c30876dfa | 292 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \ |
Kojto | 107:4f6c30876dfa | 293 | ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \ |
Kojto | 107:4f6c30876dfa | 294 | ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 107:4f6c30876dfa | 295 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
Kojto | 107:4f6c30876dfa | 296 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \ |
Kojto | 107:4f6c30876dfa | 297 | ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \ |
Kojto | 107:4f6c30876dfa | 298 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 107:4f6c30876dfa | 299 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \ |
Kojto | 107:4f6c30876dfa | 300 | ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \ |
Kojto | 107:4f6c30876dfa | 301 | ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 107:4f6c30876dfa | 302 | ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \ |
Kojto | 107:4f6c30876dfa | 303 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
Kojto | 107:4f6c30876dfa | 304 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 107:4f6c30876dfa | 305 | ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 107:4f6c30876dfa | 306 | ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \ |
Kojto | 107:4f6c30876dfa | 307 | ((AF) == GPIO_AF9_LTDC) || ((AF) == GPIO_AF10_OTG_FS) || \ |
Kojto | 107:4f6c30876dfa | 308 | ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \ |
Kojto | 107:4f6c30876dfa | 309 | ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \ |
Kojto | 107:4f6c30876dfa | 310 | ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1) || \ |
Kojto | 107:4f6c30876dfa | 311 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF15_EVENTOUT) || \ |
Kojto | 107:4f6c30876dfa | 312 | ((AF) == GPIO_AF13_DCMI) || ((AF) == GPIO_AF14_LTDC)) |
Kojto | 107:4f6c30876dfa | 313 | #elif defined(STM32F745xx) |
Kojto | 107:4f6c30876dfa | 314 | #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF1_TIM1) || \ |
Kojto | 107:4f6c30876dfa | 315 | ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \ |
Kojto | 107:4f6c30876dfa | 316 | ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF1_TIM2) || \ |
Kojto | 107:4f6c30876dfa | 317 | ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \ |
Kojto | 107:4f6c30876dfa | 318 | ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \ |
Kojto | 107:4f6c30876dfa | 319 | ((AF) == GPIO_AF3_TIM9) || ((AF) == GPIO_AF3_TIM10) || \ |
Kojto | 107:4f6c30876dfa | 320 | ((AF) == GPIO_AF3_TIM11) || ((AF) == GPIO_AF3_LPTIM1) || \ |
Kojto | 107:4f6c30876dfa | 321 | ((AF) == GPIO_AF3_CEC) || ((AF) == GPIO_AF4_CEC) || \ |
Kojto | 107:4f6c30876dfa | 322 | ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \ |
Kojto | 107:4f6c30876dfa | 323 | ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF4_I2C4) || \ |
Kojto | 107:4f6c30876dfa | 324 | ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \ |
Kojto | 107:4f6c30876dfa | 325 | ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF5_SPI4) || \ |
Kojto | 107:4f6c30876dfa | 326 | ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \ |
Kojto | 107:4f6c30876dfa | 327 | ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF6_SAI1) || \ |
Kojto | 107:4f6c30876dfa | 328 | ((AF) == GPIO_AF7_SPI3) || ((AF) == GPIO_AF7_SPI2) || \ |
Kojto | 107:4f6c30876dfa | 329 | ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \ |
Kojto | 107:4f6c30876dfa | 330 | ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF7_UART5) || \ |
Kojto | 107:4f6c30876dfa | 331 | ((AF) == GPIO_AF7_SPDIFRX) || ((AF) == GPIO_AF8_SPDIFRX) || \ |
Kojto | 107:4f6c30876dfa | 332 | ((AF) == GPIO_AF8_SAI2) || ((AF) == GPIO_AF8_USART6) || \ |
Kojto | 107:4f6c30876dfa | 333 | ((AF) == GPIO_AF8_UART4) || ((AF) == GPIO_AF8_UART5) || \ |
Kojto | 107:4f6c30876dfa | 334 | ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \ |
Kojto | 107:4f6c30876dfa | 335 | ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \ |
Kojto | 107:4f6c30876dfa | 336 | ((AF) == GPIO_AF9_TIM12) || ((AF) == GPIO_AF9_TIM12) || \ |
Kojto | 107:4f6c30876dfa | 337 | ((AF) == GPIO_AF9_TIM14) || ((AF) == GPIO_AF9_QUADSPI) || \ |
Kojto | 107:4f6c30876dfa | 338 | ((AF) == GPIO_AF13_DCMI) || ((AF) == GPIO_AF10_OTG_FS) || \ |
Kojto | 107:4f6c30876dfa | 339 | ((AF) == GPIO_AF10_OTG_HS) || ((AF) == GPIO_AF10_SAI2) || \ |
Kojto | 107:4f6c30876dfa | 340 | ((AF) == GPIO_AF10_QUADSPI) || ((AF) == GPIO_AF11_ETH) || \ |
Kojto | 107:4f6c30876dfa | 341 | ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1) || \ |
Kojto | 107:4f6c30876dfa | 342 | ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF15_EVENTOUT)) |
Kojto | 107:4f6c30876dfa | 343 | #endif /* STM32F756xx || STM32F746xx */ |
Kojto | 107:4f6c30876dfa | 344 | /** |
Kojto | 107:4f6c30876dfa | 345 | * @} |
Kojto | 107:4f6c30876dfa | 346 | */ |
Kojto | 107:4f6c30876dfa | 347 | |
Kojto | 107:4f6c30876dfa | 348 | /** |
Kojto | 107:4f6c30876dfa | 349 | * @} |
Kojto | 107:4f6c30876dfa | 350 | */ |
Kojto | 107:4f6c30876dfa | 351 | |
Kojto | 107:4f6c30876dfa | 352 | /* Private functions ---------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 353 | /** @defgroup GPIOEx_Private_Functions GPIO Private Functions |
Kojto | 107:4f6c30876dfa | 354 | * @{ |
Kojto | 107:4f6c30876dfa | 355 | */ |
Kojto | 107:4f6c30876dfa | 356 | |
Kojto | 107:4f6c30876dfa | 357 | /** |
Kojto | 107:4f6c30876dfa | 358 | * @} |
Kojto | 107:4f6c30876dfa | 359 | */ |
Kojto | 107:4f6c30876dfa | 360 | |
Kojto | 107:4f6c30876dfa | 361 | /** |
Kojto | 107:4f6c30876dfa | 362 | * @} |
Kojto | 107:4f6c30876dfa | 363 | */ |
Kojto | 107:4f6c30876dfa | 364 | |
Kojto | 107:4f6c30876dfa | 365 | /** |
Kojto | 107:4f6c30876dfa | 366 | * @} |
Kojto | 107:4f6c30876dfa | 367 | */ |
Kojto | 107:4f6c30876dfa | 368 | |
Kojto | 107:4f6c30876dfa | 369 | #ifdef __cplusplus |
Kojto | 107:4f6c30876dfa | 370 | } |
Kojto | 107:4f6c30876dfa | 371 | #endif |
Kojto | 107:4f6c30876dfa | 372 | |
Kojto | 107:4f6c30876dfa | 373 | #endif /* __STM32F7xx_HAL_GPIO_EX_H */ |
Kojto | 107:4f6c30876dfa | 374 | |
Kojto | 107:4f6c30876dfa | 375 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |