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