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