mbed library sources

Dependents:   Marvino mbot

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 610:813dcc80987e 1 /**
mbed_official 610:813dcc80987e 2 ******************************************************************************
mbed_official 610:813dcc80987e 3 * @file stm32l4xx_hal_gpio.h
mbed_official 610:813dcc80987e 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.0
mbed_official 610:813dcc80987e 6 * @date 26-June-2015
mbed_official 610:813dcc80987e 7 * @brief Header file of GPIO HAL module.
mbed_official 610:813dcc80987e 8 ******************************************************************************
mbed_official 610:813dcc80987e 9 * @attention
mbed_official 610:813dcc80987e 10 *
mbed_official 610:813dcc80987e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 610:813dcc80987e 12 *
mbed_official 610:813dcc80987e 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 610:813dcc80987e 14 * are permitted provided that the following conditions are met:
mbed_official 610:813dcc80987e 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 610:813dcc80987e 16 * this list of conditions and the following disclaimer.
mbed_official 610:813dcc80987e 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 610:813dcc80987e 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 610:813dcc80987e 19 * and/or other materials provided with the distribution.
mbed_official 610:813dcc80987e 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 610:813dcc80987e 21 * may be used to endorse or promote products derived from this software
mbed_official 610:813dcc80987e 22 * without specific prior written permission.
mbed_official 610:813dcc80987e 23 *
mbed_official 610:813dcc80987e 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 610:813dcc80987e 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 610:813dcc80987e 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 610:813dcc80987e 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 610:813dcc80987e 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 610:813dcc80987e 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 610:813dcc80987e 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 610:813dcc80987e 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 610:813dcc80987e 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 610:813dcc80987e 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 610:813dcc80987e 34 *
mbed_official 610:813dcc80987e 35 ******************************************************************************
mbed_official 610:813dcc80987e 36 */
mbed_official 610:813dcc80987e 37
mbed_official 610:813dcc80987e 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 610:813dcc80987e 39 #ifndef __STM32L4xx_HAL_GPIO_H
mbed_official 610:813dcc80987e 40 #define __STM32L4xx_HAL_GPIO_H
mbed_official 610:813dcc80987e 41
mbed_official 610:813dcc80987e 42 #ifdef __cplusplus
mbed_official 610:813dcc80987e 43 extern "C" {
mbed_official 610:813dcc80987e 44 #endif
mbed_official 610:813dcc80987e 45
mbed_official 610:813dcc80987e 46 /* Includes ------------------------------------------------------------------*/
mbed_official 610:813dcc80987e 47 #include "stm32l4xx_hal_def.h"
mbed_official 610:813dcc80987e 48
mbed_official 610:813dcc80987e 49 /** @addtogroup STM32L4xx_HAL_Driver
mbed_official 610:813dcc80987e 50 * @{
mbed_official 610:813dcc80987e 51 */
mbed_official 610:813dcc80987e 52
mbed_official 610:813dcc80987e 53 /** @addtogroup GPIO
mbed_official 610:813dcc80987e 54 * @{
mbed_official 610:813dcc80987e 55 */
mbed_official 610:813dcc80987e 56
mbed_official 610:813dcc80987e 57 /* Exported types ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 58
mbed_official 610:813dcc80987e 59 /** @defgroup GPIO_Exported_Types GPIO Exported Types
mbed_official 610:813dcc80987e 60 * @{
mbed_official 610:813dcc80987e 61 */
mbed_official 610:813dcc80987e 62 /**
mbed_official 610:813dcc80987e 63 * @brief GPIO Init structure definition
mbed_official 610:813dcc80987e 64 */
mbed_official 610:813dcc80987e 65 typedef struct
mbed_official 610:813dcc80987e 66 {
mbed_official 610:813dcc80987e 67 uint32_t Pin; /*!< Specifies the GPIO pins to be configured.
mbed_official 610:813dcc80987e 68 This parameter can be any value of @ref GPIO_pins */
mbed_official 610:813dcc80987e 69
mbed_official 610:813dcc80987e 70 uint32_t Mode; /*!< Specifies the operating mode for the selected pins.
mbed_official 610:813dcc80987e 71 This parameter can be a value of @ref GPIO_mode */
mbed_official 610:813dcc80987e 72
mbed_official 610:813dcc80987e 73 uint32_t Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins.
mbed_official 610:813dcc80987e 74 This parameter can be a value of @ref GPIO_pull */
mbed_official 610:813dcc80987e 75
mbed_official 610:813dcc80987e 76 uint32_t Speed; /*!< Specifies the speed for the selected pins.
mbed_official 610:813dcc80987e 77 This parameter can be a value of @ref GPIO_speed */
mbed_official 610:813dcc80987e 78
mbed_official 610:813dcc80987e 79 uint32_t Alternate; /*!< Peripheral to be connected to the selected pins
mbed_official 610:813dcc80987e 80 This parameter can be a value of @ref GPIOEx_Alternate_function_selection */
mbed_official 610:813dcc80987e 81 }GPIO_InitTypeDef;
mbed_official 610:813dcc80987e 82
mbed_official 610:813dcc80987e 83 /**
mbed_official 610:813dcc80987e 84 * @brief GPIO Bit SET and Bit RESET enumeration
mbed_official 610:813dcc80987e 85 */
mbed_official 610:813dcc80987e 86 typedef enum
mbed_official 610:813dcc80987e 87 {
mbed_official 610:813dcc80987e 88 GPIO_PIN_RESET = 0,
mbed_official 610:813dcc80987e 89 GPIO_PIN_SET
mbed_official 610:813dcc80987e 90 }GPIO_PinState;
mbed_official 610:813dcc80987e 91 /**
mbed_official 610:813dcc80987e 92 * @}
mbed_official 610:813dcc80987e 93 */
mbed_official 610:813dcc80987e 94
mbed_official 610:813dcc80987e 95 /* Exported constants --------------------------------------------------------*/
mbed_official 610:813dcc80987e 96 /** @defgroup GPIO_Exported_Constants GPIO Exported Constants
mbed_official 610:813dcc80987e 97 * @{
mbed_official 610:813dcc80987e 98 */
mbed_official 610:813dcc80987e 99 /** @defgroup GPIO_pins GPIO pins
mbed_official 610:813dcc80987e 100 * @{
mbed_official 610:813dcc80987e 101 */
mbed_official 610:813dcc80987e 102 #define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */
mbed_official 610:813dcc80987e 103 #define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */
mbed_official 610:813dcc80987e 104 #define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */
mbed_official 610:813dcc80987e 105 #define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */
mbed_official 610:813dcc80987e 106 #define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */
mbed_official 610:813dcc80987e 107 #define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */
mbed_official 610:813dcc80987e 108 #define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */
mbed_official 610:813dcc80987e 109 #define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */
mbed_official 610:813dcc80987e 110 #define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */
mbed_official 610:813dcc80987e 111 #define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */
mbed_official 610:813dcc80987e 112 #define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */
mbed_official 610:813dcc80987e 113 #define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */
mbed_official 610:813dcc80987e 114 #define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */
mbed_official 610:813dcc80987e 115 #define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */
mbed_official 610:813dcc80987e 116 #define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */
mbed_official 610:813dcc80987e 117 #define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */
mbed_official 610:813dcc80987e 118 #define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */
mbed_official 610:813dcc80987e 119
mbed_official 610:813dcc80987e 120 #define GPIO_PIN_MASK ((uint32_t)0x0000FFFF) /* PIN mask for assert test */
mbed_official 610:813dcc80987e 121 /**
mbed_official 610:813dcc80987e 122 * @}
mbed_official 610:813dcc80987e 123 */
mbed_official 610:813dcc80987e 124
mbed_official 610:813dcc80987e 125 /** @defgroup GPIO_mode GPIO mode
mbed_official 610:813dcc80987e 126 * @brief GPIO Configuration Mode
mbed_official 610:813dcc80987e 127 * Elements values convention: 0xX0yz00YZ
mbed_official 610:813dcc80987e 128 * - X : GPIO mode or EXTI Mode
mbed_official 610:813dcc80987e 129 * - y : External IT or Event trigger detection
mbed_official 610:813dcc80987e 130 * - z : IO configuration on External IT or Event
mbed_official 610:813dcc80987e 131 * - Y : Output type (Push Pull or Open Drain)
mbed_official 610:813dcc80987e 132 * - Z : IO Direction mode (Input, Output, Alternate or Analog)
mbed_official 610:813dcc80987e 133 * @{
mbed_official 610:813dcc80987e 134 */
mbed_official 610:813dcc80987e 135 #define GPIO_MODE_INPUT ((uint32_t)0x00000000) /*!< Input Floating Mode */
mbed_official 610:813dcc80987e 136 #define GPIO_MODE_OUTPUT_PP ((uint32_t)0x00000001) /*!< Output Push Pull Mode */
mbed_official 610:813dcc80987e 137 #define GPIO_MODE_OUTPUT_OD ((uint32_t)0x00000011) /*!< Output Open Drain Mode */
mbed_official 610:813dcc80987e 138 #define GPIO_MODE_AF_PP ((uint32_t)0x00000002) /*!< Alternate Function Push Pull Mode */
mbed_official 610:813dcc80987e 139 #define GPIO_MODE_AF_OD ((uint32_t)0x00000012) /*!< Alternate Function Open Drain Mode */
mbed_official 610:813dcc80987e 140 #define GPIO_MODE_ANALOG ((uint32_t)0x00000003) /*!< Analog Mode */
mbed_official 610:813dcc80987e 141 #define GPIO_MODE_ANALOG_ADC_CONTROL ((uint32_t)0x0000000B) /*!< Analog Mode for ADC conversion */
mbed_official 610:813dcc80987e 142 #define GPIO_MODE_IT_RISING ((uint32_t)0x10110000) /*!< External Interrupt Mode with Rising edge trigger detection */
mbed_official 610:813dcc80987e 143 #define GPIO_MODE_IT_FALLING ((uint32_t)0x10210000) /*!< External Interrupt Mode with Falling edge trigger detection */
mbed_official 610:813dcc80987e 144 #define GPIO_MODE_IT_RISING_FALLING ((uint32_t)0x10310000) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
mbed_official 610:813dcc80987e 145 #define GPIO_MODE_EVT_RISING ((uint32_t)0x10120000) /*!< External Event Mode with Rising edge trigger detection */
mbed_official 610:813dcc80987e 146 #define GPIO_MODE_EVT_FALLING ((uint32_t)0x10220000) /*!< External Event Mode with Falling edge trigger detection */
mbed_official 610:813dcc80987e 147 #define GPIO_MODE_EVT_RISING_FALLING ((uint32_t)0x10320000) /*!< External Event Mode with Rising/Falling edge trigger detection */
mbed_official 610:813dcc80987e 148 /**
mbed_official 610:813dcc80987e 149 * @}
mbed_official 610:813dcc80987e 150 */
mbed_official 610:813dcc80987e 151
mbed_official 610:813dcc80987e 152 /** @defgroup GPIO_speed GPIO speed
mbed_official 610:813dcc80987e 153 * @brief GPIO Output Maximum frequency
mbed_official 610:813dcc80987e 154 * @{
mbed_official 610:813dcc80987e 155 */
mbed_official 610:813dcc80987e 156 #define GPIO_SPEED_LOW ((uint32_t)0x00000000) /*!< Low speed */
mbed_official 610:813dcc80987e 157 #define GPIO_SPEED_MEDIUM ((uint32_t)0x00000001) /*!< Medium speed */
mbed_official 610:813dcc80987e 158 #define GPIO_SPEED_FAST ((uint32_t)0x00000002) /*!< Fast speed */
mbed_official 610:813dcc80987e 159 #define GPIO_SPEED_HIGH ((uint32_t)0x00000003) /*!< High speed */
mbed_official 610:813dcc80987e 160 /**
mbed_official 610:813dcc80987e 161 * @}
mbed_official 610:813dcc80987e 162 */
mbed_official 610:813dcc80987e 163
mbed_official 610:813dcc80987e 164 /** @defgroup GPIO_pull GPIO pull
mbed_official 610:813dcc80987e 165 * @brief GPIO Pull-Up or Pull-Down Activation
mbed_official 610:813dcc80987e 166 * @{
mbed_official 610:813dcc80987e 167 */
mbed_official 610:813dcc80987e 168 #define GPIO_NOPULL ((uint32_t)0x00000000) /*!< No Pull-up or Pull-down activation */
mbed_official 610:813dcc80987e 169 #define GPIO_PULLUP ((uint32_t)0x00000001) /*!< Pull-up activation */
mbed_official 610:813dcc80987e 170 #define GPIO_PULLDOWN ((uint32_t)0x00000002) /*!< Pull-down activation */
mbed_official 610:813dcc80987e 171 /**
mbed_official 610:813dcc80987e 172 * @}
mbed_official 610:813dcc80987e 173 */
mbed_official 610:813dcc80987e 174
mbed_official 610:813dcc80987e 175 /**
mbed_official 610:813dcc80987e 176 * @}
mbed_official 610:813dcc80987e 177 */
mbed_official 610:813dcc80987e 178
mbed_official 610:813dcc80987e 179 /* Exported macro ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 180 /** @defgroup GPIO_Exported_Macros GPIO Exported Macros
mbed_official 610:813dcc80987e 181 * @{
mbed_official 610:813dcc80987e 182 */
mbed_official 610:813dcc80987e 183
mbed_official 610:813dcc80987e 184 /**
mbed_official 610:813dcc80987e 185 * @brief Check whether the specified EXTI line flag is set or not.
mbed_official 610:813dcc80987e 186 * @param __EXTI_LINE__: specifies the EXTI line flag to check.
mbed_official 610:813dcc80987e 187 * This parameter can be GPIO_PIN_x where x can be(0..15)
mbed_official 610:813dcc80987e 188 * @retval The new state of __EXTI_LINE__ (SET or RESET).
mbed_official 610:813dcc80987e 189 */
mbed_official 610:813dcc80987e 190 #define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
mbed_official 610:813dcc80987e 191
mbed_official 610:813dcc80987e 192 /**
mbed_official 610:813dcc80987e 193 * @brief Clear the EXTI's line pending flags.
mbed_official 610:813dcc80987e 194 * @param __EXTI_LINE__: specifies the EXTI lines flags to clear.
mbed_official 610:813dcc80987e 195 * This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
mbed_official 610:813dcc80987e 196 * @retval None
mbed_official 610:813dcc80987e 197 */
mbed_official 610:813dcc80987e 198 #define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
mbed_official 610:813dcc80987e 199
mbed_official 610:813dcc80987e 200 /**
mbed_official 610:813dcc80987e 201 * @brief Check whether the specified EXTI line is asserted or not.
mbed_official 610:813dcc80987e 202 * @param __EXTI_LINE__: specifies the EXTI line to check.
mbed_official 610:813dcc80987e 203 * This parameter can be GPIO_PIN_x where x can be(0..15)
mbed_official 610:813dcc80987e 204 * @retval The new state of __EXTI_LINE__ (SET or RESET).
mbed_official 610:813dcc80987e 205 */
mbed_official 610:813dcc80987e 206 #define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
mbed_official 610:813dcc80987e 207
mbed_official 610:813dcc80987e 208 /**
mbed_official 610:813dcc80987e 209 * @brief Clear the EXTI's line pending bits.
mbed_official 610:813dcc80987e 210 * @param __EXTI_LINE__: specifies the EXTI lines to clear.
mbed_official 610:813dcc80987e 211 * This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
mbed_official 610:813dcc80987e 212 * @retval None
mbed_official 610:813dcc80987e 213 */
mbed_official 610:813dcc80987e 214 #define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
mbed_official 610:813dcc80987e 215
mbed_official 610:813dcc80987e 216 /**
mbed_official 610:813dcc80987e 217 * @brief Generate a Software interrupt on selected EXTI line.
mbed_official 610:813dcc80987e 218 * @param __EXTI_LINE__: specifies the EXTI line to check.
mbed_official 610:813dcc80987e 219 * This parameter can be GPIO_PIN_x where x can be(0..15)
mbed_official 610:813dcc80987e 220 * @retval None
mbed_official 610:813dcc80987e 221 */
mbed_official 610:813dcc80987e 222 #define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER |= (__EXTI_LINE__))
mbed_official 610:813dcc80987e 223
mbed_official 610:813dcc80987e 224 /**
mbed_official 610:813dcc80987e 225 * @}
mbed_official 610:813dcc80987e 226 */
mbed_official 610:813dcc80987e 227
mbed_official 610:813dcc80987e 228 /* Private macros ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 229 /** @addtogroup GPIO_Private_Macros GPIO Private Macros
mbed_official 610:813dcc80987e 230 * @{
mbed_official 610:813dcc80987e 231 */
mbed_official 610:813dcc80987e 232 #define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))
mbed_official 610:813dcc80987e 233
mbed_official 610:813dcc80987e 234 #define IS_GPIO_PIN(__PIN__) (((__PIN__) & GPIO_PIN_MASK) != (uint32_t)0x00)
mbed_official 610:813dcc80987e 235
mbed_official 610:813dcc80987e 236 #define IS_GPIO_MODE(__MODE__) (((__MODE__) == GPIO_MODE_INPUT) ||\
mbed_official 610:813dcc80987e 237 ((__MODE__) == GPIO_MODE_OUTPUT_PP) ||\
mbed_official 610:813dcc80987e 238 ((__MODE__) == GPIO_MODE_OUTPUT_OD) ||\
mbed_official 610:813dcc80987e 239 ((__MODE__) == GPIO_MODE_AF_PP) ||\
mbed_official 610:813dcc80987e 240 ((__MODE__) == GPIO_MODE_AF_OD) ||\
mbed_official 610:813dcc80987e 241 ((__MODE__) == GPIO_MODE_IT_RISING) ||\
mbed_official 610:813dcc80987e 242 ((__MODE__) == GPIO_MODE_IT_FALLING) ||\
mbed_official 610:813dcc80987e 243 ((__MODE__) == GPIO_MODE_IT_RISING_FALLING) ||\
mbed_official 610:813dcc80987e 244 ((__MODE__) == GPIO_MODE_EVT_RISING) ||\
mbed_official 610:813dcc80987e 245 ((__MODE__) == GPIO_MODE_EVT_FALLING) ||\
mbed_official 610:813dcc80987e 246 ((__MODE__) == GPIO_MODE_EVT_RISING_FALLING) ||\
mbed_official 610:813dcc80987e 247 ((__MODE__) == GPIO_MODE_ANALOG) ||\
mbed_official 610:813dcc80987e 248 ((__MODE__) == GPIO_MODE_ANALOG_ADC_CONTROL))
mbed_official 610:813dcc80987e 249
mbed_official 610:813dcc80987e 250 #define IS_GPIO_SPEED(__SPEED__) (((__SPEED__) == GPIO_SPEED_LOW) ||\
mbed_official 610:813dcc80987e 251 ((__SPEED__) == GPIO_SPEED_MEDIUM) ||\
mbed_official 610:813dcc80987e 252 ((__SPEED__) == GPIO_SPEED_FAST) ||\
mbed_official 610:813dcc80987e 253 ((__SPEED__) == GPIO_SPEED_HIGH))
mbed_official 610:813dcc80987e 254
mbed_official 610:813dcc80987e 255 #define IS_GPIO_PULL(__PULL__) (((__PULL__) == GPIO_NOPULL) ||\
mbed_official 610:813dcc80987e 256 ((__PULL__) == GPIO_PULLUP) || \
mbed_official 610:813dcc80987e 257 ((__PULL__) == GPIO_PULLDOWN))
mbed_official 610:813dcc80987e 258 /**
mbed_official 610:813dcc80987e 259 * @}
mbed_official 610:813dcc80987e 260 */
mbed_official 610:813dcc80987e 261
mbed_official 610:813dcc80987e 262 /* Include GPIO HAL Extended module */
mbed_official 610:813dcc80987e 263 #include "stm32l4xx_hal_gpio_ex.h"
mbed_official 610:813dcc80987e 264
mbed_official 610:813dcc80987e 265 /* Exported functions --------------------------------------------------------*/
mbed_official 610:813dcc80987e 266 /** @addtogroup GPIO_Exported_Functions GPIO Exported Functions
mbed_official 610:813dcc80987e 267 * @{
mbed_official 610:813dcc80987e 268 */
mbed_official 610:813dcc80987e 269
mbed_official 610:813dcc80987e 270 /** @addtogroup GPIO_Exported_Functions_Group1 Initialization/de-initialization functions
mbed_official 610:813dcc80987e 271 * @brief Initialization and Configuration functions
mbed_official 610:813dcc80987e 272 * @{
mbed_official 610:813dcc80987e 273 */
mbed_official 610:813dcc80987e 274
mbed_official 610:813dcc80987e 275 /* Initialization and de-initialization functions *****************************/
mbed_official 610:813dcc80987e 276 void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
mbed_official 610:813dcc80987e 277 void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
mbed_official 610:813dcc80987e 278
mbed_official 610:813dcc80987e 279 /**
mbed_official 610:813dcc80987e 280 * @}
mbed_official 610:813dcc80987e 281 */
mbed_official 610:813dcc80987e 282
mbed_official 610:813dcc80987e 283 /** @addtogroup GPIO_Exported_Functions_Group2 IO operation functions
mbed_official 610:813dcc80987e 284 * @{
mbed_official 610:813dcc80987e 285 */
mbed_official 610:813dcc80987e 286
mbed_official 610:813dcc80987e 287 /* IO operation functions *****************************************************/
mbed_official 610:813dcc80987e 288 GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
mbed_official 610:813dcc80987e 289 void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
mbed_official 610:813dcc80987e 290 void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
mbed_official 610:813dcc80987e 291 HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
mbed_official 610:813dcc80987e 292 void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
mbed_official 610:813dcc80987e 293 void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
mbed_official 610:813dcc80987e 294
mbed_official 610:813dcc80987e 295 /**
mbed_official 610:813dcc80987e 296 * @}
mbed_official 610:813dcc80987e 297 */
mbed_official 610:813dcc80987e 298
mbed_official 610:813dcc80987e 299 /**
mbed_official 610:813dcc80987e 300 * @}
mbed_official 610:813dcc80987e 301 */
mbed_official 610:813dcc80987e 302
mbed_official 610:813dcc80987e 303 /**
mbed_official 610:813dcc80987e 304 * @}
mbed_official 610:813dcc80987e 305 */
mbed_official 610:813dcc80987e 306
mbed_official 610:813dcc80987e 307 /**
mbed_official 610:813dcc80987e 308 * @}
mbed_official 610:813dcc80987e 309 */
mbed_official 610:813dcc80987e 310
mbed_official 610:813dcc80987e 311 #ifdef __cplusplus
mbed_official 610:813dcc80987e 312 }
mbed_official 610:813dcc80987e 313 #endif
mbed_official 610:813dcc80987e 314
mbed_official 610:813dcc80987e 315 #endif /* __STM32L4xx_HAL_GPIO_H */
mbed_official 610:813dcc80987e 316
mbed_official 610:813dcc80987e 317 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/