mbed library sources, include can_api for nucleo-f091rc

Dependents:   CanNucleoF0_example

Fork of mbed-src by mbed official

Committer:
ptpaterson
Date:
Thu Jan 07 05:49:05 2016 +0000
Revision:
645:13c87cbecd54
Parent:
610:813dcc80987e
corrected freeze on CAN_RECEIVE_IT

Who changed what in which revision?

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