Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

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