mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_STM32L1/stm32l1xx_hal_gpio_ex.h@636:b0d178e9fa10, 2016-07-07 (annotated)
- Committer:
- lzbpli
- Date:
- Thu Jul 07 06:48:59 2016 +0000
- Revision:
- 636:b0d178e9fa10
- Parent:
- 394:83f921546702
l053
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 354:e67efb2aab0e | 1 | /** |
mbed_official | 354:e67efb2aab0e | 2 | ****************************************************************************** |
mbed_official | 354:e67efb2aab0e | 3 | * @file stm32l1xx_hal_gpio_ex.h |
mbed_official | 354:e67efb2aab0e | 4 | * @author MCD Application Team |
mbed_official | 354:e67efb2aab0e | 5 | * @version V1.0.0 |
mbed_official | 354:e67efb2aab0e | 6 | * @date 5-September-2014 |
mbed_official | 354:e67efb2aab0e | 7 | * @brief Header file of GPIO HAL Extension module. |
mbed_official | 354:e67efb2aab0e | 8 | ****************************************************************************** |
mbed_official | 354:e67efb2aab0e | 9 | * @attention |
mbed_official | 354:e67efb2aab0e | 10 | * |
mbed_official | 354:e67efb2aab0e | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 354:e67efb2aab0e | 12 | * |
mbed_official | 354:e67efb2aab0e | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 354:e67efb2aab0e | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 354:e67efb2aab0e | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 354:e67efb2aab0e | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 354:e67efb2aab0e | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 354:e67efb2aab0e | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 354:e67efb2aab0e | 19 | * and/or other materials provided with the distribution. |
mbed_official | 354:e67efb2aab0e | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 354:e67efb2aab0e | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 354:e67efb2aab0e | 22 | * without specific prior written permission. |
mbed_official | 354:e67efb2aab0e | 23 | * |
mbed_official | 354:e67efb2aab0e | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 354:e67efb2aab0e | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 354:e67efb2aab0e | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 354:e67efb2aab0e | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 354:e67efb2aab0e | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 354:e67efb2aab0e | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 354:e67efb2aab0e | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 354:e67efb2aab0e | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 354:e67efb2aab0e | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 354:e67efb2aab0e | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 354:e67efb2aab0e | 34 | * |
mbed_official | 354:e67efb2aab0e | 35 | ****************************************************************************** |
mbed_official | 354:e67efb2aab0e | 36 | */ |
mbed_official | 354:e67efb2aab0e | 37 | |
mbed_official | 354:e67efb2aab0e | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 39 | #ifndef __STM32L1xx_HAL_GPIO_EX_H |
mbed_official | 354:e67efb2aab0e | 40 | #define __STM32L1xx_HAL_GPIO_EX_H |
mbed_official | 354:e67efb2aab0e | 41 | |
mbed_official | 354:e67efb2aab0e | 42 | #ifdef __cplusplus |
mbed_official | 354:e67efb2aab0e | 43 | extern "C" { |
mbed_official | 354:e67efb2aab0e | 44 | #endif |
mbed_official | 354:e67efb2aab0e | 45 | |
mbed_official | 354:e67efb2aab0e | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 47 | #include "stm32l1xx_hal_def.h" |
mbed_official | 354:e67efb2aab0e | 48 | |
mbed_official | 354:e67efb2aab0e | 49 | /** @addtogroup STM32L1xx_HAL_Driver |
mbed_official | 354:e67efb2aab0e | 50 | * @{ |
mbed_official | 354:e67efb2aab0e | 51 | */ |
mbed_official | 354:e67efb2aab0e | 52 | |
mbed_official | 354:e67efb2aab0e | 53 | /** @defgroup GPIOEx GPIOEx |
mbed_official | 354:e67efb2aab0e | 54 | * @{ |
mbed_official | 354:e67efb2aab0e | 55 | */ |
mbed_official | 354:e67efb2aab0e | 56 | |
mbed_official | 354:e67efb2aab0e | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 58 | |
mbed_official | 354:e67efb2aab0e | 59 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 60 | |
mbed_official | 354:e67efb2aab0e | 61 | /** @defgroup GPIOEx_Exported_Constants GPIOEx Exported Constants |
mbed_official | 354:e67efb2aab0e | 62 | * @{ |
mbed_official | 354:e67efb2aab0e | 63 | */ |
mbed_official | 354:e67efb2aab0e | 64 | |
mbed_official | 354:e67efb2aab0e | 65 | /** @defgroup GPIOEx_Alternate_function_selection GPIOEx Alternate function selection |
mbed_official | 354:e67efb2aab0e | 66 | * @{ |
mbed_official | 354:e67efb2aab0e | 67 | */ |
mbed_official | 354:e67efb2aab0e | 68 | |
mbed_official | 354:e67efb2aab0e | 69 | /** |
mbed_official | 354:e67efb2aab0e | 70 | * @brief AF 0 selection |
mbed_official | 354:e67efb2aab0e | 71 | */ |
mbed_official | 354:e67efb2aab0e | 72 | #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 73 | #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 74 | #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 75 | #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 76 | #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_OUT Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 77 | |
mbed_official | 354:e67efb2aab0e | 78 | /** |
mbed_official | 354:e67efb2aab0e | 79 | * @brief AF 1 selection |
mbed_official | 354:e67efb2aab0e | 80 | */ |
mbed_official | 354:e67efb2aab0e | 81 | #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 82 | |
mbed_official | 354:e67efb2aab0e | 83 | /** |
mbed_official | 354:e67efb2aab0e | 84 | * @brief AF 2 selection |
mbed_official | 354:e67efb2aab0e | 85 | */ |
mbed_official | 354:e67efb2aab0e | 86 | #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 87 | #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 88 | #if defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE) || defined (STM32L162xC) || defined (STM32L152xC) || defined (STM32L151xC) |
mbed_official | 354:e67efb2aab0e | 89 | #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 90 | |
mbed_official | 354:e67efb2aab0e | 91 | #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD ...STM32L151xC */ |
mbed_official | 354:e67efb2aab0e | 92 | |
mbed_official | 354:e67efb2aab0e | 93 | /** |
mbed_official | 354:e67efb2aab0e | 94 | * @brief AF 3 selection |
mbed_official | 354:e67efb2aab0e | 95 | */ |
mbed_official | 354:e67efb2aab0e | 96 | #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 97 | #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 98 | #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 99 | |
mbed_official | 354:e67efb2aab0e | 100 | |
mbed_official | 354:e67efb2aab0e | 101 | /** |
mbed_official | 354:e67efb2aab0e | 102 | * @brief AF 4 selection |
mbed_official | 354:e67efb2aab0e | 103 | */ |
mbed_official | 354:e67efb2aab0e | 104 | #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 105 | #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 106 | |
mbed_official | 354:e67efb2aab0e | 107 | /** |
mbed_official | 354:e67efb2aab0e | 108 | * @brief AF 5 selection |
mbed_official | 354:e67efb2aab0e | 109 | */ |
mbed_official | 354:e67efb2aab0e | 110 | #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1/I2S1 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 111 | #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 112 | |
mbed_official | 354:e67efb2aab0e | 113 | /** |
mbed_official | 354:e67efb2aab0e | 114 | * @brief AF 6 selection |
mbed_official | 354:e67efb2aab0e | 115 | */ |
mbed_official | 354:e67efb2aab0e | 116 | #if defined (STM32L100xC) || defined (STM32L151xC) || defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L151xE) ||\ |
mbed_official | 354:e67efb2aab0e | 117 | defined (STM32L152xC) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L152xE) ||\ |
mbed_official | 354:e67efb2aab0e | 118 | defined (STM32L162xC) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L162xE) |
mbed_official | 354:e67efb2aab0e | 119 | |
mbed_official | 354:e67efb2aab0e | 120 | #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 121 | |
mbed_official | 354:e67efb2aab0e | 122 | #endif /* STM32L100xC || STM32L151xC || (...) || STM32L162xD || STM32L162xE */ |
mbed_official | 354:e67efb2aab0e | 123 | |
mbed_official | 354:e67efb2aab0e | 124 | |
mbed_official | 354:e67efb2aab0e | 125 | /** |
mbed_official | 354:e67efb2aab0e | 126 | * @brief AF 7 selection |
mbed_official | 354:e67efb2aab0e | 127 | */ |
mbed_official | 354:e67efb2aab0e | 128 | #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 129 | #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 130 | #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 131 | |
mbed_official | 354:e67efb2aab0e | 132 | /** |
mbed_official | 354:e67efb2aab0e | 133 | * @brief AF 8 selection |
mbed_official | 354:e67efb2aab0e | 134 | */ |
mbed_official | 354:e67efb2aab0e | 135 | #if defined (STM32L151xD) || defined (STM32L151xE) ||\ |
mbed_official | 354:e67efb2aab0e | 136 | defined (STM32L152xD) || defined (STM32L152xE) ||\ |
mbed_official | 354:e67efb2aab0e | 137 | defined (STM32L162xD) || defined (STM32L162xE) |
mbed_official | 354:e67efb2aab0e | 138 | |
mbed_official | 354:e67efb2aab0e | 139 | #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 140 | #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 141 | |
mbed_official | 354:e67efb2aab0e | 142 | #endif /* STM32L151xD || STM32L151xE || STM32L152xD || STM32L 152xE || STM32L162xD || STM32L162xE */ |
mbed_official | 354:e67efb2aab0e | 143 | |
mbed_official | 354:e67efb2aab0e | 144 | |
mbed_official | 354:e67efb2aab0e | 145 | /** |
mbed_official | 354:e67efb2aab0e | 146 | * @brief AF 9 selection |
mbed_official | 354:e67efb2aab0e | 147 | */ |
mbed_official | 354:e67efb2aab0e | 148 | |
mbed_official | 354:e67efb2aab0e | 149 | /** |
mbed_official | 354:e67efb2aab0e | 150 | * @brief AF 10 selection |
mbed_official | 354:e67efb2aab0e | 151 | */ |
mbed_official | 354:e67efb2aab0e | 152 | |
mbed_official | 354:e67efb2aab0e | 153 | /** |
mbed_official | 354:e67efb2aab0e | 154 | * @brief AF 11 selection |
mbed_official | 354:e67efb2aab0e | 155 | */ |
mbed_official | 354:e67efb2aab0e | 156 | #if defined (STM32L100xB) || defined (STM32L100xBA) || defined (STM32L100xC) ||\ |
mbed_official | 354:e67efb2aab0e | 157 | defined (STM32L152xB) || defined (STM32L152xBA) || defined (STM32L152xC) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L152xE) ||\ |
mbed_official | 354:e67efb2aab0e | 158 | defined (STM32L162xC) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L162xE) |
mbed_official | 354:e67efb2aab0e | 159 | |
mbed_official | 354:e67efb2aab0e | 160 | #define GPIO_AF11_LCD ((uint8_t)0x0B) /* LCD Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 161 | |
mbed_official | 354:e67efb2aab0e | 162 | #endif /* STM32L100xB || STM32L100xBA || STM32L100xC || (...) || STM32L162xCA || STM32L162xD || STM32L162xE */ |
mbed_official | 354:e67efb2aab0e | 163 | |
mbed_official | 354:e67efb2aab0e | 164 | /** |
mbed_official | 354:e67efb2aab0e | 165 | * @brief AF 12 selection |
mbed_official | 354:e67efb2aab0e | 166 | */ |
mbed_official | 354:e67efb2aab0e | 167 | #if defined (STM32L151xD) || defined (STM32L152xD) || defined (STM32L162xD) |
mbed_official | 354:e67efb2aab0e | 168 | |
mbed_official | 354:e67efb2aab0e | 169 | #define GPIO_AF12_FSMC ((uint8_t)0x0C) /* FSMC Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 170 | #define GPIO_AF12_SDIO ((uint8_t)0x0C) /* SDIO Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 171 | |
mbed_official | 354:e67efb2aab0e | 172 | #endif /* STM32L151xD || STM32L152xD || STM32L162xD */ |
mbed_official | 354:e67efb2aab0e | 173 | /** |
mbed_official | 354:e67efb2aab0e | 174 | * @brief AF 13 selection |
mbed_official | 354:e67efb2aab0e | 175 | */ |
mbed_official | 354:e67efb2aab0e | 176 | |
mbed_official | 354:e67efb2aab0e | 177 | /** |
mbed_official | 354:e67efb2aab0e | 178 | * @brief AF 14 selection |
mbed_official | 354:e67efb2aab0e | 179 | */ |
mbed_official | 354:e67efb2aab0e | 180 | #define GPIO_AF14_TIM_IC1 ((uint8_t)0x0E) /* TIMER INPUT CAPTURE Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 181 | #define GPIO_AF14_TIM_IC2 ((uint8_t)0x0E) /* TIMER INPUT CAPTURE Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 182 | #define GPIO_AF14_TIM_IC3 ((uint8_t)0x0E) /* TIMER INPUT CAPTURE Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 183 | #define GPIO_AF14_TIM_IC4 ((uint8_t)0x0E) /* TIMER INPUT CAPTURE Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 184 | |
mbed_official | 354:e67efb2aab0e | 185 | /** |
mbed_official | 354:e67efb2aab0e | 186 | * @brief AF 15 selection |
mbed_official | 354:e67efb2aab0e | 187 | */ |
mbed_official | 354:e67efb2aab0e | 188 | #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */ |
mbed_official | 354:e67efb2aab0e | 189 | |
mbed_official | 354:e67efb2aab0e | 190 | /** |
mbed_official | 354:e67efb2aab0e | 191 | * @} |
mbed_official | 354:e67efb2aab0e | 192 | */ |
mbed_official | 354:e67efb2aab0e | 193 | |
mbed_official | 354:e67efb2aab0e | 194 | /** |
mbed_official | 354:e67efb2aab0e | 195 | * @} |
mbed_official | 354:e67efb2aab0e | 196 | */ |
mbed_official | 354:e67efb2aab0e | 197 | |
mbed_official | 354:e67efb2aab0e | 198 | /** @defgroup GPIOEx_Private_Macros GPIOEx Private Macros |
mbed_official | 354:e67efb2aab0e | 199 | * @{ |
mbed_official | 354:e67efb2aab0e | 200 | */ |
mbed_official | 354:e67efb2aab0e | 201 | |
mbed_official | 354:e67efb2aab0e | 202 | |
mbed_official | 354:e67efb2aab0e | 203 | #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0F) |
mbed_official | 354:e67efb2aab0e | 204 | |
mbed_official | 354:e67efb2aab0e | 205 | |
mbed_official | 354:e67efb2aab0e | 206 | #if defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE) |
mbed_official | 354:e67efb2aab0e | 207 | #define GET_GPIO_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\ |
mbed_official | 354:e67efb2aab0e | 208 | ((__GPIOx__) == (GPIOB))? 1U :\ |
mbed_official | 354:e67efb2aab0e | 209 | ((__GPIOx__) == (GPIOC))? 2U :\ |
mbed_official | 354:e67efb2aab0e | 210 | ((__GPIOx__) == (GPIOD))? 3U :\ |
mbed_official | 354:e67efb2aab0e | 211 | ((__GPIOx__) == (GPIOE))? 4U :\ |
mbed_official | 354:e67efb2aab0e | 212 | ((__GPIOx__) == (GPIOF))? 5U :\ |
mbed_official | 354:e67efb2aab0e | 213 | ((__GPIOx__) == (GPIOG))? 6U :\ |
mbed_official | 354:e67efb2aab0e | 214 | ((__GPIOx__) == (GPIOH))? 7U : 8U) |
mbed_official | 354:e67efb2aab0e | 215 | #endif |
mbed_official | 354:e67efb2aab0e | 216 | |
mbed_official | 354:e67efb2aab0e | 217 | #if defined (STM32L151xB) || defined (STM32L151xBA) || defined (STM32L151xC) || defined (STM32L152xB) || defined (STM32L152xBA) || defined (STM32L152xC) || defined (STM32L162xC) |
mbed_official | 354:e67efb2aab0e | 218 | #define GET_GPIO_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\ |
mbed_official | 354:e67efb2aab0e | 219 | ((__GPIOx__) == (GPIOB))? 1U :\ |
mbed_official | 354:e67efb2aab0e | 220 | ((__GPIOx__) == (GPIOC))? 2U :\ |
mbed_official | 354:e67efb2aab0e | 221 | ((__GPIOx__) == (GPIOD))? 3U :\ |
mbed_official | 354:e67efb2aab0e | 222 | ((__GPIOx__) == (GPIOE))? 4U :\ |
mbed_official | 354:e67efb2aab0e | 223 | ((__GPIOx__) == (GPIOH))? 7U : 8U) |
mbed_official | 354:e67efb2aab0e | 224 | #endif |
mbed_official | 354:e67efb2aab0e | 225 | |
mbed_official | 354:e67efb2aab0e | 226 | #if defined (STM32L100xB) || defined (STM32L100xBA) || defined (STM32L100xC) |
mbed_official | 354:e67efb2aab0e | 227 | #define GET_GPIO_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\ |
mbed_official | 354:e67efb2aab0e | 228 | ((__GPIOx__) == (GPIOB))? 1U :\ |
mbed_official | 354:e67efb2aab0e | 229 | ((__GPIOx__) == (GPIOC))? 2U :\ |
mbed_official | 354:e67efb2aab0e | 230 | ((__GPIOx__) == (GPIOD))? 3U :\ |
mbed_official | 354:e67efb2aab0e | 231 | ((__GPIOx__) == (GPIOH))? 7U : 8U) |
mbed_official | 354:e67efb2aab0e | 232 | #endif |
mbed_official | 354:e67efb2aab0e | 233 | |
mbed_official | 354:e67efb2aab0e | 234 | |
mbed_official | 354:e67efb2aab0e | 235 | |
mbed_official | 354:e67efb2aab0e | 236 | /** |
mbed_official | 354:e67efb2aab0e | 237 | * @} |
mbed_official | 354:e67efb2aab0e | 238 | */ |
mbed_official | 354:e67efb2aab0e | 239 | |
mbed_official | 354:e67efb2aab0e | 240 | |
mbed_official | 354:e67efb2aab0e | 241 | |
mbed_official | 354:e67efb2aab0e | 242 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 243 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 354:e67efb2aab0e | 244 | |
mbed_official | 354:e67efb2aab0e | 245 | |
mbed_official | 354:e67efb2aab0e | 246 | /** |
mbed_official | 354:e67efb2aab0e | 247 | * @} |
mbed_official | 354:e67efb2aab0e | 248 | */ |
mbed_official | 354:e67efb2aab0e | 249 | |
mbed_official | 354:e67efb2aab0e | 250 | /** |
mbed_official | 354:e67efb2aab0e | 251 | * @} |
mbed_official | 354:e67efb2aab0e | 252 | */ |
mbed_official | 354:e67efb2aab0e | 253 | |
mbed_official | 354:e67efb2aab0e | 254 | #ifdef __cplusplus |
mbed_official | 354:e67efb2aab0e | 255 | } |
mbed_official | 354:e67efb2aab0e | 256 | #endif |
mbed_official | 354:e67efb2aab0e | 257 | |
mbed_official | 354:e67efb2aab0e | 258 | #endif /* __STM32L1xx_HAL_GPIO_EX_H */ |
mbed_official | 354:e67efb2aab0e | 259 | |
mbed_official | 354:e67efb2aab0e | 260 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |