SPKT

Dependents:   WAV

Committer:
phungductung
Date:
Tue Jun 04 21:51:46 2019 +0000
Revision:
0:e87aa4c49e95
libray

Who changed what in which revision?

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