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