Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

478 строки
18 KiB

  1. /*
  2. * Copyright (c) 2015, Freescale Semiconductor, Inc.
  3. * Copyright 2016-2017 NXP
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. */
  8. #ifndef _FSL_PORT_H_
  9. #define _FSL_PORT_H_
  10. #include "fsl_common.h"
  11. /*!
  12. * @addtogroup port
  13. * @{
  14. */
  15. /*******************************************************************************
  16. * Definitions
  17. ******************************************************************************/
  18. /* Component ID definition, used by tools. */
  19. #ifndef FSL_COMPONENT_ID
  20. #define FSL_COMPONENT_ID "platform.drivers.port"
  21. #endif
  22. /*! @name Driver version */
  23. /*@{*/
  24. /*! Version 2.1.0. */
  25. #define FSL_PORT_DRIVER_VERSION (MAKE_VERSION(2, 1, 0))
  26. /*@}*/
  27. #if defined(FSL_FEATURE_PORT_HAS_PULL_ENABLE) && FSL_FEATURE_PORT_HAS_PULL_ENABLE
  28. /*! @brief Internal resistor pull feature selection */
  29. enum _port_pull
  30. {
  31. kPORT_PullDisable = 0U, /*!< Internal pull-up/down resistor is disabled. */
  32. kPORT_PullDown = 2U, /*!< Internal pull-down resistor is enabled. */
  33. kPORT_PullUp = 3U, /*!< Internal pull-up resistor is enabled. */
  34. };
  35. #endif /* FSL_FEATURE_PORT_HAS_PULL_ENABLE */
  36. #if defined(FSL_FEATURE_PORT_HAS_SLEW_RATE) && FSL_FEATURE_PORT_HAS_SLEW_RATE
  37. /*! @brief Slew rate selection */
  38. enum _port_slew_rate
  39. {
  40. kPORT_FastSlewRate = 0U, /*!< Fast slew rate is configured. */
  41. kPORT_SlowSlewRate = 1U, /*!< Slow slew rate is configured. */
  42. };
  43. #endif /* FSL_FEATURE_PORT_HAS_SLEW_RATE */
  44. #if defined(FSL_FEATURE_PORT_HAS_OPEN_DRAIN) && FSL_FEATURE_PORT_HAS_OPEN_DRAIN
  45. /*! @brief Open Drain feature enable/disable */
  46. enum _port_open_drain_enable
  47. {
  48. kPORT_OpenDrainDisable = 0U, /*!< Open drain output is disabled. */
  49. kPORT_OpenDrainEnable = 1U, /*!< Open drain output is enabled. */
  50. };
  51. #endif /* FSL_FEATURE_PORT_HAS_OPEN_DRAIN */
  52. #if defined(FSL_FEATURE_PORT_HAS_PASSIVE_FILTER) && FSL_FEATURE_PORT_HAS_PASSIVE_FILTER
  53. /*! @brief Passive filter feature enable/disable */
  54. enum _port_passive_filter_enable
  55. {
  56. kPORT_PassiveFilterDisable = 0U, /*!< Passive input filter is disabled. */
  57. kPORT_PassiveFilterEnable = 1U, /*!< Passive input filter is enabled. */
  58. };
  59. #endif
  60. #if defined(FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH) && FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH
  61. /*! @brief Configures the drive strength. */
  62. enum _port_drive_strength
  63. {
  64. kPORT_LowDriveStrength = 0U, /*!< Low-drive strength is configured. */
  65. kPORT_HighDriveStrength = 1U, /*!< High-drive strength is configured. */
  66. };
  67. #endif /* FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH */
  68. #if defined(FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK) && FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK
  69. /*! @brief Unlock/lock the pin control register field[15:0] */
  70. enum _port_lock_register
  71. {
  72. kPORT_UnlockRegister = 0U, /*!< Pin Control Register fields [15:0] are not locked. */
  73. kPORT_LockRegister = 1U, /*!< Pin Control Register fields [15:0] are locked. */
  74. };
  75. #endif /* FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK */
  76. #if defined(FSL_FEATURE_PORT_PCR_MUX_WIDTH) && FSL_FEATURE_PORT_PCR_MUX_WIDTH
  77. /*! @brief Pin mux selection */
  78. typedef enum _port_mux
  79. {
  80. kPORT_PinDisabledOrAnalog = 0U, /*!< Corresponding pin is disabled, but is used as an analog pin. */
  81. kPORT_MuxAsGpio = 1U, /*!< Corresponding pin is configured as GPIO. */
  82. kPORT_MuxAlt2 = 2U, /*!< Chip-specific */
  83. kPORT_MuxAlt3 = 3U, /*!< Chip-specific */
  84. kPORT_MuxAlt4 = 4U, /*!< Chip-specific */
  85. kPORT_MuxAlt5 = 5U, /*!< Chip-specific */
  86. kPORT_MuxAlt6 = 6U, /*!< Chip-specific */
  87. kPORT_MuxAlt7 = 7U, /*!< Chip-specific */
  88. kPORT_MuxAlt8 = 8U, /*!< Chip-specific */
  89. kPORT_MuxAlt9 = 9U, /*!< Chip-specific */
  90. kPORT_MuxAlt10 = 10U, /*!< Chip-specific */
  91. kPORT_MuxAlt11 = 11U, /*!< Chip-specific */
  92. kPORT_MuxAlt12 = 12U, /*!< Chip-specific */
  93. kPORT_MuxAlt13 = 13U, /*!< Chip-specific */
  94. kPORT_MuxAlt14 = 14U, /*!< Chip-specific */
  95. kPORT_MuxAlt15 = 15U, /*!< Chip-specific */
  96. } port_mux_t;
  97. #endif /* FSL_FEATURE_PORT_PCR_MUX_WIDTH */
  98. #if !(defined(FSL_FEATURE_PORT_HAS_NO_INTERRUPT) && FSL_FEATURE_PORT_HAS_NO_INTERRUPT)
  99. /*! @brief Configures the interrupt generation condition. */
  100. typedef enum _port_interrupt
  101. {
  102. kPORT_InterruptOrDMADisabled = 0x0U, /*!< Interrupt/DMA request is disabled. */
  103. #if defined(FSL_FEATURE_PORT_HAS_DMA_REQUEST) && FSL_FEATURE_PORT_HAS_DMA_REQUEST || defined(DOXYGEN_OUTPUT)
  104. kPORT_DMARisingEdge = 0x1U, /*!< DMA request on rising edge. */
  105. kPORT_DMAFallingEdge = 0x2U, /*!< DMA request on falling edge. */
  106. kPORT_DMAEitherEdge = 0x3U, /*!< DMA request on either edge. */
  107. #endif
  108. #if defined(FSL_FEATURE_PORT_HAS_IRQC_FLAG) && FSL_FEATURE_PORT_HAS_IRQC_FLAG || defined(DOXYGEN_OUTPUT)
  109. kPORT_FlagRisingEdge = 0x05U, /*!< Flag sets on rising edge. */
  110. kPORT_FlagFallingEdge = 0x06U, /*!< Flag sets on falling edge. */
  111. kPORT_FlagEitherEdge = 0x07U, /*!< Flag sets on either edge. */
  112. #endif
  113. kPORT_InterruptLogicZero = 0x8U, /*!< Interrupt when logic zero. */
  114. kPORT_InterruptRisingEdge = 0x9U, /*!< Interrupt on rising edge. */
  115. kPORT_InterruptFallingEdge = 0xAU, /*!< Interrupt on falling edge. */
  116. kPORT_InterruptEitherEdge = 0xBU, /*!< Interrupt on either edge. */
  117. kPORT_InterruptLogicOne = 0xCU, /*!< Interrupt when logic one. */
  118. #if defined(FSL_FEATURE_PORT_HAS_IRQC_TRIGGER) && FSL_FEATURE_PORT_HAS_IRQC_TRIGGER || defined(DOXYGEN_OUTPUT)
  119. kPORT_ActiveHighTriggerOutputEnable = 0xDU, /*!< Enable active high-trigger output. */
  120. kPORT_ActiveLowTriggerOutputEnable = 0xEU, /*!< Enable active low-trigger output. */
  121. #endif
  122. } port_interrupt_t;
  123. #endif
  124. #if defined(FSL_FEATURE_PORT_HAS_DIGITAL_FILTER) && FSL_FEATURE_PORT_HAS_DIGITAL_FILTER
  125. /*! @brief Digital filter clock source selection */
  126. typedef enum _port_digital_filter_clock_source
  127. {
  128. kPORT_BusClock = 0U, /*!< Digital filters are clocked by the bus clock. */
  129. kPORT_LpoClock = 1U, /*!< Digital filters are clocked by the 1 kHz LPO clock. */
  130. } port_digital_filter_clock_source_t;
  131. /*! @brief PORT digital filter feature configuration definition */
  132. typedef struct _port_digital_filter_config
  133. {
  134. uint32_t digitalFilterWidth; /*!< Set digital filter width */
  135. port_digital_filter_clock_source_t clockSource; /*!< Set digital filter clockSource */
  136. } port_digital_filter_config_t;
  137. #endif /* FSL_FEATURE_PORT_HAS_DIGITAL_FILTER */
  138. #if defined(FSL_FEATURE_PORT_PCR_MUX_WIDTH) && FSL_FEATURE_PORT_PCR_MUX_WIDTH
  139. /*! @brief PORT pin configuration structure */
  140. typedef struct _port_pin_config
  141. {
  142. #if defined(FSL_FEATURE_PORT_HAS_PULL_ENABLE) && FSL_FEATURE_PORT_HAS_PULL_ENABLE
  143. uint16_t pullSelect : 2; /*!< No-pull/pull-down/pull-up select */
  144. #else
  145. uint16_t : 2;
  146. #endif /* FSL_FEATURE_PORT_HAS_PULL_ENABLE */
  147. #if defined(FSL_FEATURE_PORT_HAS_SLEW_RATE) && FSL_FEATURE_PORT_HAS_SLEW_RATE
  148. uint16_t slewRate : 1; /*!< Fast/slow slew rate Configure */
  149. #else
  150. uint16_t : 1;
  151. #endif /* FSL_FEATURE_PORT_HAS_SLEW_RATE */
  152. uint16_t : 1;
  153. #if defined(FSL_FEATURE_PORT_HAS_PASSIVE_FILTER) && FSL_FEATURE_PORT_HAS_PASSIVE_FILTER
  154. uint16_t passiveFilterEnable : 1; /*!< Passive filter enable/disable */
  155. #else
  156. uint16_t : 1;
  157. #endif /* FSL_FEATURE_PORT_HAS_PASSIVE_FILTER */
  158. #if defined(FSL_FEATURE_PORT_HAS_OPEN_DRAIN) && FSL_FEATURE_PORT_HAS_OPEN_DRAIN
  159. uint16_t openDrainEnable : 1; /*!< Open drain enable/disable */
  160. #else
  161. uint16_t : 1;
  162. #endif /* FSL_FEATURE_PORT_HAS_OPEN_DRAIN */
  163. #if defined(FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH) && FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH
  164. uint16_t driveStrength : 1; /*!< Fast/slow drive strength configure */
  165. #else
  166. uint16_t : 1;
  167. #endif
  168. uint16_t : 1;
  169. #if defined(FSL_FEATURE_PORT_PCR_MUX_WIDTH) && (FSL_FEATURE_PORT_PCR_MUX_WIDTH == 3)
  170. uint16_t mux : 3; /*!< Pin mux Configure */
  171. uint16_t : 4;
  172. #elif defined(FSL_FEATURE_PORT_PCR_MUX_WIDTH) && (FSL_FEATURE_PORT_PCR_MUX_WIDTH == 4)
  173. uint16_t mux : 4; /*!< Pin mux Configure */
  174. uint16_t : 3;
  175. #else
  176. uint16_t : 7,
  177. #endif
  178. #if defined(FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK) && FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK
  179. uint16_t lockRegister : 1; /*!< Lock/unlock the PCR field[15:0] */
  180. #else
  181. uint16_t : 1;
  182. #endif /* FSL_FEATURE_PORT_HAS_PIN_CONTROL_LOCK */
  183. } port_pin_config_t;
  184. #endif /* FSL_FEATURE_PORT_PCR_MUX_WIDTH */
  185. /*******************************************************************************
  186. * API
  187. ******************************************************************************/
  188. #if defined(__cplusplus)
  189. extern "C" {
  190. #endif
  191. #if defined(FSL_FEATURE_PORT_PCR_MUX_WIDTH) && FSL_FEATURE_PORT_PCR_MUX_WIDTH
  192. /*! @name Configuration */
  193. /*@{*/
  194. /*!
  195. * @brief Sets the port PCR register.
  196. *
  197. * This is an example to define an input pin or output pin PCR configuration.
  198. * @code
  199. * // Define a digital input pin PCR configuration
  200. * port_pin_config_t config = {
  201. * kPORT_PullUp,
  202. * kPORT_FastSlewRate,
  203. * kPORT_PassiveFilterDisable,
  204. * kPORT_OpenDrainDisable,
  205. * kPORT_LowDriveStrength,
  206. * kPORT_MuxAsGpio,
  207. * kPORT_UnLockRegister,
  208. * };
  209. * @endcode
  210. *
  211. * @param base PORT peripheral base pointer.
  212. * @param pin PORT pin number.
  213. * @param config PORT PCR register configuration structure.
  214. */
  215. static inline void PORT_SetPinConfig(PORT_Type *base, uint32_t pin, const port_pin_config_t *config)
  216. {
  217. assert(config);
  218. uint32_t addr = (uint32_t)&base->PCR[pin];
  219. *(volatile uint16_t *)(addr) = *((const uint16_t *)config);
  220. }
  221. /*!
  222. * @brief Sets the port PCR register for multiple pins.
  223. *
  224. * This is an example to define input pins or output pins PCR configuration.
  225. * @code
  226. * // Define a digital input pin PCR configuration
  227. * port_pin_config_t config = {
  228. * kPORT_PullUp ,
  229. * kPORT_PullEnable,
  230. * kPORT_FastSlewRate,
  231. * kPORT_PassiveFilterDisable,
  232. * kPORT_OpenDrainDisable,
  233. * kPORT_LowDriveStrength,
  234. * kPORT_MuxAsGpio,
  235. * kPORT_UnlockRegister,
  236. * };
  237. * @endcode
  238. *
  239. * @param base PORT peripheral base pointer.
  240. * @param mask PORT pin number macro.
  241. * @param config PORT PCR register configuration structure.
  242. */
  243. static inline void PORT_SetMultiplePinsConfig(PORT_Type *base, uint32_t mask, const port_pin_config_t *config)
  244. {
  245. assert(config);
  246. uint16_t pcrl = *((const uint16_t *)config);
  247. if (mask & 0xffffU)
  248. {
  249. base->GPCLR = ((mask & 0xffffU) << 16) | pcrl;
  250. }
  251. if (mask >> 16)
  252. {
  253. base->GPCHR = (mask & 0xffff0000U) | pcrl;
  254. }
  255. }
  256. #if defined(FSL_FEATURE_PORT_HAS_MULTIPLE_IRQ_CONFIG) && FSL_FEATURE_PORT_HAS_MULTIPLE_IRQ_CONFIG
  257. /*!
  258. * @brief Sets the port interrupt configuration in PCR register for multiple pins.
  259. *
  260. * @param base PORT peripheral base pointer.
  261. * @param mask PORT pin number macro.
  262. * @param config PORT pin interrupt configuration.
  263. * - #kPORT_InterruptOrDMADisabled: Interrupt/DMA request disabled.
  264. * - #kPORT_DMARisingEdge : DMA request on rising edge(if the DMA requests exit).
  265. * - #kPORT_DMAFallingEdge: DMA request on falling edge(if the DMA requests exit).
  266. * - #kPORT_DMAEitherEdge : DMA request on either edge(if the DMA requests exit).
  267. * - #kPORT_FlagRisingEdge : Flag sets on rising edge(if the Flag states exit).
  268. * - #kPORT_FlagFallingEdge : Flag sets on falling edge(if the Flag states exit).
  269. * - #kPORT_FlagEitherEdge : Flag sets on either edge(if the Flag states exit).
  270. * - #kPORT_InterruptLogicZero : Interrupt when logic zero.
  271. * - #kPORT_InterruptRisingEdge : Interrupt on rising edge.
  272. * - #kPORT_InterruptFallingEdge: Interrupt on falling edge.
  273. * - #kPORT_InterruptEitherEdge : Interrupt on either edge.
  274. * - #kPORT_InterruptLogicOne : Interrupt when logic one.
  275. * - #kPORT_ActiveHighTriggerOutputEnable : Enable active high-trigger output (if the trigger states exit).
  276. * - #kPORT_ActiveLowTriggerOutputEnable : Enable active low-trigger output (if the trigger states exit)..
  277. */
  278. static inline void PORT_SetMultipleInterruptPinsConfig(PORT_Type *base, uint32_t mask, port_interrupt_t config)
  279. {
  280. assert(config);
  281. if (mask & 0xffffU)
  282. {
  283. base->GICLR = (config << 16) | (mask & 0xffffU);
  284. }
  285. mask = mask >> 16;
  286. if (mask)
  287. {
  288. base->GICHR = (config << 16) | (mask & 0xffffU);
  289. }
  290. }
  291. #endif
  292. /*!
  293. * @brief Configures the pin muxing.
  294. *
  295. * @param base PORT peripheral base pointer.
  296. * @param pin PORT pin number.
  297. * @param mux pin muxing slot selection.
  298. * - #kPORT_PinDisabledOrAnalog: Pin disabled or work in analog function.
  299. * - #kPORT_MuxAsGpio : Set as GPIO.
  300. * - #kPORT_MuxAlt2 : chip-specific.
  301. * - #kPORT_MuxAlt3 : chip-specific.
  302. * - #kPORT_MuxAlt4 : chip-specific.
  303. * - #kPORT_MuxAlt5 : chip-specific.
  304. * - #kPORT_MuxAlt6 : chip-specific.
  305. * - #kPORT_MuxAlt7 : chip-specific.
  306. * @note : This function is NOT recommended to use together with the PORT_SetPinsConfig, because
  307. * the PORT_SetPinsConfig need to configure the pin mux anyway (Otherwise the pin mux is
  308. * reset to zero : kPORT_PinDisabledOrAnalog).
  309. * This function is recommended to use to reset the pin mux
  310. *
  311. */
  312. static inline void PORT_SetPinMux(PORT_Type *base, uint32_t pin, port_mux_t mux)
  313. {
  314. base->PCR[pin] = (base->PCR[pin] & ~PORT_PCR_MUX_MASK) | PORT_PCR_MUX(mux);
  315. }
  316. #endif /* FSL_FEATURE_PORT_PCR_MUX_WIDTH */
  317. #if defined(FSL_FEATURE_PORT_HAS_DIGITAL_FILTER) && FSL_FEATURE_PORT_HAS_DIGITAL_FILTER
  318. /*!
  319. * @brief Enables the digital filter in one port, each bit of the 32-bit register represents one pin.
  320. *
  321. * @param base PORT peripheral base pointer.
  322. * @param mask PORT pin number macro.
  323. * @param enable PORT digital filter configuration.
  324. */
  325. static inline void PORT_EnablePinsDigitalFilter(PORT_Type *base, uint32_t mask, bool enable)
  326. {
  327. if (enable == true)
  328. {
  329. base->DFER |= mask;
  330. }
  331. else
  332. {
  333. base->DFER &= ~mask;
  334. }
  335. }
  336. /*!
  337. * @brief Sets the digital filter in one port, each bit of the 32-bit register represents one pin.
  338. *
  339. * @param base PORT peripheral base pointer.
  340. * @param config PORT digital filter configuration structure.
  341. */
  342. static inline void PORT_SetDigitalFilterConfig(PORT_Type *base, const port_digital_filter_config_t *config)
  343. {
  344. assert(config);
  345. base->DFCR = PORT_DFCR_CS(config->clockSource);
  346. base->DFWR = PORT_DFWR_FILT(config->digitalFilterWidth);
  347. }
  348. #endif /* FSL_FEATURE_PORT_HAS_DIGITAL_FILTER */
  349. /*@}*/
  350. /*! @name Interrupt */
  351. /*@{*/
  352. #if !(defined(FSL_FEATURE_PORT_HAS_NO_INTERRUPT) && FSL_FEATURE_PORT_HAS_NO_INTERRUPT)
  353. /*!
  354. * @brief Configures the port pin interrupt/DMA request.
  355. *
  356. * @param base PORT peripheral base pointer.
  357. * @param pin PORT pin number.
  358. * @param config PORT pin interrupt configuration.
  359. * - #kPORT_InterruptOrDMADisabled: Interrupt/DMA request disabled.
  360. * - #kPORT_DMARisingEdge : DMA request on rising edge(if the DMA requests exit).
  361. * - #kPORT_DMAFallingEdge: DMA request on falling edge(if the DMA requests exit).
  362. * - #kPORT_DMAEitherEdge : DMA request on either edge(if the DMA requests exit).
  363. * - #kPORT_FlagRisingEdge : Flag sets on rising edge(if the Flag states exit).
  364. * - #kPORT_FlagFallingEdge : Flag sets on falling edge(if the Flag states exit).
  365. * - #kPORT_FlagEitherEdge : Flag sets on either edge(if the Flag states exit).
  366. * - #kPORT_InterruptLogicZero : Interrupt when logic zero.
  367. * - #kPORT_InterruptRisingEdge : Interrupt on rising edge.
  368. * - #kPORT_InterruptFallingEdge: Interrupt on falling edge.
  369. * - #kPORT_InterruptEitherEdge : Interrupt on either edge.
  370. * - #kPORT_InterruptLogicOne : Interrupt when logic one.
  371. * - #kPORT_ActiveHighTriggerOutputEnable : Enable active high-trigger output (if the trigger states exit).
  372. * - #kPORT_ActiveLowTriggerOutputEnable : Enable active low-trigger output (if the trigger states exit).
  373. */
  374. static inline void PORT_SetPinInterruptConfig(PORT_Type *base, uint32_t pin, port_interrupt_t config)
  375. {
  376. base->PCR[pin] = (base->PCR[pin] & ~PORT_PCR_IRQC_MASK) | PORT_PCR_IRQC(config);
  377. }
  378. #endif
  379. #if defined(FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH) && FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH
  380. /*!
  381. * @brief Configures the port pin drive strength.
  382. *
  383. * @param base PORT peripheral base pointer.
  384. * @param pin PORT pin number.
  385. * @param strength PORT pin drive strength
  386. * - #kPORT_LowDriveStrength = 0U - Low-drive strength is configured.
  387. * - #kPORT_HighDriveStrength = 1U - High-drive strength is configured.
  388. */
  389. static inline void PORT_SetPinDriveStrength(PORT_Type *base, uint32_t pin, uint8_t strength)
  390. {
  391. base->PCR[pin] = (base->PCR[pin] & ~PORT_PCR_DSE_MASK) | PORT_PCR_DSE(strength);
  392. }
  393. #endif
  394. #if !(defined(FSL_FEATURE_PORT_HAS_NO_INTERRUPT) && FSL_FEATURE_PORT_HAS_NO_INTERRUPT)
  395. /*!
  396. * @brief Reads the whole port status flag.
  397. *
  398. * If a pin is configured to generate the DMA request, the corresponding flag
  399. * is cleared automatically at the completion of the requested DMA transfer.
  400. * Otherwise, the flag remains set until a logic one is written to that flag.
  401. * If configured for a level sensitive interrupt that remains asserted, the flag
  402. * is set again immediately.
  403. *
  404. * @param base PORT peripheral base pointer.
  405. * @return Current port interrupt status flags, for example, 0x00010001 means the
  406. * pin 0 and 16 have the interrupt.
  407. */
  408. static inline uint32_t PORT_GetPinsInterruptFlags(PORT_Type *base)
  409. {
  410. return base->ISFR;
  411. }
  412. /*!
  413. * @brief Clears the multiple pin interrupt status flag.
  414. *
  415. * @param base PORT peripheral base pointer.
  416. * @param mask PORT pin number macro.
  417. */
  418. static inline void PORT_ClearPinsInterruptFlags(PORT_Type *base, uint32_t mask)
  419. {
  420. base->ISFR = mask;
  421. }
  422. #endif
  423. /*@}*/
  424. #if defined(__cplusplus)
  425. }
  426. #endif
  427. /*! @}*/
  428. #endif /* _FSL_PORT_H_ */