1 /** 2 ****************************************************************************** 3 * @file tae32f53xx_ll_gpio.h 4 * @author MCD Application Team 5 * @brief Header file of GPIO LL module. 6 * 7 ****************************************************************************** 8 * @attention 9 * 10 * <h2><center>© Copyright (c) 2020 Tai-Action. 11 * All rights reserved.</center></h2> 12 * 13 * This software is licensed by Tai-Action under BSD 3-Clause license, 14 * the "License"; You may not use this file except in compliance with the 15 * License. You may obtain a copy of the License at: 16 * opensource.org/licenses/BSD-3-Clause 17 * 18 ****************************************************************************** 19 */ 20 21 /* Define to prevent recursive inclusion -------------------------------------*/ 22 #ifndef _TAE32F53XX_LL_GPIO_H_ 23 #define _TAE32F53XX_LL_GPIO_H_ 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif /* __cplusplus */ 28 29 /* Includes ------------------------------------------------------------------*/ 30 #include "tae32f53xx_ll_def.h" 31 32 33 /** @addtogroup TAE32F53xx_LL_Driver 34 * @{ 35 */ 36 37 /** @addtogroup GPIO_LL 38 * @{ 39 */ 40 41 42 /* Exported types ------------------------------------------------------------*/ 43 /** @defgroup GPIO_LL_Exported_Types GPIO LL Exported Types 44 * @brief GPIO LL Exported Types 45 * @{ 46 */ 47 48 /** 49 * @brief GPIO Configuration Mode 50 * Elements values convention: 0xX0Y0000Z 51 * - X : GPIO mode or Interrupt Mode 52 * - Y : External IT detection 53 * - Z : IO Direction mode (Input, Output or Alternate) 54 * @note External Interrupt only vailed in input mode 55 */ 56 typedef enum { 57 GPIO_MODE_INPUT = 0x00000000u, /*!< GPIO Input Mode */ 58 GPIO_MODE_OUTPUT = 0x00000001u, /*!< GPIO Output Mode */ 59 GPIO_MODE_AF = 0x00000002u, /*!< GPIO Alternate Mode */ 60 GPIO_MODE_ANALOG = 0x00000003u, /*!< Analog Mode */ 61 GPIO_MODE_IT_RISING = 0x10100000u, /*!< External Interrupt Mode with Rising edge trigger detection */ 62 GPIO_MODE_IT_FALLING = 0x10200000u, /*!< External Interrupt Mode with Falling edge trigger detection */ 63 GPIO_MODE_IT_RISING_FALLING = 0x10300000u, /*!< External Interrupt Mode with Rising/Falling edge trigger detection */ 64 } GPIO_ModeETypeDef; 65 66 /** 67 * @brief GPIO AF Mode enumeration 68 */ 69 70 typedef enum { 71 GPIO_AF0_INPUT = ((uint8_t)0x0), /*!< GPIO alternate function 0 INPUT */ 72 73 GPIO_AF1_OUTPUT = ((uint8_t)0x1), /*!< GPIO alternate function 1 OUTPUT */ 74 75 GPIO_AF2_MCO = ((uint8_t)0x2), /*!< GPIO alternate function 2 MCO */ 76 GPIO_AF2_SWDAT = ((uint8_t)0x2), /*!< GPIO alternate function 2 SWDAT */ 77 GPIO_AF2_SWCLK = ((uint8_t)0x2), /*!< GPIO alternate function 2 SWCLK */ 78 GPIO_AF2_SWO = ((uint8_t)0x2), /*!< GPIO alternate function 2 SWO */ 79 GPIO_AF2_SYSDBOUT = ((uint8_t)0x2), /*!< GPIO alternate function 2 SYSDBOUT */ 80 81 GPIO_AF3_TMR0 = ((uint8_t)0x3), /*!< GPIO alternate function 3 TMR0 */ 82 GPIO_AF3_TMR1 = ((uint8_t)0x3), /*!< GPIO alternate function 3 TMR1 */ 83 GPIO_AF3_TMR2 = ((uint8_t)0x3), /*!< GPIO alternate function 3 TMR2 */ 84 GPIO_AF3_TMR3 = ((uint8_t)0x3), /*!< GPIO alternate function 3 TMR3 */ 85 86 GPIO_AF4_TMR0 = ((uint8_t)0x4), /*!< GPIO alternate function 4 TMR0 */ 87 GPIO_AF4_TMR1 = ((uint8_t)0x4), /*!< GPIO alternate function 4 TMR1 */ 88 GPIO_AF4_TMR2 = ((uint8_t)0x4), /*!< GPIO alternate function 4 TMR2 */ 89 GPIO_AF4_TMR3 = ((uint8_t)0x4), /*!< GPIO alternate function 4 TMR3 */ 90 91 GPIO_AF5_TMR4 = ((uint8_t)0x5), /*!< GPIO alternate function 5 TMR4 */ 92 GPIO_AF5_TMR5 = ((uint8_t)0x5), /*!< GPIO alternate function 5 TMR5 */ 93 GPIO_AF5_TMR6 = ((uint8_t)0x5), /*!< GPIO alternate function 5 TMR6 */ 94 GPIO_AF5_TMR7 = ((uint8_t)0x5), /*!< GPIO alternate function 5 TMR7 */ 95 96 GPIO_AF6_TMR4 = ((uint8_t)0x6), /*!< GPIO alternate function 6 TMR4 */ 97 GPIO_AF6_TMR5 = ((uint8_t)0x6), /*!< GPIO alternate function 6 TMR5 */ 98 GPIO_AF6_TMR6 = ((uint8_t)0x6), /*!< GPIO alternate function 6 TMR6 */ 99 GPIO_AF6_TMR7 = ((uint8_t)0x6), /*!< GPIO alternate function 6 TMR7 */ 100 101 GPIO_AF7_CAN = ((uint8_t)0x7), /*!< GPIO alternate function 7 CAN */ 102 GPIO_AF7_I2C0 = ((uint8_t)0x7), /*!< GPIO alternate function 7 I2C0 */ 103 104 GPIO_AF8_I2C0 = ((uint8_t)0x8), /*!< GPIO alternate function 8 I2C0 */ 105 GPIO_AF8_DALI = ((uint8_t)0x8), /*!< GPIO alternate function 8 DALI */ 106 107 GPIO_AF9_I2C1 = ((uint8_t)0x9), /*!< GPIO alternate function 9 I2C1 */ 108 GPIO_AF9_UART1 = ((uint8_t)0x9), /*!< GPIO alternate function 9 UART1 */ 109 110 GPIO_AF10_UART0 = ((uint8_t)0xA), /*!< GPIO alternate function 10 UART0 */ 111 GPIO_AF10_UART1 = ((uint8_t)0xA), /*!< GPIO alternate function 10 UART1 */ 112 113 GPIO_AF11_HRPWM = ((uint8_t)0xB), /*!< GPIO alternate function 11 HRPWM */ 114 GPIO_AF11_USB = ((uint8_t)0xB), /*!< GPIO alternate function 1 USB */ 115 116 GPIO_AF12_HRPWM = ((uint8_t)0xC), /*!< GPIO alternate function 12 HRPWM */ 117 118 GPIO_AF13_HRPWM = ((uint8_t)0xD), /*!< GPIO alternate function 13 HRPWM */ 119 120 GPIO_AF14_CMP0 = ((uint8_t)0xE), /*!< GPIO alternate function 14 CMP0 */ 121 GPIO_AF14_CMP1 = ((uint8_t)0xE), /*!< GPIO alternate function 14 CMP1 */ 122 GPIO_AF14_CMP2 = ((uint8_t)0xE), /*!< GPIO alternate function 14 CMP2 */ 123 GPIO_AF14_CMP3 = ((uint8_t)0xE), /*!< GPIO alternate function 14 CMP3 */ 124 125 GPIO_AF15_ANALOG = ((uint8_t)0xF), /*!< GPIO alternate function 15 ANALOG */ 126 GPIO_AF15_ADC0 = ((uint8_t)0xF), /*!< GPIO alternate function 15 ADC0 */ 127 GPIO_AF15_ADC1 = ((uint8_t)0xF), /*!< GPIO alternate function 15 ADC1 */ 128 GPIO_AF15_DAC0 = ((uint8_t)0xF), /*!< GPIO alternate function 15 DAC0 */ 129 GPIO_AF15_DAC1 = ((uint8_t)0xF), /*!< GPIO alternate function 15 DAC1 */ 130 GPIO_AF15_DAC2 = ((uint8_t)0xF), /*!< GPIO alternate function 15 DAC2 */ 131 GPIO_AF15_DAC3 = ((uint8_t)0xF), /*!< GPIO alternate function 15 DAC3 */ 132 GPIO_AF15_CMP0 = ((uint8_t)0xF), /*!< GPIO alternate function 15 CMP0 */ 133 GPIO_AF15_CMP1 = ((uint8_t)0xF), /*!< GPIO alternate function 15 CMP1 */ 134 GPIO_AF15_CMP2 = ((uint8_t)0xF), /*!< GPIO alternate function 15 CMP2 */ 135 GPIO_AF15_CMP3 = ((uint8_t)0xF), /*!< GPIO alternate function 15 CMP3 */ 136 GPIO_AF15_USB = ((uint8_t)0xF), /*!< GPIO alternate function 15 USB */ 137 } GPIO_AFETypeDef; 138 139 /** 140 * @brief GPIO Pull-Up or Pull-Down Activation 141 */ 142 typedef enum { 143 GPIO_NOPULL = 0x00000000U, /*!< No Pull-up or Pull-down activation */ 144 GPIO_PULLUP = 0x00000001U, /*!< Pull-up activation */ 145 GPIO_PULLDOWN = 0x00000002U, /*!< Pull-down activation */ 146 } GPIO_PullETypeDef; 147 148 /** 149 * @brief GPIO output type: Push-Pull or Open-Drain 150 */ 151 typedef enum { 152 GPIO_OTYPE_PP = 0x00000000U, /*!< Output Push Pull Type */ 153 GPIO_OTYPE_OD = 0x00000001U, /*!< Output Open Drain Type */ 154 } GPIO_OutputETypeDef; 155 156 /** 157 * @brief GPIO Output Maximum frequency 158 */ 159 typedef enum { 160 GPIO_SPEED_FREQ_LOW = 0x00000000U, /*!< Low speed */ 161 GPIO_SPEED_FREQ_HIGH = 0x00000001U, /*!< High speed */ 162 } GPIO_SpeedETypeDef; 163 164 /** 165 * @brief GPIO Bit SET and Bit RESET enumeration 166 */ 167 typedef enum { 168 GPIO_PIN_RESET = 0, /*!< GPIO pin state RESET */ 169 GPIO_PIN_SET, /*!< GPIO pin state SET */ 170 } GPIO_PinStateETypeDef; 171 172 173 /** 174 * @brief GPIO Init structure definition 175 */ 176 typedef struct __GPIO_InitTypeDef { 177 uint32_t Pin; /*!< Specifies the GPIO pins to be configured. 178 This parameter can be any value of @ref GPIO_pins_define */ 179 180 GPIO_ModeETypeDef Mode; /*!< Specifies the operating mode for the selected pins. */ 181 182 GPIO_OutputETypeDef OType; /*!< Specifies the output type for the selected pins(output or AF output mode only). */ 183 184 GPIO_PullETypeDef Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins. */ 185 186 GPIO_SpeedETypeDef Speed; /*!< Specifies the speed for the selected pins. */ 187 188 GPIO_AFETypeDef Alternate; /*!< Peripheral to be connected to the selected pins. */ 189 } GPIO_InitTypeDef; 190 191 /** 192 * @} 193 */ 194 195 196 /* Exported constants --------------------------------------------------------*/ 197 /** @defgroup GPIO_LL_Exported_Constants GPIO LL Exported Constants 198 * @brief GPIO LL Exported Constants 199 * @{ 200 */ 201 202 /** @addtogroup GPIO_pins_define GPIO pins define 203 * @{ 204 */ 205 #define GPIO_NUMBER 16U 206 207 #define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */ 208 #define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */ 209 #define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */ 210 #define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */ 211 #define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */ 212 #define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */ 213 #define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */ 214 #define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */ 215 #define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */ 216 #define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */ 217 #define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */ 218 #define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */ 219 #define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */ 220 #define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */ 221 #define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */ 222 #define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */ 223 #define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */ 224 225 #define GPIO_PIN_MASK 0x0000FFFFu /* PIN mask for assert test */ 226 227 /** 228 * @} 229 */ 230 231 /** 232 * @} 233 */ 234 235 236 /* Exported macro ------------------------------------------------------------*/ 237 /** @defgroup GPIO_LL_Exported_Macros GPIO LL Exported Macros 238 * @brief GPIO LL Exported Macros 239 * @{ 240 */ 241 242 /** 243 * @brief Enable the specified GPIO_Port interrupt. 244 * @param __GPIO__ specifies GPIO Port to enable. 245 * This parameter can be one of GPIOx where x can be (A, B, ...) 246 * @return None 247 */ 248 #define __LL_GPIO_PORT_IT_ENABLE(__GPIO__) WRITE_REG((__GPIO__)->IER, 0x01U) 249 250 /** 251 * @brief Disable the specified GPIO_Port interrupt. 252 * @param __GPIO__ specifies GPIO Port to disable. 253 * This parameter can be one of GPIOx where x can be (A, B, ...) 254 * @return None 255 */ 256 #define __LL_GPIO_PORT_IT_DISABLE(__GPIO__) WRITE_REG((__GPIO__)->IER, 0x00U) 257 258 /** 259 * @brief Enable the specified GPIO_Pin interrupt. 260 * @note GPIO_Port interrupt must also be enabled. 261 * @param __GPIO__ specifies GPIO Port. 262 * This parameter can be one of GPIOx where x can be (A, B, ...) 263 * @param __PIN__ specifies GPIO Pin. 264 * This parameter can be any combination of @ref GPIO_pins_define 265 * @return None 266 */ 267 #define __LL_GPIO_IT_ENABLE(__GPIO__, __PIN__) SET_BIT((__GPIO__)->ITER, (__PIN__)) 268 269 /** 270 * @brief Disable the specified GPIO_Pin interrupt. 271 * @param __GPIO__ specifies GPIO Port. 272 * This parameter can be one of GPIOx where x can be (A, B, ...) 273 * @param __PIN__ specifies GPIO Pin. 274 * This parameter can be any combination of @ref GPIO_pins_define 275 * @return None 276 */ 277 #define __LL_GPIO_IT_DISABLE(__GPIO__, __PIN__) CLEAR_BIT((__GPIO__)->ITER, (__PIN__)) 278 279 /** 280 * @brief Check whether the specified GPIO_Pin Interrupt is enabled or not. 281 * @param __GPIO__ specifies GPIO Port. 282 * This parameter can be one of GPIOx where x can be (A, B, ...) 283 * @param __PIN__ specifies GPIO Pin. 284 * This parameter can be any combination of @ref GPIO_pins_define 285 * @return The interrupt settings for specified GPIO_Pin(ENABLE or DISABLE) 286 */ 287 #define __LL_GPIO_IT_CHECK_SOURCE(__GPIO__, __PIN__) ((((__GPIO__)->ITER & GPIO_ITER_ITE) == (__PIN__)) ? SET : RESET) 288 289 /** 290 * @brief Check whether the specified GPIO_Pin pending flag is set or not. 291 * @param __GPIO__ specifies GPIO Port. 292 * This parameter can be one of GPIOx where x can be (A, B, ...) 293 * @param __PIN__ specifies GPIO Pin. 294 * This parameter can be any combination of @ref GPIO_pins_define 295 * @return The pending state of __PIN__ 296 * @retval SET At least one of __PIN__ is Pending 297 * @retval RESET None of __PIN__ is Pending 298 */ 299 #define __LL_GPIO_GET_FLAG(__GPIO__, __PIN__) ((((__GPIO__)->PR & (__PIN__)) != 0x00UL) ? SET : RESET) 300 301 /** 302 * @brief Clear the specified GPIO_Pin pending flags 303 * @param __GPIO__ specifies GPIO Port. 304 * This parameter can be one of GPIOx where x can be (A, B, ...) 305 * @param __PIN__ specifies GPIO Pin. 306 * This parameter can be any combination of @ref GPIO_pins_define 307 * @return None 308 */ 309 #define __LL_GPIO_CLEAR_FLAG(__GPIO__, __PIN__) ((__GPIO__)->PR = (__PIN__)) 310 311 /** 312 * @brief Check whether the specified GPIO_Pin interrupt pending flag is asserted or not. 313 * @param __GPIO__ specifies GPIO Port. 314 * This parameter can be one of GPIOx where x can be (A, B, ...) 315 * @param __PIN__ specifies GPIO Pin. 316 * This parameter can be any combination of @ref GPIO_pins_define 317 * @return The interrupt pending state of __PIN__ 318 * @retval SET At least one of __PIN__ is pending interrupt 319 * @retval RESET None of __PIN__ is pending interrupt 320 */ 321 #define __LL_GPIO_GET_IT(__GPIO__, __PIN__) ((((__GPIO__)->PR & (__PIN__)) != 0x00UL) ? SET : RESET) 322 323 /** 324 * @brief Clear the specified GPIO_Pin interrupt pending flags 325 * @param __GPIO__ specifies GPIO Port. 326 * This parameter can be one of GPIOx where x can be (A, B, ...) 327 * @param __PIN__ specifies GPIO Pin. 328 * This parameter can be any combination of @ref GPIO_pins_define 329 * @return None 330 */ 331 #define __LL_GPIO_CLEAR_IT(__GPIO__, __PIN__) ((__GPIO__)->PR = (__PIN__)) 332 333 /** 334 * @brief Enable the specified GPIO_Pin input debounce feature. 335 * The external signal will debounce 4 HCLK time before enter GPIO module 336 * @param __GPIO__ specifies GPIO Port. 337 * This parameter can be one of GPIOx where x can be (A, B, ...) 338 * @param __PIN__ specifies GPIO Pin. 339 * This parameter can be any combination of @ref GPIO_pins_define 340 * @return None 341 */ 342 #define __LL_GPIO_INPUT_DEB_ENABLE(__GPIO__, __PIN__) SET_BIT((__GPIO__)->SDER, (__PIN__)) 343 344 /** 345 * @brief Disable the specified GPIO_Pin input debounce feature. 346 * The external signal will enter GPIO module without any debounce 347 * @param __GPIO__ specifies GPIO Port. 348 * This parameter can be one of GPIOx where x can be (A, B, ...) 349 * @param __PIN__ specifies GPIO Pin. 350 * This parameter can be any combination of @ref GPIO_pins_define 351 * @return None 352 */ 353 #define __LL_GPIO_INPUT_DEB_DISABLE(__GPIO__, __PIN__) CLEAR_BIT((__GPIO__)->SDER, (__PIN__)) 354 355 /** 356 * @brief Enable the specified GPIO_Pin input synchronize feature. 357 * The external signal will be aligned with HCLK before enter GPIO module 358 * @param __GPIO__ specifies GPIO Port. 359 * This parameter can be one of GPIOx where x can be (A, B, ...) 360 * @param __PIN__ specifies GPIO Pin. 361 * This parameter can be any combination of @ref GPIO_pins_define 362 * @return None 363 */ 364 #define __LL_GPIO_INPUT_SYNC_ENABLE(__GPIO__, __PIN__) SET_BIT((__GPIO__)->SDER, ((__PIN__) << 16U)) 365 366 /** 367 * @brief Disable the specified GPIO_Pin input synchronize feature. 368 * The external signal will enter GPIO module without synchronization 369 * @param __GPIO__ specifies GPIO Port. 370 * This parameter can be one of GPIOx where x can be (A, B, ...) 371 * @param __PIN__ specifies GPIO Pin. 372 * This parameter can be any combination of @ref GPIO_pins_define 373 * @return None 374 */ 375 #define __LL_GPIO_INPUT_SYNC_DISABLE(__GPIO__, __PIN__) CLEAR_BIT((__GPIO__)->SDER, ((__PIN__) << 16U)) 376 377 /** 378 * @brief Enable the specified GPIO_Pin input Hysteresis feature. 379 * When enable hysteresis, the rising edge?threshold?voltage is larger than the falling edge?threshold?voltage 380 * @param __GPIO__ specifies GPIO Port. 381 * This parameter can be one of GPIOx where x can be (A, B, ...) 382 * @param __PIN__ specifies GPIO Pin. 383 * This parameter can be any combination of @ref GPIO_pins_define 384 * @return None 385 */ 386 #define __LL_GPIO_INPUT_HY_ENABLE(__GPIO__, __PIN__) SET_BIT((__GPIO__)->IHYR, (__PIN__)) 387 388 /** 389 * @brief Disable the specified GPIO_Pin input Hysteresis feature. 390 * @param __GPIO__ specifies GPIO Port. 391 * This parameter can be one of GPIOx where x can be (A, B, ...) 392 * @param __PIN__ specifies GPIO Pin. 393 * This parameter can be any combination of @ref GPIO_pins_define 394 * @return None 395 */ 396 #define __LL_GPIO_INPUT_HY_DISABLE(__GPIO__, __PIN__) CLEAR_BIT((__GPIO__)->IHYR, (__PIN__)) 397 398 /** 399 * @brief Set low output driver strenght (8mA) for specified GPIO_Pin. 400 * @param __GPIO__ specifies GPIO Port. 401 * This parameter can be one of GPIOx where x can be (A, B, ...) 402 * @param __PIN__ specifies GPIO Pin. 403 * This parameter can be any combination of @ref GPIO_pins_define 404 * @return None 405 */ 406 #define __LL_GPIO_OUTPUT_DRV_STRENGHT_LOW(__GPIO__, __PIN__) CLEAR_BIT((__GPIO__)->DSR, (__PIN__)) 407 408 /** 409 * @brief Set high output driver strenght (24mA) for specified GPIO_Pin. 410 * @param __GPIO__ specifies GPIO Port. 411 * This parameter can be one of GPIOx where x can be (A, B, ...) 412 * @param __PIN__ specifies GPIO Pin. 413 * This parameter can be any combination of @ref GPIO_pins_define 414 * @return None 415 */ 416 #define __LL_GPIO_OUTPUT_DRV_STRENGHT_HIGH(__GPIO__, __PIN__) SET_BIT((__GPIO__)->DSR, (__PIN__)) 417 418 /** 419 * @} 420 */ 421 422 423 /* Exported functions --------------------------------------------------------*/ 424 /** @addtogroup GPIO_LL_Exported_Functions 425 * @{ 426 */ 427 428 /** @addtogroup GPIO_LL_Exported_Functions_Group1 429 * @{ 430 */ 431 LL_StatusETypeDef LL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init); 432 LL_StatusETypeDef LL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin); 433 /** 434 * @} 435 */ 436 437 438 /** @addtogroup GPIO_LL_Exported_Functions_Group2 439 * @{ 440 */ 441 void LL_GPIO_AF_Config(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_AFETypeDef Alternate); 442 /** 443 * @} 444 */ 445 446 447 /** @addtogroup GPIO_LL_Exported_Functions_Group3 448 * @{ 449 */ 450 GPIO_PinStateETypeDef LL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) ; 451 void LL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinStateETypeDef PinState); 452 void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); 453 uint16_t LL_GPIO_ReadData(GPIO_TypeDef *GPIOx); 454 void LL_GPIO_WriteData(GPIO_TypeDef *GPIOx, uint16_t Data); 455 /** 456 * @} 457 */ 458 459 460 /** @addtogroup GPIO_LL_Exported_Functions_Interrupt 461 * @{ 462 */ 463 void LL_GPIO_IRQHandler(GPIO_TypeDef *GPIOx); 464 void LL_GPIO_ExtTrigCallback(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); 465 /** 466 * @} 467 */ 468 469 /** 470 * @} 471 */ 472 473 474 /* Private types -------------------------------------------------------------*/ 475 /* Private variables ---------------------------------------------------------*/ 476 /* Private constants ---------------------------------------------------------*/ 477 /* Private macros ------------------------------------------------------------*/ 478 /** @defgroup GPIO_LL_Private_Macros GPIO LL Private Macros 479 * @brief GPIO LL Private Macros 480 * @{ 481 */ 482 483 /** 484 * @brief Judge is GPIO pin or not 485 * @param __PIN__ pin to judge 486 * @retval 0 isn't GPIO pin 487 * @retval 1 is GPIO pin 488 */ 489 #define IS_GPIO_PIN(__PIN__) ((((__PIN__) & GPIO_PIN_MASK) != 0x00U) && \ 490 (((__PIN__) & ~GPIO_PIN_MASK) == 0x00U)) 491 492 /** 493 * @} 494 */ 495 496 497 /* Private functions ---------------------------------------------------------*/ 498 499 500 /** 501 * @} 502 */ 503 504 /** 505 * @} 506 */ 507 508 509 #ifdef __cplusplus 510 } 511 #endif /* __cplusplus */ 512 513 514 #endif /* _TAE32F53XX_LL_GPIO_H_ */ 515 516 517 /************************* (C) COPYRIGHT Tai-Action *****END OF FILE***********/ 518 519