/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h substitute line 894 extern } by }

Fork of mbed by mbed official

Committer:
fblanc
Date:
Fri Dec 05 15:42:32 2014 +0000
Revision:
93:9dd889aeda0e
Parent:
90:cb3d968589d8
substitute line 894 extern } by }; /TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h

Who changed what in which revision?

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