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 mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
107:4f6c30876dfa
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 107:4f6c30876dfa 1 /**
Kojto 107:4f6c30876dfa 2 ******************************************************************************
Kojto 107:4f6c30876dfa 3 * @file stm32l4xx_hal_gpio.h
Kojto 107:4f6c30876dfa 4 * @author MCD Application Team
Kojto 107:4f6c30876dfa 5 * @version V1.0.0
Kojto 107:4f6c30876dfa 6 * @date 26-June-2015
Kojto 107:4f6c30876dfa 7 * @brief Header file of GPIO HAL module.
Kojto 107:4f6c30876dfa 8 ******************************************************************************
Kojto 107:4f6c30876dfa 9 * @attention
Kojto 107:4f6c30876dfa 10 *
Kojto 107:4f6c30876dfa 11 * <h2><center>&copy; 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 __STM32L4xx_HAL_GPIO_H
Kojto 107:4f6c30876dfa 40 #define __STM32L4xx_HAL_GPIO_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 "stm32l4xx_hal_def.h"
Kojto 107:4f6c30876dfa 48
Kojto 107:4f6c30876dfa 49 /** @addtogroup STM32L4xx_HAL_Driver
Kojto 107:4f6c30876dfa 50 * @{
Kojto 107:4f6c30876dfa 51 */
Kojto 107:4f6c30876dfa 52
Kojto 107:4f6c30876dfa 53 /** @addtogroup GPIO
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 /** @defgroup GPIO_Exported_Types GPIO Exported Types
Kojto 107:4f6c30876dfa 60 * @{
Kojto 107:4f6c30876dfa 61 */
Kojto 107:4f6c30876dfa 62 /**
Kojto 107:4f6c30876dfa 63 * @brief GPIO Init structure definition
Kojto 107:4f6c30876dfa 64 */
Kojto 107:4f6c30876dfa 65 typedef struct
Kojto 107:4f6c30876dfa 66 {
Kojto 107:4f6c30876dfa 67 uint32_t Pin; /*!< Specifies the GPIO pins to be configured.
Kojto 107:4f6c30876dfa 68 This parameter can be any value of @ref GPIO_pins */
Kojto 107:4f6c30876dfa 69
Kojto 107:4f6c30876dfa 70 uint32_t Mode; /*!< Specifies the operating mode for the selected pins.
Kojto 107:4f6c30876dfa 71 This parameter can be a value of @ref GPIO_mode */
Kojto 107:4f6c30876dfa 72
Kojto 107:4f6c30876dfa 73 uint32_t Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins.
Kojto 107:4f6c30876dfa 74 This parameter can be a value of @ref GPIO_pull */
Kojto 107:4f6c30876dfa 75
Kojto 107:4f6c30876dfa 76 uint32_t Speed; /*!< Specifies the speed for the selected pins.
Kojto 107:4f6c30876dfa 77 This parameter can be a value of @ref GPIO_speed */
Kojto 107:4f6c30876dfa 78
Kojto 107:4f6c30876dfa 79 uint32_t Alternate; /*!< Peripheral to be connected to the selected pins
Kojto 107:4f6c30876dfa 80 This parameter can be a value of @ref GPIOEx_Alternate_function_selection */
Kojto 107:4f6c30876dfa 81 }GPIO_InitTypeDef;
Kojto 107:4f6c30876dfa 82
Kojto 107:4f6c30876dfa 83 /**
Kojto 107:4f6c30876dfa 84 * @brief GPIO Bit SET and Bit RESET enumeration
Kojto 107:4f6c30876dfa 85 */
Kojto 107:4f6c30876dfa 86 typedef enum
Kojto 107:4f6c30876dfa 87 {
Kojto 107:4f6c30876dfa 88 GPIO_PIN_RESET = 0,
Kojto 107:4f6c30876dfa 89 GPIO_PIN_SET
Kojto 107:4f6c30876dfa 90 }GPIO_PinState;
Kojto 107:4f6c30876dfa 91 /**
Kojto 107:4f6c30876dfa 92 * @}
Kojto 107:4f6c30876dfa 93 */
Kojto 107:4f6c30876dfa 94
Kojto 107:4f6c30876dfa 95 /* Exported constants --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 96 /** @defgroup GPIO_Exported_Constants GPIO Exported Constants
Kojto 107:4f6c30876dfa 97 * @{
Kojto 107:4f6c30876dfa 98 */
Kojto 107:4f6c30876dfa 99 /** @defgroup GPIO_pins GPIO pins
Kojto 107:4f6c30876dfa 100 * @{
Kojto 107:4f6c30876dfa 101 */
Kojto 107:4f6c30876dfa 102 #define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */
Kojto 107:4f6c30876dfa 103 #define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */
Kojto 107:4f6c30876dfa 104 #define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */
Kojto 107:4f6c30876dfa 105 #define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */
Kojto 107:4f6c30876dfa 106 #define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */
Kojto 107:4f6c30876dfa 107 #define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */
Kojto 107:4f6c30876dfa 108 #define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */
Kojto 107:4f6c30876dfa 109 #define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */
Kojto 107:4f6c30876dfa 110 #define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */
Kojto 107:4f6c30876dfa 111 #define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */
Kojto 107:4f6c30876dfa 112 #define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */
Kojto 107:4f6c30876dfa 113 #define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */
Kojto 107:4f6c30876dfa 114 #define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */
Kojto 107:4f6c30876dfa 115 #define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */
Kojto 107:4f6c30876dfa 116 #define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */
Kojto 107:4f6c30876dfa 117 #define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */
Kojto 107:4f6c30876dfa 118 #define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */
Kojto 107:4f6c30876dfa 119
Kojto 107:4f6c30876dfa 120 #define GPIO_PIN_MASK ((uint32_t)0x0000FFFF) /* PIN mask for assert test */
Kojto 107:4f6c30876dfa 121 /**
Kojto 107:4f6c30876dfa 122 * @}
Kojto 107:4f6c30876dfa 123 */
Kojto 107:4f6c30876dfa 124
Kojto 107:4f6c30876dfa 125 /** @defgroup GPIO_mode GPIO mode
Kojto 107:4f6c30876dfa 126 * @brief GPIO Configuration Mode
Kojto 107:4f6c30876dfa 127 * Elements values convention: 0xX0yz00YZ
Kojto 107:4f6c30876dfa 128 * - X : GPIO mode or EXTI Mode
Kojto 107:4f6c30876dfa 129 * - y : External IT or Event trigger detection
Kojto 107:4f6c30876dfa 130 * - z : IO configuration on External IT or Event
Kojto 107:4f6c30876dfa 131 * - Y : Output type (Push Pull or Open Drain)
Kojto 107:4f6c30876dfa 132 * - Z : IO Direction mode (Input, Output, Alternate or Analog)
Kojto 107:4f6c30876dfa 133 * @{
Kojto 107:4f6c30876dfa 134 */
Kojto 107:4f6c30876dfa 135 #define GPIO_MODE_INPUT ((uint32_t)0x00000000) /*!< Input Floating Mode */
Kojto 107:4f6c30876dfa 136 #define GPIO_MODE_OUTPUT_PP ((uint32_t)0x00000001) /*!< Output Push Pull Mode */
Kojto 107:4f6c30876dfa 137 #define GPIO_MODE_OUTPUT_OD ((uint32_t)0x00000011) /*!< Output Open Drain Mode */
Kojto 107:4f6c30876dfa 138 #define GPIO_MODE_AF_PP ((uint32_t)0x00000002) /*!< Alternate Function Push Pull Mode */
Kojto 107:4f6c30876dfa 139 #define GPIO_MODE_AF_OD ((uint32_t)0x00000012) /*!< Alternate Function Open Drain Mode */
Kojto 107:4f6c30876dfa 140 #define GPIO_MODE_ANALOG ((uint32_t)0x00000003) /*!< Analog Mode */
Kojto 107:4f6c30876dfa 141 #define GPIO_MODE_ANALOG_ADC_CONTROL ((uint32_t)0x0000000B) /*!< Analog Mode for ADC conversion */
Kojto 107:4f6c30876dfa 142 #define GPIO_MODE_IT_RISING ((uint32_t)0x10110000) /*!< External Interrupt Mode with Rising edge trigger detection */
Kojto 107:4f6c30876dfa 143 #define GPIO_MODE_IT_FALLING ((uint32_t)0x10210000) /*!< External Interrupt Mode with Falling edge trigger detection */
Kojto 107:4f6c30876dfa 144 #define GPIO_MODE_IT_RISING_FALLING ((uint32_t)0x10310000) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
Kojto 107:4f6c30876dfa 145 #define GPIO_MODE_EVT_RISING ((uint32_t)0x10120000) /*!< External Event Mode with Rising edge trigger detection */
Kojto 107:4f6c30876dfa 146 #define GPIO_MODE_EVT_FALLING ((uint32_t)0x10220000) /*!< External Event Mode with Falling edge trigger detection */
Kojto 107:4f6c30876dfa 147 #define GPIO_MODE_EVT_RISING_FALLING ((uint32_t)0x10320000) /*!< External Event Mode with Rising/Falling edge trigger detection */
Kojto 107:4f6c30876dfa 148 /**
Kojto 107:4f6c30876dfa 149 * @}
Kojto 107:4f6c30876dfa 150 */
Kojto 107:4f6c30876dfa 151
Kojto 107:4f6c30876dfa 152 /** @defgroup GPIO_speed GPIO speed
Kojto 107:4f6c30876dfa 153 * @brief GPIO Output Maximum frequency
Kojto 107:4f6c30876dfa 154 * @{
Kojto 107:4f6c30876dfa 155 */
Kojto 107:4f6c30876dfa 156 #define GPIO_SPEED_LOW ((uint32_t)0x00000000) /*!< Low speed */
Kojto 107:4f6c30876dfa 157 #define GPIO_SPEED_MEDIUM ((uint32_t)0x00000001) /*!< Medium speed */
Kojto 107:4f6c30876dfa 158 #define GPIO_SPEED_FAST ((uint32_t)0x00000002) /*!< Fast speed */
Kojto 107:4f6c30876dfa 159 #define GPIO_SPEED_HIGH ((uint32_t)0x00000003) /*!< High speed */
Kojto 107:4f6c30876dfa 160 /**
Kojto 107:4f6c30876dfa 161 * @}
Kojto 107:4f6c30876dfa 162 */
Kojto 107:4f6c30876dfa 163
Kojto 107:4f6c30876dfa 164 /** @defgroup GPIO_pull GPIO pull
Kojto 107:4f6c30876dfa 165 * @brief GPIO Pull-Up or Pull-Down Activation
Kojto 107:4f6c30876dfa 166 * @{
Kojto 107:4f6c30876dfa 167 */
Kojto 107:4f6c30876dfa 168 #define GPIO_NOPULL ((uint32_t)0x00000000) /*!< No Pull-up or Pull-down activation */
Kojto 107:4f6c30876dfa 169 #define GPIO_PULLUP ((uint32_t)0x00000001) /*!< Pull-up activation */
Kojto 107:4f6c30876dfa 170 #define GPIO_PULLDOWN ((uint32_t)0x00000002) /*!< Pull-down activation */
Kojto 107:4f6c30876dfa 171 /**
Kojto 107:4f6c30876dfa 172 * @}
Kojto 107:4f6c30876dfa 173 */
Kojto 107:4f6c30876dfa 174
Kojto 107:4f6c30876dfa 175 /**
Kojto 107:4f6c30876dfa 176 * @}
Kojto 107:4f6c30876dfa 177 */
Kojto 107:4f6c30876dfa 178
Kojto 107:4f6c30876dfa 179 /* Exported macro ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 180 /** @defgroup GPIO_Exported_Macros GPIO Exported Macros
Kojto 107:4f6c30876dfa 181 * @{
Kojto 107:4f6c30876dfa 182 */
Kojto 107:4f6c30876dfa 183
Kojto 107:4f6c30876dfa 184 /**
Kojto 107:4f6c30876dfa 185 * @brief Check whether the specified EXTI line flag is set or not.
Kojto 107:4f6c30876dfa 186 * @param __EXTI_LINE__: specifies the EXTI line flag to check.
Kojto 107:4f6c30876dfa 187 * This parameter can be GPIO_PIN_x where x can be(0..15)
Kojto 107:4f6c30876dfa 188 * @retval The new state of __EXTI_LINE__ (SET or RESET).
Kojto 107:4f6c30876dfa 189 */
Kojto 107:4f6c30876dfa 190 #define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
Kojto 107:4f6c30876dfa 191
Kojto 107:4f6c30876dfa 192 /**
Kojto 107:4f6c30876dfa 193 * @brief Clear the EXTI's line pending flags.
Kojto 107:4f6c30876dfa 194 * @param __EXTI_LINE__: specifies the EXTI lines flags to clear.
Kojto 107:4f6c30876dfa 195 * This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
Kojto 107:4f6c30876dfa 196 * @retval None
Kojto 107:4f6c30876dfa 197 */
Kojto 107:4f6c30876dfa 198 #define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
Kojto 107:4f6c30876dfa 199
Kojto 107:4f6c30876dfa 200 /**
Kojto 107:4f6c30876dfa 201 * @brief Check whether the specified EXTI line is asserted or not.
Kojto 107:4f6c30876dfa 202 * @param __EXTI_LINE__: specifies the EXTI line to check.
Kojto 107:4f6c30876dfa 203 * This parameter can be GPIO_PIN_x where x can be(0..15)
Kojto 107:4f6c30876dfa 204 * @retval The new state of __EXTI_LINE__ (SET or RESET).
Kojto 107:4f6c30876dfa 205 */
Kojto 107:4f6c30876dfa 206 #define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
Kojto 107:4f6c30876dfa 207
Kojto 107:4f6c30876dfa 208 /**
Kojto 107:4f6c30876dfa 209 * @brief Clear the EXTI's line pending bits.
Kojto 107:4f6c30876dfa 210 * @param __EXTI_LINE__: specifies the EXTI lines to clear.
Kojto 107:4f6c30876dfa 211 * This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
Kojto 107:4f6c30876dfa 212 * @retval None
Kojto 107:4f6c30876dfa 213 */
Kojto 107:4f6c30876dfa 214 #define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
Kojto 107:4f6c30876dfa 215
Kojto 107:4f6c30876dfa 216 /**
Kojto 107:4f6c30876dfa 217 * @brief Generate a Software interrupt on selected EXTI line.
Kojto 107:4f6c30876dfa 218 * @param __EXTI_LINE__: specifies the EXTI line to check.
Kojto 107:4f6c30876dfa 219 * This parameter can be GPIO_PIN_x where x can be(0..15)
Kojto 107:4f6c30876dfa 220 * @retval None
Kojto 107:4f6c30876dfa 221 */
Kojto 107:4f6c30876dfa 222 #define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER |= (__EXTI_LINE__))
Kojto 107:4f6c30876dfa 223
Kojto 107:4f6c30876dfa 224 /**
Kojto 107:4f6c30876dfa 225 * @}
Kojto 107:4f6c30876dfa 226 */
Kojto 107:4f6c30876dfa 227
Kojto 107:4f6c30876dfa 228 /* Private macros ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 229 /** @addtogroup GPIO_Private_Macros GPIO Private Macros
Kojto 107:4f6c30876dfa 230 * @{
Kojto 107:4f6c30876dfa 231 */
Kojto 107:4f6c30876dfa 232 #define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))
Kojto 107:4f6c30876dfa 233
Kojto 107:4f6c30876dfa 234 #define IS_GPIO_PIN(__PIN__) (((__PIN__) & GPIO_PIN_MASK) != (uint32_t)0x00)
Kojto 107:4f6c30876dfa 235
Kojto 107:4f6c30876dfa 236 #define IS_GPIO_MODE(__MODE__) (((__MODE__) == GPIO_MODE_INPUT) ||\
Kojto 107:4f6c30876dfa 237 ((__MODE__) == GPIO_MODE_OUTPUT_PP) ||\
Kojto 107:4f6c30876dfa 238 ((__MODE__) == GPIO_MODE_OUTPUT_OD) ||\
Kojto 107:4f6c30876dfa 239 ((__MODE__) == GPIO_MODE_AF_PP) ||\
Kojto 107:4f6c30876dfa 240 ((__MODE__) == GPIO_MODE_AF_OD) ||\
Kojto 107:4f6c30876dfa 241 ((__MODE__) == GPIO_MODE_IT_RISING) ||\
Kojto 107:4f6c30876dfa 242 ((__MODE__) == GPIO_MODE_IT_FALLING) ||\
Kojto 107:4f6c30876dfa 243 ((__MODE__) == GPIO_MODE_IT_RISING_FALLING) ||\
Kojto 107:4f6c30876dfa 244 ((__MODE__) == GPIO_MODE_EVT_RISING) ||\
Kojto 107:4f6c30876dfa 245 ((__MODE__) == GPIO_MODE_EVT_FALLING) ||\
Kojto 107:4f6c30876dfa 246 ((__MODE__) == GPIO_MODE_EVT_RISING_FALLING) ||\
Kojto 107:4f6c30876dfa 247 ((__MODE__) == GPIO_MODE_ANALOG) ||\
Kojto 107:4f6c30876dfa 248 ((__MODE__) == GPIO_MODE_ANALOG_ADC_CONTROL))
Kojto 107:4f6c30876dfa 249
Kojto 107:4f6c30876dfa 250 #define IS_GPIO_SPEED(__SPEED__) (((__SPEED__) == GPIO_SPEED_LOW) ||\
Kojto 107:4f6c30876dfa 251 ((__SPEED__) == GPIO_SPEED_MEDIUM) ||\
Kojto 107:4f6c30876dfa 252 ((__SPEED__) == GPIO_SPEED_FAST) ||\
Kojto 107:4f6c30876dfa 253 ((__SPEED__) == GPIO_SPEED_HIGH))
Kojto 107:4f6c30876dfa 254
Kojto 107:4f6c30876dfa 255 #define IS_GPIO_PULL(__PULL__) (((__PULL__) == GPIO_NOPULL) ||\
Kojto 107:4f6c30876dfa 256 ((__PULL__) == GPIO_PULLUP) || \
Kojto 107:4f6c30876dfa 257 ((__PULL__) == GPIO_PULLDOWN))
Kojto 107:4f6c30876dfa 258 /**
Kojto 107:4f6c30876dfa 259 * @}
Kojto 107:4f6c30876dfa 260 */
Kojto 107:4f6c30876dfa 261
Kojto 107:4f6c30876dfa 262 /* Include GPIO HAL Extended module */
Kojto 107:4f6c30876dfa 263 #include "stm32l4xx_hal_gpio_ex.h"
Kojto 107:4f6c30876dfa 264
Kojto 107:4f6c30876dfa 265 /* Exported functions --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 266 /** @addtogroup GPIO_Exported_Functions GPIO Exported Functions
Kojto 107:4f6c30876dfa 267 * @{
Kojto 107:4f6c30876dfa 268 */
Kojto 107:4f6c30876dfa 269
Kojto 107:4f6c30876dfa 270 /** @addtogroup GPIO_Exported_Functions_Group1 Initialization/de-initialization functions
Kojto 107:4f6c30876dfa 271 * @brief Initialization and Configuration functions
Kojto 107:4f6c30876dfa 272 * @{
Kojto 107:4f6c30876dfa 273 */
Kojto 107:4f6c30876dfa 274
Kojto 107:4f6c30876dfa 275 /* Initialization and de-initialization functions *****************************/
Kojto 107:4f6c30876dfa 276 void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
Kojto 107:4f6c30876dfa 277 void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
Kojto 107:4f6c30876dfa 278
Kojto 107:4f6c30876dfa 279 /**
Kojto 107:4f6c30876dfa 280 * @}
Kojto 107:4f6c30876dfa 281 */
Kojto 107:4f6c30876dfa 282
Kojto 107:4f6c30876dfa 283 /** @addtogroup GPIO_Exported_Functions_Group2 IO operation functions
Kojto 107:4f6c30876dfa 284 * @{
Kojto 107:4f6c30876dfa 285 */
Kojto 107:4f6c30876dfa 286
Kojto 107:4f6c30876dfa 287 /* IO operation functions *****************************************************/
Kojto 107:4f6c30876dfa 288 GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
Kojto 107:4f6c30876dfa 289 void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
Kojto 107:4f6c30876dfa 290 void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
Kojto 107:4f6c30876dfa 291 HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
Kojto 107:4f6c30876dfa 292 void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
Kojto 107:4f6c30876dfa 293 void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
Kojto 107:4f6c30876dfa 294
Kojto 107:4f6c30876dfa 295 /**
Kojto 107:4f6c30876dfa 296 * @}
Kojto 107:4f6c30876dfa 297 */
Kojto 107:4f6c30876dfa 298
Kojto 107:4f6c30876dfa 299 /**
Kojto 107:4f6c30876dfa 300 * @}
Kojto 107:4f6c30876dfa 301 */
Kojto 107:4f6c30876dfa 302
Kojto 107:4f6c30876dfa 303 /**
Kojto 107:4f6c30876dfa 304 * @}
Kojto 107:4f6c30876dfa 305 */
Kojto 107:4f6c30876dfa 306
Kojto 107:4f6c30876dfa 307 /**
Kojto 107:4f6c30876dfa 308 * @}
Kojto 107:4f6c30876dfa 309 */
Kojto 107:4f6c30876dfa 310
Kojto 107:4f6c30876dfa 311 #ifdef __cplusplus
Kojto 107:4f6c30876dfa 312 }
Kojto 107:4f6c30876dfa 313 #endif
Kojto 107:4f6c30876dfa 314
Kojto 107:4f6c30876dfa 315 #endif /* __STM32L4xx_HAL_GPIO_H */
Kojto 107:4f6c30876dfa 316
Kojto 107:4f6c30876dfa 317 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/