TUKS MCU Introductory course / TUKS-COURSE-TIMER
Committer:
elmot
Date:
Fri Feb 24 21:13:56 2017 +0000
Revision:
1:d0dfbce63a89
Ready-to-copy

Who changed what in which revision?

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