MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a driver for the Pin Interrupt and Pattern match (PINT).
It can configure one or more pins to generate a pin interrupt when the pin or pattern match conditions are met. The pins do not have to be configured as gpio pins however they must be connected to PINT via INPUTMUX. Only the pin interrupt or pattern match function can be active for interrupt generation. If the pin interrupt function is enabled then the pattern match function can be used for wakeup via RXEV.
PINT_PinInterruptConfig() function configures the pins for pin interrupt.
PINT_PatternMatchConfig() function configures the pins for pattern match.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/pint
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/pint
Files | |
file | fsl_pint.h |
Typedefs | |
typedef void(* | pint_cb_t )(pint_pin_int_t pintr, uint32_t pmatch_status) |
PINT Callback function. More... | |
Functions | |
void | PINT_Init (PINT_Type *base) |
Initialize PINT peripheral. More... | |
void | PINT_PinInterruptConfig (PINT_Type *base, pint_pin_int_t intr, pint_pin_enable_t enable, pint_cb_t callback) |
Configure PINT peripheral pin interrupt. More... | |
void | PINT_PinInterruptGetConfig (PINT_Type *base, pint_pin_int_t pintr, pint_pin_enable_t *enable, pint_cb_t *callback) |
Get PINT peripheral pin interrupt configuration. More... | |
void | PINT_PinInterruptClrStatus (PINT_Type *base, pint_pin_int_t pintr) |
Clear Selected pin interrupt status only when the pin was triggered by edge-sensitive. More... | |
static uint32_t | PINT_PinInterruptGetStatus (PINT_Type *base, pint_pin_int_t pintr) |
Get Selected pin interrupt status. More... | |
void | PINT_PinInterruptClrStatusAll (PINT_Type *base) |
Clear all pin interrupts status only when pins were triggered by edge-sensitive. More... | |
static uint32_t | PINT_PinInterruptGetStatusAll (PINT_Type *base) |
Get all pin interrupts status. More... | |
static void | PINT_PinInterruptClrFallFlag (PINT_Type *base, pint_pin_int_t pintr) |
Clear Selected pin interrupt fall flag. More... | |
static uint32_t | PINT_PinInterruptGetFallFlag (PINT_Type *base, pint_pin_int_t pintr) |
Get selected pin interrupt fall flag. More... | |
static void | PINT_PinInterruptClrFallFlagAll (PINT_Type *base) |
Clear all pin interrupt fall flags. More... | |
static uint32_t | PINT_PinInterruptGetFallFlagAll (PINT_Type *base) |
Get all pin interrupt fall flags. More... | |
static void | PINT_PinInterruptClrRiseFlag (PINT_Type *base, pint_pin_int_t pintr) |
Clear Selected pin interrupt rise flag. More... | |
static uint32_t | PINT_PinInterruptGetRiseFlag (PINT_Type *base, pint_pin_int_t pintr) |
Get selected pin interrupt rise flag. More... | |
static void | PINT_PinInterruptClrRiseFlagAll (PINT_Type *base) |
Clear all pin interrupt rise flags. More... | |
static uint32_t | PINT_PinInterruptGetRiseFlagAll (PINT_Type *base) |
Get all pin interrupt rise flags. More... | |
void | PINT_PatternMatchConfig (PINT_Type *base, pint_pmatch_bslice_t bslice, pint_pmatch_cfg_t *cfg) |
Configure PINT pattern match. More... | |
void | PINT_PatternMatchGetConfig (PINT_Type *base, pint_pmatch_bslice_t bslice, pint_pmatch_cfg_t *cfg) |
Get PINT pattern match configuration. More... | |
static uint32_t | PINT_PatternMatchGetStatus (PINT_Type *base, pint_pmatch_bslice_t bslice) |
Get pattern match bit slice status. More... | |
static uint32_t | PINT_PatternMatchGetStatusAll (PINT_Type *base) |
Get status of all pattern match bit slices. More... | |
uint32_t | PINT_PatternMatchResetDetectLogic (PINT_Type *base) |
Reset pattern match detection logic. More... | |
static void | PINT_PatternMatchEnable (PINT_Type *base) |
Enable pattern match function. More... | |
static void | PINT_PatternMatchDisable (PINT_Type *base) |
Disable pattern match function. More... | |
static void | PINT_PatternMatchEnableRXEV (PINT_Type *base) |
Enable RXEV output. More... | |
static void | PINT_PatternMatchDisableRXEV (PINT_Type *base) |
Disable RXEV output. More... | |
void | PINT_EnableCallback (PINT_Type *base) |
Enable callback. More... | |
void | PINT_DisableCallback (PINT_Type *base) |
Disable callback. More... | |
void | PINT_Deinit (PINT_Type *base) |
Deinitialize PINT peripheral. More... | |
void | PINT_EnableCallbackByIndex (PINT_Type *base, pint_pin_int_t pintIdx) |
enable callback by pin index. More... | |
void | PINT_DisableCallbackByIndex (PINT_Type *base, pint_pin_int_t pintIdx) |
disable callback by pin index. More... | |
Driver version | |
#define | FSL_PINT_DRIVER_VERSION (MAKE_VERSION(2, 1, 3)) |
Version 2.1.3. | |
typedef void(* pint_cb_t)(pint_pin_int_t pintr, uint32_t pmatch_status) |
enum pint_pin_enable_t |
enum pint_pin_int_t |
enum pint_pmatch_bslice_t |
void PINT_Init | ( | PINT_Type * | base | ) |
This function initializes the PINT peripheral and enables the clock.
base | Base address of the PINT peripheral. |
None. |
void PINT_PinInterruptConfig | ( | PINT_Type * | base, |
pint_pin_int_t | intr, | ||
pint_pin_enable_t | enable, | ||
pint_cb_t | callback | ||
) |
This function configures a given pin interrupt.
base | Base address of the PINT peripheral. |
intr | Pin interrupt. |
enable | Selects detection logic. |
callback | Callback. |
None. |
void PINT_PinInterruptGetConfig | ( | PINT_Type * | base, |
pint_pin_int_t | pintr, | ||
pint_pin_enable_t * | enable, | ||
pint_cb_t * | callback | ||
) |
This function returns the configuration of a given pin interrupt.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
enable | Pointer to store the detection logic. |
callback | Callback. |
None. |
void PINT_PinInterruptClrStatus | ( | PINT_Type * | base, |
pint_pin_int_t | pintr | ||
) |
This function clears the selected pin interrupt status.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
None. |
|
inlinestatic |
This function returns the selected pin interrupt status.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
status | = 0 No pin interrupt request. = 1 Selected Pin interrupt request active. |
void PINT_PinInterruptClrStatusAll | ( | PINT_Type * | base | ) |
This function clears the status of all pin interrupts.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function returns the status of all pin interrupts.
base | Base address of the PINT peripheral. |
status | Each bit position indicates the status of corresponding pin interrupt. = 0 No pin interrupt request. = 1 Pin interrupt request active. |
|
inlinestatic |
This function clears the selected pin interrupt fall flag.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
None. |
|
inlinestatic |
This function returns the selected pin interrupt fall flag.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
flag | = 0 Falling edge has not been detected. = 1 Falling edge has been detected. |
|
inlinestatic |
This function clears the fall flag for all pin interrupts.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function returns the fall flag of all pin interrupts.
base | Base address of the PINT peripheral. |
flags | Each bit position indicates the falling edge detection of the corresponding pin interrupt. 0 Falling edge has not been detected. = 1 Falling edge has been detected. |
|
inlinestatic |
This function clears the selected pin interrupt rise flag.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
None. |
|
inlinestatic |
This function returns the selected pin interrupt rise flag.
base | Base address of the PINT peripheral. |
pintr | Pin interrupt. |
flag | = 0 Rising edge has not been detected. = 1 Rising edge has been detected. |
|
inlinestatic |
This function clears the rise flag for all pin interrupts.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function returns the rise flag of all pin interrupts.
base | Base address of the PINT peripheral. |
flags | Each bit position indicates the rising edge detection of the corresponding pin interrupt. 0 Rising edge has not been detected. = 1 Rising edge has been detected. |
void PINT_PatternMatchConfig | ( | PINT_Type * | base, |
pint_pmatch_bslice_t | bslice, | ||
pint_pmatch_cfg_t * | cfg | ||
) |
This function configures a given pattern match bit slice.
base | Base address of the PINT peripheral. |
bslice | Pattern match bit slice number. |
cfg | Pointer to bit slice configuration. |
None. |
void PINT_PatternMatchGetConfig | ( | PINT_Type * | base, |
pint_pmatch_bslice_t | bslice, | ||
pint_pmatch_cfg_t * | cfg | ||
) |
This function returns the configuration of a given pattern match bit slice.
base | Base address of the PINT peripheral. |
bslice | Pattern match bit slice number. |
cfg | Pointer to bit slice configuration. |
None. |
|
inlinestatic |
This function returns the status of selected bit slice.
base | Base address of the PINT peripheral. |
bslice | Pattern match bit slice number. |
status | = 0 Match has not been detected. = 1 Match has been detected. |
|
inlinestatic |
This function returns the status of all bit slices.
base | Base address of the PINT peripheral. |
status | Each bit position indicates the match status of corresponding bit slice. = 0 Match has not been detected. = 1 Match has been detected. |
uint32_t PINT_PatternMatchResetDetectLogic | ( | PINT_Type * | base | ) |
This function resets the pattern match detection logic if any of the product term is matching.
base | Base address of the PINT peripheral. |
pmstatus | Each bit position indicates the match status of corresponding bit slice. = 0 Match was detected. = 1 Match was not detected. |
|
inlinestatic |
This function enables the pattern match function.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function disables the pattern match function.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function enables the pattern match RXEV output.
base | Base address of the PINT peripheral. |
None. |
|
inlinestatic |
This function disables the pattern match RXEV output.
base | Base address of the PINT peripheral. |
None. |
void PINT_EnableCallback | ( | PINT_Type * | base | ) |
This function enables the interrupt for the selected PINT peripheral. Although the pin(s) are monitored as soon as they are enabled, the callback function is not enabled until this function is called.
base | Base address of the PINT peripheral. |
None. |
void PINT_DisableCallback | ( | PINT_Type * | base | ) |
This function disables the interrupt for the selected PINT peripheral. Although the pins are still being monitored but the callback function is not called.
base | Base address of the peripheral. |
None. |
void PINT_Deinit | ( | PINT_Type * | base | ) |
This function disables the PINT clock.
base | Base address of the PINT peripheral. |
None. |
void PINT_EnableCallbackByIndex | ( | PINT_Type * | base, |
pint_pin_int_t | pintIdx | ||
) |
This function enables callback by pin index instead of enabling all pins.
base | Base address of the peripheral. |
pinIdx | pin index. |
None. |
void PINT_DisableCallbackByIndex | ( | PINT_Type * | base, |
pint_pin_int_t | pintIdx | ||
) |
This function disables callback by pin index instead of disabling all pins.
base | Base address of the peripheral. |
pinIdx | pin index. |
None. |