MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
PORT: Port Control and Interrupts

Overview

The MCUXpresso SDK provides a driver for the Port Control and Interrupts (PORT) module of MCUXpresso SDK devices.

Enumerations

enum  port_interrupt_t {
  kPORT_InterruptOrDMADisabled = 0x0U,
  kPORT_DMARisingEdge = 0x1U,
  kPORT_DMAFallingEdge = 0x2U,
  kPORT_DMAEitherEdge = 0x3U,
  kPORT_FlagRisingEdge = 0x05U,
  kPORT_FlagFallingEdge = 0x06U,
  kPORT_FlagEitherEdge = 0x07U,
  kPORT_InterruptLogicZero = 0x8U,
  kPORT_InterruptRisingEdge = 0x9U,
  kPORT_InterruptFallingEdge = 0xAU,
  kPORT_InterruptEitherEdge = 0xBU,
  kPORT_InterruptLogicOne = 0xCU,
  kPORT_ActiveHighTriggerOutputEnable = 0xDU,
  kPORT_ActiveLowTriggerOutputEnable = 0xEU
}
 Configures the interrupt generation condition. More...
 

Driver version

#define FSL_PORT_DRIVER_VERSION   (MAKE_VERSION(2, 5, 0))
 PORT driver version. More...
 

Interrupt

static void PORT_SetPinInterruptConfig (PORT_Type *base, uint32_t pin, port_interrupt_t config)
 Configures the port pin interrupt/DMA request. More...
 
static uint32_t PORT_GetPinsInterruptFlags (PORT_Type *base)
 Reads the whole port status flag. More...
 
static void PORT_ClearPinsInterruptFlags (PORT_Type *base, uint32_t mask)
 Clears the multiple pin interrupt status flag. More...
 

Macro Definition Documentation

#define FSL_PORT_DRIVER_VERSION   (MAKE_VERSION(2, 5, 0))

Enumeration Type Documentation

Enumerator
kPORT_InterruptOrDMADisabled 

Interrupt/DMA request is disabled.

kPORT_DMARisingEdge 

DMA request on rising edge.

kPORT_DMAFallingEdge 

DMA request on falling edge.

kPORT_DMAEitherEdge 

DMA request on either edge.

kPORT_FlagRisingEdge 

Flag sets on rising edge.

kPORT_FlagFallingEdge 

Flag sets on falling edge.

kPORT_FlagEitherEdge 

Flag sets on either edge.

kPORT_InterruptLogicZero 

Interrupt when logic zero.

kPORT_InterruptRisingEdge 

Interrupt on rising edge.

kPORT_InterruptFallingEdge 

Interrupt on falling edge.

kPORT_InterruptEitherEdge 

Interrupt on either edge.

kPORT_InterruptLogicOne 

Interrupt when logic one.

kPORT_ActiveHighTriggerOutputEnable 

Enable active high-trigger output.

kPORT_ActiveLowTriggerOutputEnable 

Enable active low-trigger output.

Function Documentation

static void PORT_SetPinInterruptConfig ( PORT_Type *  base,
uint32_t  pin,
port_interrupt_t  config 
)
inlinestatic
Parameters
basePORT peripheral base pointer.
pinPORT pin number.
configPORT pin interrupt configuration.
static uint32_t PORT_GetPinsInterruptFlags ( PORT_Type *  base)
inlinestatic

If a pin is configured to generate the DMA request, the corresponding flag is cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to that flag. If configured for a level sensitive interrupt that remains asserted, the flag is set again immediately.

Parameters
basePORT peripheral base pointer.
Returns
Current port interrupt status flags, for example, 0x00010001 means the pin 0 and 16 have the interrupt.
static void PORT_ClearPinsInterruptFlags ( PORT_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
basePORT peripheral base pointer.
maskPORT pin number macro.