mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Nov 07 08:15:08 2014 +0000
Revision:
392:2b59412bb664
Parent:
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F091RC/stm32f0xx_hal_gpio.h@340:28d1f895c6fe
Child:
441:d2c15dda23c1
Synchronized with git revision eec0be05cd92349bee83c65f9e1302b25b5badf4

Full URL: https://github.com/mbedmicro/mbed/commit/eec0be05cd92349bee83c65f9e1302b25b5badf4/

Targets: STM32F0 - Factorisation of NUCLEO_F030R8/F072RB/F091RC cmsis folders

Who changed what in which revision?

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