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