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 mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
116:c0f6e94411f5
.

Who changed what in which revision?

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