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