fsl_pint.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /*
  2. * The Clear BSD License
  3. * Copyright (c) 2016, 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_PINT_H_
  35. #define _FSL_PINT_H_
  36. #include "fsl_common.h"
  37. /*!
  38. * @addtogroup pint_driver
  39. * @{
  40. */
  41. /*! @file */
  42. /*******************************************************************************
  43. * Definitions
  44. ******************************************************************************/
  45. /*! @name Driver version */
  46. /*@{*/
  47. #define FSL_PINT_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) /*!< Version 2.0.1 */
  48. /*@}*/
  49. /* Number of interrupt line supported by PINT */
  50. #define PINT_PIN_INT_COUNT 8U
  51. /* Number of input sources supported by PINT */
  52. #define PINT_INPUT_COUNT 8U
  53. /* PININT Bit slice source register bits */
  54. #define PININT_BITSLICE_SRC_START 8U
  55. #define PININT_BITSLICE_SRC_MASK 7U
  56. /* PININT Bit slice configuration register bits */
  57. #define PININT_BITSLICE_CFG_START 8U
  58. #define PININT_BITSLICE_CFG_MASK 7U
  59. #define PININT_BITSLICE_ENDP_MASK 7U
  60. #define PINT_PIN_INT_LEVEL 0x10U
  61. #define PINT_PIN_INT_EDGE 0x00U
  62. #define PINT_PIN_INT_FALL_OR_HIGH_LEVEL 0x02U
  63. #define PINT_PIN_INT_RISE 0x01U
  64. #define PINT_PIN_RISE_EDGE (PINT_PIN_INT_EDGE | PINT_PIN_INT_RISE)
  65. #define PINT_PIN_FALL_EDGE (PINT_PIN_INT_EDGE | PINT_PIN_INT_FALL_OR_HIGH_LEVEL)
  66. #define PINT_PIN_BOTH_EDGE (PINT_PIN_INT_EDGE | PINT_PIN_INT_RISE | PINT_PIN_INT_FALL_OR_HIGH_LEVEL)
  67. #define PINT_PIN_LOW_LEVEL (PINT_PIN_INT_LEVEL)
  68. #define PINT_PIN_HIGH_LEVEL (PINT_PIN_INT_LEVEL | PINT_PIN_INT_FALL_OR_HIGH_LEVEL)
  69. /*! @brief PINT Pin Interrupt enable type */
  70. typedef enum _pint_pin_enable
  71. {
  72. kPINT_PinIntEnableNone = 0U, /*!< Do not generate Pin Interrupt */
  73. kPINT_PinIntEnableRiseEdge = PINT_PIN_RISE_EDGE, /*!< Generate Pin Interrupt on rising edge */
  74. kPINT_PinIntEnableFallEdge = PINT_PIN_FALL_EDGE, /*!< Generate Pin Interrupt on falling edge */
  75. kPINT_PinIntEnableBothEdges = PINT_PIN_BOTH_EDGE, /*!< Generate Pin Interrupt on both edges */
  76. kPINT_PinIntEnableLowLevel = PINT_PIN_LOW_LEVEL, /*!< Generate Pin Interrupt on low level */
  77. kPINT_PinIntEnableHighLevel = PINT_PIN_HIGH_LEVEL /*!< Generate Pin Interrupt on high level */
  78. } pint_pin_enable_t;
  79. /*! @brief PINT Pin Interrupt type */
  80. typedef enum _pint_int
  81. {
  82. kPINT_PinInt0 = 0U, /*!< Pin Interrupt 0 */
  83. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 1U)
  84. kPINT_PinInt1 = 1U, /*!< Pin Interrupt 1 */
  85. #endif
  86. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 2U)
  87. kPINT_PinInt2 = 2U, /*!< Pin Interrupt 2 */
  88. #endif
  89. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 3U)
  90. kPINT_PinInt3 = 3U, /*!< Pin Interrupt 3 */
  91. #endif
  92. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 4U)
  93. kPINT_PinInt4 = 4U, /*!< Pin Interrupt 4 */
  94. #endif
  95. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 5U)
  96. kPINT_PinInt5 = 5U, /*!< Pin Interrupt 5 */
  97. #endif
  98. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 6U)
  99. kPINT_PinInt6 = 6U, /*!< Pin Interrupt 6 */
  100. #endif
  101. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 7U)
  102. kPINT_PinInt7 = 7U, /*!< Pin Interrupt 7 */
  103. #endif
  104. } pint_pin_int_t;
  105. /*! @brief PINT Pattern Match bit slice input source type */
  106. typedef enum _pint_pmatch_input_src
  107. {
  108. kPINT_PatternMatchInp0Src = 0U, /*!< Input source 0 */
  109. kPINT_PatternMatchInp1Src = 1U, /*!< Input source 1 */
  110. kPINT_PatternMatchInp2Src = 2U, /*!< Input source 2 */
  111. kPINT_PatternMatchInp3Src = 3U, /*!< Input source 3 */
  112. kPINT_PatternMatchInp4Src = 4U, /*!< Input source 4 */
  113. kPINT_PatternMatchInp5Src = 5U, /*!< Input source 5 */
  114. kPINT_PatternMatchInp6Src = 6U, /*!< Input source 6 */
  115. kPINT_PatternMatchInp7Src = 7U, /*!< Input source 7 */
  116. } pint_pmatch_input_src_t;
  117. /*! @brief PINT Pattern Match bit slice type */
  118. typedef enum _pint_pmatch_bslice
  119. {
  120. kPINT_PatternMatchBSlice0 = 0U, /*!< Bit slice 0 */
  121. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 1U)
  122. kPINT_PatternMatchBSlice1 = 1U, /*!< Bit slice 1 */
  123. #endif
  124. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 2U)
  125. kPINT_PatternMatchBSlice2 = 2U, /*!< Bit slice 2 */
  126. #endif
  127. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 3U)
  128. kPINT_PatternMatchBSlice3 = 3U, /*!< Bit slice 3 */
  129. #endif
  130. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 4U)
  131. kPINT_PatternMatchBSlice4 = 4U, /*!< Bit slice 4 */
  132. #endif
  133. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 5U)
  134. kPINT_PatternMatchBSlice5 = 5U, /*!< Bit slice 5 */
  135. #endif
  136. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 6U)
  137. kPINT_PatternMatchBSlice6 = 6U, /*!< Bit slice 6 */
  138. #endif
  139. #if (FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS > 7U)
  140. kPINT_PatternMatchBSlice7 = 7U, /*!< Bit slice 7 */
  141. #endif
  142. } pint_pmatch_bslice_t;
  143. /*! @brief PINT Pattern Match configuration type */
  144. typedef enum _pint_pmatch_bslice_cfg
  145. {
  146. kPINT_PatternMatchAlways = 0U, /*!< Always Contributes to product term match */
  147. kPINT_PatternMatchStickyRise = 1U, /*!< Sticky Rising edge */
  148. kPINT_PatternMatchStickyFall = 2U, /*!< Sticky Falling edge */
  149. kPINT_PatternMatchStickyBothEdges = 3U, /*!< Sticky Rising or Falling edge */
  150. kPINT_PatternMatchHigh = 4U, /*!< High level */
  151. kPINT_PatternMatchLow = 5U, /*!< Low level */
  152. kPINT_PatternMatchNever = 6U, /*!< Never contributes to product term match */
  153. kPINT_PatternMatchBothEdges = 7U, /*!< Either rising or falling edge */
  154. } pint_pmatch_bslice_cfg_t;
  155. /*! @brief PINT Callback function. */
  156. typedef void (*pint_cb_t)(pint_pin_int_t pintr, uint32_t pmatch_status);
  157. typedef struct _pint_pmatch_cfg
  158. {
  159. pint_pmatch_input_src_t bs_src;
  160. pint_pmatch_bslice_cfg_t bs_cfg;
  161. bool end_point;
  162. pint_cb_t callback;
  163. } pint_pmatch_cfg_t;
  164. /*******************************************************************************
  165. * API
  166. ******************************************************************************/
  167. #if defined(__cplusplus)
  168. extern "C" {
  169. #endif
  170. /*!
  171. * @brief Initialize PINT peripheral.
  172. * This function initializes the PINT peripheral and enables the clock.
  173. *
  174. * @param base Base address of the PINT peripheral.
  175. *
  176. * @retval None.
  177. */
  178. void PINT_Init(PINT_Type *base);
  179. /*!
  180. * @brief Configure PINT peripheral pin interrupt.
  181. * This function configures a given pin interrupt.
  182. *
  183. * @param base Base address of the PINT peripheral.
  184. * @param intr Pin interrupt.
  185. * @param enable Selects detection logic.
  186. * @param callback Callback.
  187. *
  188. * @retval None.
  189. */
  190. void PINT_PinInterruptConfig(PINT_Type *base, pint_pin_int_t intr, pint_pin_enable_t enable, pint_cb_t callback);
  191. /*!
  192. * @brief Get PINT peripheral pin interrupt configuration.
  193. * This function returns the configuration of a given pin interrupt.
  194. *
  195. * @param base Base address of the PINT peripheral.
  196. * @param pintr Pin interrupt.
  197. * @param enable Pointer to store the detection logic.
  198. * @param callback Callback.
  199. *
  200. * @retval None.
  201. */
  202. void PINT_PinInterruptGetConfig(PINT_Type *base, pint_pin_int_t pintr, pint_pin_enable_t *enable, pint_cb_t *callback);
  203. /*!
  204. * @brief Clear Selected pin interrupt status.
  205. * This function clears the selected pin interrupt status.
  206. *
  207. * @param base Base address of the PINT peripheral.
  208. * @param pintr Pin interrupt.
  209. *
  210. * @retval None.
  211. */
  212. static inline void PINT_PinInterruptClrStatus(PINT_Type *base, pint_pin_int_t pintr)
  213. {
  214. base->IST = (1U << pintr);
  215. }
  216. /*!
  217. * @brief Get Selected pin interrupt status.
  218. * This function returns the selected pin interrupt status.
  219. *
  220. * @param base Base address of the PINT peripheral.
  221. * @param pintr Pin interrupt.
  222. *
  223. * @retval status = 0 No pin interrupt request. = 1 Selected Pin interrupt request active.
  224. */
  225. static inline uint32_t PINT_PinInterruptGetStatus(PINT_Type *base, pint_pin_int_t pintr)
  226. {
  227. return ((base->IST & (1U << pintr)) ? 1U : 0U);
  228. }
  229. /*!
  230. * @brief Clear all pin interrupts status.
  231. * This function clears the status of all pin interrupts.
  232. *
  233. * @param base Base address of the PINT peripheral.
  234. *
  235. * @retval None.
  236. */
  237. static inline void PINT_PinInterruptClrStatusAll(PINT_Type *base)
  238. {
  239. base->IST = PINT_IST_PSTAT_MASK;
  240. }
  241. /*!
  242. * @brief Get all pin interrupts status.
  243. * This function returns the status of all pin interrupts.
  244. *
  245. * @param base Base address of the PINT peripheral.
  246. *
  247. * @retval status Each bit position indicates the status of corresponding pin interrupt.
  248. * = 0 No pin interrupt request. = 1 Pin interrupt request active.
  249. */
  250. static inline uint32_t PINT_PinInterruptGetStatusAll(PINT_Type *base)
  251. {
  252. return (base->IST);
  253. }
  254. /*!
  255. * @brief Clear Selected pin interrupt fall flag.
  256. * This function clears the selected pin interrupt fall flag.
  257. *
  258. * @param base Base address of the PINT peripheral.
  259. * @param pintr Pin interrupt.
  260. *
  261. * @retval None.
  262. */
  263. static inline void PINT_PinInterruptClrFallFlag(PINT_Type *base, pint_pin_int_t pintr)
  264. {
  265. base->FALL = (1U << pintr);
  266. }
  267. /*!
  268. * @brief Get selected pin interrupt fall flag.
  269. * This function returns the selected pin interrupt fall flag.
  270. *
  271. * @param base Base address of the PINT peripheral.
  272. * @param pintr Pin interrupt.
  273. *
  274. * @retval flag = 0 Falling edge has not been detected. = 1 Falling edge has been detected.
  275. */
  276. static inline uint32_t PINT_PinInterruptGetFallFlag(PINT_Type *base, pint_pin_int_t pintr)
  277. {
  278. return ((base->FALL & (1U << pintr)) ? 1U : 0U);
  279. }
  280. /*!
  281. * @brief Clear all pin interrupt fall flags.
  282. * This function clears the fall flag for all pin interrupts.
  283. *
  284. * @param base Base address of the PINT peripheral.
  285. *
  286. * @retval None.
  287. */
  288. static inline void PINT_PinInterruptClrFallFlagAll(PINT_Type *base)
  289. {
  290. base->FALL = PINT_FALL_FDET_MASK;
  291. }
  292. /*!
  293. * @brief Get all pin interrupt fall flags.
  294. * This function returns the fall flag of all pin interrupts.
  295. *
  296. * @param base Base address of the PINT peripheral.
  297. *
  298. * @retval flags Each bit position indicates the falling edge detection of the corresponding pin interrupt.
  299. * 0 Falling edge has not been detected. = 1 Falling edge has been detected.
  300. */
  301. static inline uint32_t PINT_PinInterruptGetFallFlagAll(PINT_Type *base)
  302. {
  303. return (base->FALL);
  304. }
  305. /*!
  306. * @brief Clear Selected pin interrupt rise flag.
  307. * This function clears the selected pin interrupt rise flag.
  308. *
  309. * @param base Base address of the PINT peripheral.
  310. * @param pintr Pin interrupt.
  311. *
  312. * @retval None.
  313. */
  314. static inline void PINT_PinInterruptClrRiseFlag(PINT_Type *base, pint_pin_int_t pintr)
  315. {
  316. base->RISE = (1U << pintr);
  317. }
  318. /*!
  319. * @brief Get selected pin interrupt rise flag.
  320. * This function returns the selected pin interrupt rise flag.
  321. *
  322. * @param base Base address of the PINT peripheral.
  323. * @param pintr Pin interrupt.
  324. *
  325. * @retval flag = 0 Rising edge has not been detected. = 1 Rising edge has been detected.
  326. */
  327. static inline uint32_t PINT_PinInterruptGetRiseFlag(PINT_Type *base, pint_pin_int_t pintr)
  328. {
  329. return ((base->RISE & (1U << pintr)) ? 1U : 0U);
  330. }
  331. /*!
  332. * @brief Clear all pin interrupt rise flags.
  333. * This function clears the rise flag for all pin interrupts.
  334. *
  335. * @param base Base address of the PINT peripheral.
  336. *
  337. * @retval None.
  338. */
  339. static inline void PINT_PinInterruptClrRiseFlagAll(PINT_Type *base)
  340. {
  341. base->RISE = PINT_RISE_RDET_MASK;
  342. }
  343. /*!
  344. * @brief Get all pin interrupt rise flags.
  345. * This function returns the rise flag of all pin interrupts.
  346. *
  347. * @param base Base address of the PINT peripheral.
  348. *
  349. * @retval flags Each bit position indicates the rising edge detection of the corresponding pin interrupt.
  350. * 0 Rising edge has not been detected. = 1 Rising edge has been detected.
  351. */
  352. static inline uint32_t PINT_PinInterruptGetRiseFlagAll(PINT_Type *base)
  353. {
  354. return (base->RISE);
  355. }
  356. /*!
  357. * @brief Configure PINT pattern match.
  358. * This function configures a given pattern match bit slice.
  359. *
  360. * @param base Base address of the PINT peripheral.
  361. * @param bslice Pattern match bit slice number.
  362. * @param cfg Pointer to bit slice configuration.
  363. *
  364. * @retval None.
  365. */
  366. void PINT_PatternMatchConfig(PINT_Type *base, pint_pmatch_bslice_t bslice, pint_pmatch_cfg_t *cfg);
  367. /*!
  368. * @brief Get PINT pattern match configuration.
  369. * This function returns the configuration of a given pattern match bit slice.
  370. *
  371. * @param base Base address of the PINT peripheral.
  372. * @param bslice Pattern match bit slice number.
  373. * @param cfg Pointer to bit slice configuration.
  374. *
  375. * @retval None.
  376. */
  377. void PINT_PatternMatchGetConfig(PINT_Type *base, pint_pmatch_bslice_t bslice, pint_pmatch_cfg_t *cfg);
  378. /*!
  379. * @brief Get pattern match bit slice status.
  380. * This function returns the status of selected bit slice.
  381. *
  382. * @param base Base address of the PINT peripheral.
  383. * @param bslice Pattern match bit slice number.
  384. *
  385. * @retval status = 0 Match has not been detected. = 1 Match has been detected.
  386. */
  387. static inline uint32_t PINT_PatternMatchGetStatus(PINT_Type *base, pint_pmatch_bslice_t bslice)
  388. {
  389. return ((base->PMCTRL >> PINT_PMCTRL_PMAT_SHIFT) & (0x1U << bslice)) >> bslice;
  390. }
  391. /*!
  392. * @brief Get status of all pattern match bit slices.
  393. * This function returns the status of all bit slices.
  394. *
  395. * @param base Base address of the PINT peripheral.
  396. *
  397. * @retval status Each bit position indicates the match status of corresponding bit slice.
  398. * = 0 Match has not been detected. = 1 Match has been detected.
  399. */
  400. static inline uint32_t PINT_PatternMatchGetStatusAll(PINT_Type *base)
  401. {
  402. return base->PMCTRL >> PINT_PMCTRL_PMAT_SHIFT;
  403. }
  404. /*!
  405. * @brief Reset pattern match detection logic.
  406. * This function resets the pattern match detection logic if any of the product term is matching.
  407. *
  408. * @param base Base address of the PINT peripheral.
  409. *
  410. * @retval pmstatus Each bit position indicates the match status of corresponding bit slice.
  411. * = 0 Match was detected. = 1 Match was not detected.
  412. */
  413. uint32_t PINT_PatternMatchResetDetectLogic(PINT_Type *base);
  414. /*!
  415. * @brief Enable pattern match function.
  416. * This function enables the pattern match function.
  417. *
  418. * @param base Base address of the PINT peripheral.
  419. *
  420. * @retval None.
  421. */
  422. static inline void PINT_PatternMatchEnable(PINT_Type *base)
  423. {
  424. base->PMCTRL = (base->PMCTRL & PINT_PMCTRL_ENA_RXEV_MASK) | PINT_PMCTRL_SEL_PMATCH_MASK;
  425. }
  426. /*!
  427. * @brief Disable pattern match function.
  428. * This function disables the pattern match function.
  429. *
  430. * @param base Base address of the PINT peripheral.
  431. *
  432. * @retval None.
  433. */
  434. static inline void PINT_PatternMatchDisable(PINT_Type *base)
  435. {
  436. base->PMCTRL = (base->PMCTRL & PINT_PMCTRL_ENA_RXEV_MASK) & ~PINT_PMCTRL_SEL_PMATCH_MASK;
  437. }
  438. /*!
  439. * @brief Enable RXEV output.
  440. * This function enables the pattern match RXEV output.
  441. *
  442. * @param base Base address of the PINT peripheral.
  443. *
  444. * @retval None.
  445. */
  446. static inline void PINT_PatternMatchEnableRXEV(PINT_Type *base)
  447. {
  448. base->PMCTRL = (base->PMCTRL & PINT_PMCTRL_SEL_PMATCH_MASK) | PINT_PMCTRL_ENA_RXEV_MASK;
  449. }
  450. /*!
  451. * @brief Disable RXEV output.
  452. * This function disables the pattern match RXEV output.
  453. *
  454. * @param base Base address of the PINT peripheral.
  455. *
  456. * @retval None.
  457. */
  458. static inline void PINT_PatternMatchDisableRXEV(PINT_Type *base)
  459. {
  460. base->PMCTRL = (base->PMCTRL & PINT_PMCTRL_SEL_PMATCH_MASK) & ~PINT_PMCTRL_ENA_RXEV_MASK;
  461. }
  462. /*!
  463. * @brief Enable callback.
  464. * This function enables the interrupt for the selected PINT peripheral. Although the pin(s) are monitored
  465. * as soon as they are enabled, the callback function is not enabled until this function is called.
  466. *
  467. * @param base Base address of the PINT peripheral.
  468. *
  469. * @retval None.
  470. */
  471. void PINT_EnableCallback(PINT_Type *base);
  472. /*!
  473. * @brief Disable callback.
  474. * This function disables the interrupt for the selected PINT peripheral. Although the pins are still
  475. * being monitored but the callback function is not called.
  476. *
  477. * @param base Base address of the peripheral.
  478. *
  479. * @retval None.
  480. */
  481. void PINT_DisableCallback(PINT_Type *base);
  482. /*!
  483. * @brief Deinitialize PINT peripheral.
  484. * This function disables the PINT clock.
  485. *
  486. * @param base Base address of the PINT peripheral.
  487. *
  488. * @retval None.
  489. */
  490. void PINT_Deinit(PINT_Type *base);
  491. #ifdef __cplusplus
  492. }
  493. #endif
  494. /*@}*/
  495. #endif /* _FSL_PINT_H_ */