fsl_gpio.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. /*
  2. * The Clear BSD License
  3. * Copyright (c) 2015, Freescale Semiconductor, Inc.
  4. * Copyright 2016-2017 NXP
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without modification,
  8. * are permitted (subject to the limitations in the disclaimer below) provided
  9. * that the following conditions are met:
  10. *
  11. * o Redistributions of source code must retain the above copyright notice, this list
  12. * of conditions and the following disclaimer.
  13. *
  14. * o Redistributions in binary form must reproduce the above copyright notice, this
  15. * list of conditions and the following disclaimer in the documentation and/or
  16. * other materials provided with the distribution.
  17. *
  18. * o Neither the name of the copyright holder nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  25. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  27. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  28. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  29. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  30. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef _FSL_GPIO_H_
  35. #define _FSL_GPIO_H_
  36. #include "fsl_common.h"
  37. /*!
  38. * @addtogroup gpio
  39. * @{
  40. */
  41. /*******************************************************************************
  42. * Definitions
  43. ******************************************************************************/
  44. /*! @name Driver version */
  45. /*@{*/
  46. /*! @brief GPIO driver version 2.2.1. */
  47. #define FSL_GPIO_DRIVER_VERSION (MAKE_VERSION(2, 2, 1))
  48. /*@}*/
  49. /*! @brief GPIO direction definition */
  50. typedef enum _gpio_pin_direction
  51. {
  52. kGPIO_DigitalInput = 0U, /*!< Set current pin as digital input*/
  53. kGPIO_DigitalOutput = 1U, /*!< Set current pin as digital output*/
  54. } gpio_pin_direction_t;
  55. #if defined(FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER) && FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER
  56. /*! @brief GPIO checker attribute */
  57. typedef enum _gpio_checker_attribute
  58. {
  59. kGPIO_UsernonsecureRWUsersecureRWPrivilegedsecureRW =
  60. 0x00U, /*!< User nonsecure:Read+Write; User Secure:Read+Write; Privileged Secure:Read+Write */
  61. kGPIO_UsernonsecureRUsersecureRWPrivilegedsecureRW =
  62. 0x01U, /*!< User nonsecure:Read; User Secure:Read+Write; Privileged Secure:Read+Write */
  63. kGPIO_UsernonsecureNUsersecureRWPrivilegedsecureRW =
  64. 0x02U, /*!< User nonsecure:None; User Secure:Read+Write; Privileged Secure:Read+Write */
  65. kGPIO_UsernonsecureRUsersecureRPrivilegedsecureRW =
  66. 0x03U, /*!< User nonsecure:Read; User Secure:Read; Privileged Secure:Read+Write */
  67. kGPIO_UsernonsecureNUsersecureRPrivilegedsecureRW =
  68. 0x04U, /*!< User nonsecure:None; User Secure:Read; Privileged Secure:Read+Write */
  69. kGPIO_UsernonsecureNUsersecureNPrivilegedsecureRW =
  70. 0x05U, /*!< User nonsecure:None; User Secure:None; Privileged Secure:Read+Write */
  71. kGPIO_UsernonsecureNUsersecureNPrivilegedsecureR =
  72. 0x06U, /*!< User nonsecure:None; User Secure:None; Privileged Secure:Read */
  73. kGPIO_UsernonsecureNUsersecureNPrivilegedsecureN =
  74. 0x07U, /*!< User nonsecure:None; User Secure:None; Privileged Secure:None */
  75. kGPIO_IgnoreAttributeCheck = 0x80U, /*!< Ignores the attribute check */
  76. } gpio_checker_attribute_t;
  77. #endif
  78. /*!
  79. * @brief The GPIO pin configuration structure.
  80. *
  81. * Each pin can only be configured as either an output pin or an input pin at a time.
  82. * If configured as an input pin, leave the outputConfig unused.
  83. * Note that in some use cases, the corresponding port property should be configured in advance
  84. * with the PORT_SetPinConfig().
  85. */
  86. typedef struct _gpio_pin_config
  87. {
  88. gpio_pin_direction_t pinDirection; /*!< GPIO direction, input or output */
  89. /* Output configurations; ignore if configured as an input pin */
  90. uint8_t outputLogic; /*!< Set a default output logic, which has no use in input */
  91. } gpio_pin_config_t;
  92. /*! @} */
  93. /*******************************************************************************
  94. * API
  95. ******************************************************************************/
  96. #if defined(__cplusplus)
  97. extern "C" {
  98. #endif
  99. /*!
  100. * @addtogroup gpio_driver
  101. * @{
  102. */
  103. /*! @name GPIO Configuration */
  104. /*@{*/
  105. /*!
  106. * @brief Initializes a GPIO pin used by the board.
  107. *
  108. * To initialize the GPIO, define a pin configuration, as either input or output, in the user file.
  109. * Then, call the GPIO_PinInit() function.
  110. *
  111. * This is an example to define an input pin or an output pin configuration.
  112. * @code
  113. * // Define a digital input pin configuration,
  114. * gpio_pin_config_t config =
  115. * {
  116. * kGPIO_DigitalInput,
  117. * 0,
  118. * }
  119. * //Define a digital output pin configuration,
  120. * gpio_pin_config_t config =
  121. * {
  122. * kGPIO_DigitalOutput,
  123. * 0,
  124. * }
  125. * @endcode
  126. *
  127. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  128. * @param pin GPIO port pin number
  129. * @param config GPIO pin configuration pointer
  130. */
  131. void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config);
  132. /*@}*/
  133. /*! @name GPIO Output Operations */
  134. /*@{*/
  135. /*!
  136. * @brief Sets the output level of the multiple GPIO pins to the logic 1 or 0.
  137. *
  138. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  139. * @param pin GPIO pin number
  140. * @param output GPIO pin output logic level.
  141. * - 0: corresponding pin output low-logic level.
  142. * - 1: corresponding pin output high-logic level.
  143. */
  144. static inline void GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)
  145. {
  146. if (output == 0U)
  147. {
  148. base->PCOR = 1U << pin;
  149. }
  150. else
  151. {
  152. base->PSOR = 1U << pin;
  153. }
  154. }
  155. /*!
  156. * @brief Sets the output level of the multiple GPIO pins to the logic 1 or 0.
  157. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PinWrite.
  158. */
  159. static inline void GPIO_WritePinOutput(GPIO_Type *base, uint32_t pin, uint8_t output)
  160. {
  161. GPIO_PinWrite(base, pin, output);
  162. }
  163. /*!
  164. * @brief Sets the output level of the multiple GPIO pins to the logic 1.
  165. *
  166. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  167. * @param mask GPIO pin number macro
  168. */
  169. static inline void GPIO_PortSet(GPIO_Type *base, uint32_t mask)
  170. {
  171. base->PSOR = mask;
  172. }
  173. /*!
  174. * @brief Sets the output level of the multiple GPIO pins to the logic 1.
  175. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PortSet.
  176. */
  177. static inline void GPIO_SetPinsOutput(GPIO_Type *base, uint32_t mask)
  178. {
  179. GPIO_PortSet(base, mask);
  180. }
  181. /*!
  182. * @brief Sets the output level of the multiple GPIO pins to the logic 0.
  183. *
  184. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  185. * @param mask GPIO pin number macro
  186. */
  187. static inline void GPIO_PortClear(GPIO_Type *base, uint32_t mask)
  188. {
  189. base->PCOR = mask;
  190. }
  191. /*!
  192. * @brief Sets the output level of the multiple GPIO pins to the logic 0.
  193. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PortClear.
  194. *
  195. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  196. * @param mask GPIO pin number macro
  197. */
  198. static inline void GPIO_ClearPinsOutput(GPIO_Type *base, uint32_t mask)
  199. {
  200. GPIO_PortClear(base, mask);
  201. }
  202. /*!
  203. * @brief Reverses the current output logic of the multiple GPIO pins.
  204. *
  205. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  206. * @param mask GPIO pin number macro
  207. */
  208. static inline void GPIO_PortToggle(GPIO_Type *base, uint32_t mask)
  209. {
  210. base->PTOR = mask;
  211. }
  212. /*!
  213. * @brief Reverses the current output logic of the multiple GPIO pins.
  214. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PortToggle.
  215. */
  216. static inline void GPIO_TogglePinsOutput(GPIO_Type *base, uint32_t mask)
  217. {
  218. GPIO_PortToggle(base, mask);
  219. }
  220. /*@}*/
  221. /*! @name GPIO Input Operations */
  222. /*@{*/
  223. /*!
  224. * @brief Reads the current input value of the GPIO port.
  225. *
  226. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  227. * @param pin GPIO pin number
  228. * @retval GPIO port input value
  229. * - 0: corresponding pin input low-logic level.
  230. * - 1: corresponding pin input high-logic level.
  231. */
  232. static inline uint32_t GPIO_PinRead(GPIO_Type *base, uint32_t pin)
  233. {
  234. return (((base->PDIR) >> pin) & 0x01U);
  235. }
  236. /*!
  237. * @brief Reads the current input value of the GPIO port.
  238. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PinRead.
  239. */
  240. static inline uint32_t GPIO_ReadPinInput(GPIO_Type *base, uint32_t pin)
  241. {
  242. return GPIO_PinRead(base, pin);
  243. }
  244. /*@}*/
  245. /*! @name GPIO Interrupt */
  246. /*@{*/
  247. #if !(defined(FSL_FEATURE_GPIO_HAS_NO_PORTINTERRUPT) && FSL_FEATURE_GPIO_HAS_NO_PORTINTERRUPT)
  248. /*!
  249. * @brief Reads the GPIO port interrupt status flag.
  250. *
  251. * If a pin is configured to generate the DMA request, the corresponding flag
  252. * is cleared automatically at the completion of the requested DMA transfer.
  253. * Otherwise, the flag remains set until a logic one is written to that flag.
  254. * If configured for a level sensitive interrupt that remains asserted, the flag
  255. * is set again immediately.
  256. *
  257. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  258. * @retval The current GPIO port interrupt status flag, for example, 0x00010001 means the
  259. * pin 0 and 17 have the interrupt.
  260. */
  261. uint32_t GPIO_PortGetInterruptFlags(GPIO_Type *base);
  262. /*!
  263. * @brief Reads the GPIO port interrupt status flag.
  264. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PortGetInterruptFlags.
  265. */
  266. static inline uint32_t GPIO_GetPinsInterruptFlags(GPIO_Type *base)
  267. {
  268. return GPIO_PortGetInterruptFlags(base);
  269. }
  270. /*!
  271. * @brief Clears multiple GPIO pin interrupt status flags.
  272. *
  273. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  274. * @param mask GPIO pin number macro
  275. */
  276. void GPIO_PortClearInterruptFlags(GPIO_Type *base, uint32_t mask);
  277. /*!
  278. * @brief Clears multiple GPIO pin interrupt status flags.
  279. * @deprecated Do not use this function. It has been superceded by @ref GPIO_PortClearInterruptFlags.
  280. */
  281. static inline void GPIO_ClearPinsInterruptFlags(GPIO_Type *base, uint32_t mask)
  282. {
  283. GPIO_PortClearInterruptFlags(base, mask);
  284. }
  285. #endif
  286. #if defined(FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER) && FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER
  287. /*!
  288. * @brief The GPIO module supports a device-specific number of data ports, organized as 32-bit
  289. * words. Each 32-bit data port includes a GACR register, which defines the byte-level
  290. * attributes required for a successful access to the GPIO programming model. The attribute controls for the 4 data
  291. * bytes in the GACR follow a standard little endian
  292. * data convention.
  293. *
  294. * @param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
  295. * @param mask GPIO pin number macro
  296. */
  297. void GPIO_CheckAttributeBytes(GPIO_Type *base, gpio_checker_attribute_t attribute);
  298. #endif
  299. /*@}*/
  300. /*! @} */
  301. /*!
  302. * @addtogroup fgpio_driver
  303. * @{
  304. */
  305. /*
  306. * Introduces the FGPIO feature.
  307. *
  308. * The FGPIO features are only support on some Kinetis MCUs. The FGPIO registers are aliased to the IOPORT
  309. * interface. Accesses via the IOPORT interface occur in parallel with any instruction fetches and
  310. * complete in a single cycle. This aliased Fast GPIO memory map is called FGPIO.
  311. */
  312. #if defined(FSL_FEATURE_SOC_FGPIO_COUNT) && FSL_FEATURE_SOC_FGPIO_COUNT
  313. /*! @name FGPIO Configuration */
  314. /*@{*/
  315. /*!
  316. * @brief Initializes the FGPIO peripheral.
  317. *
  318. * This function ungates the FGPIO clock.
  319. *
  320. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  321. */
  322. void FGPIO_PortInit(FGPIO_Type *base);
  323. /*!
  324. * @brief Initializes the FGPIO peripheral.
  325. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortInit.
  326. */
  327. static inline void FGPIO_Init(FGPIO_Type *base)
  328. {
  329. FGPIO_PortInit(base);
  330. }
  331. /*!
  332. * @brief Initializes a FGPIO pin used by the board.
  333. *
  334. * To initialize the FGPIO driver, define a pin configuration, as either input or output, in the user file.
  335. * Then, call the FGPIO_PinInit() function.
  336. *
  337. * This is an example to define an input pin or an output pin configuration:
  338. * @code
  339. * // Define a digital input pin configuration,
  340. * gpio_pin_config_t config =
  341. * {
  342. * kGPIO_DigitalInput,
  343. * 0,
  344. * }
  345. * //Define a digital output pin configuration,
  346. * gpio_pin_config_t config =
  347. * {
  348. * kGPIO_DigitalOutput,
  349. * 0,
  350. * }
  351. * @endcode
  352. *
  353. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  354. * @param pin FGPIO port pin number
  355. * @param config FGPIO pin configuration pointer
  356. */
  357. void FGPIO_PinInit(FGPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config);
  358. /*@}*/
  359. /*! @name FGPIO Output Operations */
  360. /*@{*/
  361. /*!
  362. * @brief Sets the output level of the multiple FGPIO pins to the logic 1 or 0.
  363. *
  364. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  365. * @param pin FGPIO pin number
  366. * @param output FGPIOpin output logic level.
  367. * - 0: corresponding pin output low-logic level.
  368. * - 1: corresponding pin output high-logic level.
  369. */
  370. static inline void FGPIO_PinWrite(FGPIO_Type *base, uint32_t pin, uint8_t output)
  371. {
  372. if (output == 0U)
  373. {
  374. base->PCOR = 1 << pin;
  375. }
  376. else
  377. {
  378. base->PSOR = 1 << pin;
  379. }
  380. }
  381. /*!
  382. * @brief Sets the output level of the multiple FGPIO pins to the logic 1 or 0.
  383. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PinWrite.
  384. */
  385. static inline void FGPIO_WritePinOutput(FGPIO_Type *base, uint32_t pin, uint8_t output)
  386. {
  387. FGPIO_PinWrite(base, pin, output);
  388. }
  389. /*!
  390. * @brief Sets the output level of the multiple FGPIO pins to the logic 1.
  391. *
  392. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  393. * @param mask FGPIO pin number macro
  394. */
  395. static inline void FGPIO_PortSet(FGPIO_Type *base, uint32_t mask)
  396. {
  397. base->PSOR = mask;
  398. }
  399. /*!
  400. * @brief Sets the output level of the multiple FGPIO pins to the logic 1.
  401. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortSet.
  402. */
  403. static inline void FGPIO_SetPinsOutput(FGPIO_Type *base, uint32_t mask)
  404. {
  405. FGPIO_PortSet(base, mask);
  406. }
  407. /*!
  408. * @brief Sets the output level of the multiple FGPIO pins to the logic 0.
  409. *
  410. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  411. * @param mask FGPIO pin number macro
  412. */
  413. static inline void FGPIO_PortClear(FGPIO_Type *base, uint32_t mask)
  414. {
  415. base->PCOR = mask;
  416. }
  417. /*!
  418. * @brief Sets the output level of the multiple FGPIO pins to the logic 0.
  419. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortClear.
  420. */
  421. static inline void FGPIO_ClearPinsOutput(FGPIO_Type *base, uint32_t mask)
  422. {
  423. FGPIO_PortClear(base, mask);
  424. }
  425. /*!
  426. * @brief Reverses the current output logic of the multiple FGPIO pins.
  427. *
  428. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  429. * @param mask FGPIO pin number macro
  430. */
  431. static inline void FGPIO_PortToggle(FGPIO_Type *base, uint32_t mask)
  432. {
  433. base->PTOR = mask;
  434. }
  435. /*!
  436. * @brief Reverses the current output logic of the multiple FGPIO pins.
  437. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortToggle.
  438. */
  439. static inline void FGPIO_TogglePinsOutput(FGPIO_Type *base, uint32_t mask)
  440. {
  441. FGPIO_PortToggle(base, mask);
  442. }
  443. /*@}*/
  444. /*! @name FGPIO Input Operations */
  445. /*@{*/
  446. /*!
  447. * @brief Reads the current input value of the FGPIO port.
  448. *
  449. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  450. * @param pin FGPIO pin number
  451. * @retval FGPIO port input value
  452. * - 0: corresponding pin input low-logic level.
  453. * - 1: corresponding pin input high-logic level.
  454. */
  455. static inline uint32_t FGPIO_PinRead(FGPIO_Type *base, uint32_t pin)
  456. {
  457. return (((base->PDIR) >> pin) & 0x01U);
  458. }
  459. /*!
  460. * @brief Reads the current input value of the FGPIO port.
  461. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PinRead
  462. */
  463. static inline uint32_t FGPIO_ReadPinInput(FGPIO_Type *base, uint32_t pin)
  464. {
  465. return FGPIO_PinRead(base, pin);
  466. }
  467. /*@}*/
  468. /*! @name FGPIO Interrupt */
  469. /*@{*/
  470. #if !(defined(FSL_FEATURE_GPIO_HAS_NO_PORTINTERRUPT) && FSL_FEATURE_GPIO_HAS_NO_PORTINTERRUPT)
  471. /*!
  472. * @brief Reads the FGPIO port interrupt status flag.
  473. *
  474. * If a pin is configured to generate the DMA request, the corresponding flag
  475. * is cleared automatically at the completion of the requested DMA transfer.
  476. * Otherwise, the flag remains set until a logic one is written to that flag.
  477. * If configured for a level-sensitive interrupt that remains asserted, the flag
  478. * is set again immediately.
  479. *
  480. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  481. * @retval The current FGPIO port interrupt status flags, for example, 0x00010001 means the
  482. * pin 0 and 17 have the interrupt.
  483. */
  484. uint32_t FGPIO_PortGetInterruptFlags(FGPIO_Type *base);
  485. /*!
  486. * @brief Reads the FGPIO port interrupt status flag.
  487. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortGetInterruptFlags.
  488. */
  489. static inline uint32_t FGPIO_GetPinsInterruptFlags(FGPIO_Type *base)
  490. {
  491. return FGPIO_PortGetInterruptFlags(base);
  492. }
  493. /*!
  494. * @brief Clears the multiple FGPIO pin interrupt status flag.
  495. *
  496. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  497. * @param mask FGPIO pin number macro
  498. */
  499. void FGPIO_PortClearInterruptFlags(FGPIO_Type *base, uint32_t mask);
  500. /*!
  501. * @brief Clears the multiple FGPIO pin interrupt status flag.
  502. * @deprecated Do not use this function. It has been superceded by @ref FGPIO_PortClearInterruptFlags.
  503. */
  504. static inline void FGPIO_ClearPinsInterruptFlags(FGPIO_Type *base, uint32_t mask)
  505. {
  506. FGPIO_PortClearInterruptFlags(base, mask);
  507. }
  508. #endif
  509. #if defined(FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER) && FSL_FEATURE_GPIO_HAS_ATTRIBUTE_CHECKER
  510. /*!
  511. * @brief The FGPIO module supports a device-specific number of data ports, organized as 32-bit
  512. * words. Each 32-bit data port includes a GACR register, which defines the byte-level
  513. * attributes required for a successful access to the GPIO programming model. The attribute controls for the 4 data
  514. * bytes in the GACR follow a standard little endian
  515. * data convention.
  516. *
  517. * @param base FGPIO peripheral base pointer (FGPIOA, FGPIOB, FGPIOC, and so on.)
  518. * @param mask FGPIO pin number macro
  519. */
  520. void FGPIO_CheckAttributeBytes(FGPIO_Type *base, gpio_checker_attribute_t attribute);
  521. #endif
  522. /*@}*/
  523. #endif /* FSL_FEATURE_SOC_FGPIO_COUNT */
  524. #if defined(__cplusplus)
  525. }
  526. #endif
  527. /*!
  528. * @}
  529. */
  530. #endif /* _FSL_GPIO_H_*/