MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Irq

Overview

Modules

 IRQ: external interrupt (IRQ) module
 

Files

file  fsl_irq.h
 

Data Structures

struct  irq_config_t
 The IRQ pin configuration structure. More...
 

Enumerations

enum  irq_edge_t {
  kIRQ_FallingEdgeorLowlevel = 0U,
  kIRQ_RisingEdgeorHighlevel = 1U
}
 Interrupt Request (IRQ) Edge Select. More...
 
enum  irq_mode_t {
  kIRQ_DetectOnEdgesOnly = 0U,
  kIRQ_DetectOnEdgesAndEdges = 1U
}
 Interrupt Request (IRQ) Detection Mode. More...
 

Driver version

#define FSL_IRQ_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 Version 2.0.2. More...
 

IRQ Configuration

uint32_t IRQ_GetInstance (IRQ_Type *base)
 Get irq instance. More...
 
void IRQ_Init (IRQ_Type *base, const irq_config_t *config)
 Initializes the IRQ pin used by the board. More...
 
void IRQ_Deinit (IRQ_Type *base)
 Deinitialize IRQ peripheral. More...
 
static void IRQ_Enable (IRQ_Type *base, bool enable)
 Enable/disable IRQ pin. More...
 

IRQ interrupt Operations

static void IRQ_EnableInterrupt (IRQ_Type *base, bool enable)
 Enable/disable IRQ pin interrupt. More...
 
static void IRQ_ClearIRQFlag (IRQ_Type *base)
 Clear IRQF flag. More...
 
static uint32_t IRQ_GetIRQFlag (IRQ_Type *base)
 Get IRQF flag. More...
 

Data Structure Documentation

struct irq_config_t

Data Fields

bool enablePullDevice
 Enable/disable the internal pullup device when the IRQ pin is enabled.
 
irq_edge_t edgeSelect
 Select the polarity of edges or levels on the IRQ pin that cause IRQF to be set.
 
irq_mode_t detectMode
 select either edge-only detection or edge-and-level detection
 

Macro Definition Documentation

#define FSL_IRQ_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))

Enumeration Type Documentation

enum irq_edge_t
Enumerator
kIRQ_FallingEdgeorLowlevel 

IRQ is falling-edge or falling-edge/low-level sensitive.

kIRQ_RisingEdgeorHighlevel 

IRQ is rising-edge or rising-edge/high-level sensitive.

enum irq_mode_t
Enumerator
kIRQ_DetectOnEdgesOnly 

IRQ event is detected only on falling/rising edges.

kIRQ_DetectOnEdgesAndEdges 

IRQ event is detected on falling/rising edges and low/high levels.

Function Documentation

uint32_t IRQ_GetInstance ( IRQ_Type *  base)
Parameters
baseIRQ peripheral base pointer
Return values
Irqinstance number.
void IRQ_Init ( IRQ_Type *  base,
const irq_config_t config 
)

To initialize the IRQ pin, define a irq configuration, specify whhether enable pull-up, the edge and detect mode. Then, call the IRQ_Init() function.

This is an example to initialize irq configuration.

Parameters
baseIRQ peripheral base pointer
configIRQ configuration pointer
void IRQ_Deinit ( IRQ_Type *  base)

This function disables the IRQ clock.

Parameters
baseIRQ peripheral base pointer.
Return values
None.
static void IRQ_Enable ( IRQ_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseIRQ peripheral base pointer.
enabletrue to enable IRQ pin, else disable IRQ pin.
Return values
None.
static void IRQ_EnableInterrupt ( IRQ_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseIRQ peripheral base pointer.
enabletrue to enable IRQF assert interrupt request, else disable.
Return values
None.
static void IRQ_ClearIRQFlag ( IRQ_Type *  base)
inlinestatic

This function clears the IRQF flag.

Parameters
baseIRQ peripheral base pointer.
Return values
None.
static uint32_t IRQ_GetIRQFlag ( IRQ_Type *  base)
inlinestatic

This function returns the IRQF flag.

Parameters
baseIRQ peripheral base pointer.
Return values
status= 0 IRQF flag deasserted. = 1 IRQF flag asserted.