MCUXpresso SDK API Reference Manual  Rev 2.12.1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GPIO: General-Purpose Input/Output Driver

Overview

Modules

 FGPIO Driver
 
 GPIO Driver
 

Data Structures

struct  gpio_pin_config_t
 The GPIO pin configuration structure. More...
 
struct  gpio_version_info_t
 GPIO version information. More...
 

Enumerations

enum  gpio_pin_direction_t {
  kGPIO_DigitalInput = 0U,
  kGPIO_DigitalOutput = 1U
}
 GPIO direction definition. More...
 
enum  gpio_interrupt_config_t {
  kGPIO_InterruptStatusFlagDisabled = 0x0U,
  kGPIO_DMARisingEdge = 0x1U,
  kGPIO_DMAFallingEdge = 0x2U,
  kGPIO_DMAEitherEdge = 0x3U,
  kGPIO_FlagRisingEdge = 0x05U,
  kGPIO_FlagFallingEdge = 0x06U,
  kGPIO_FlagEitherEdge = 0x07U,
  kGPIO_InterruptLogicZero = 0x8U,
  kGPIO_InterruptRisingEdge = 0x9U,
  kGPIO_InterruptFallingEdge = 0xAU,
  kGPIO_InterruptEitherEdge = 0xBU,
  kGPIO_InterruptLogicOne = 0xCU,
  kGPIO_ActiveHighTriggerOutputEnable = 0xDU,
  kGPIO_ActiveLowTriggerOutputEnable = 0xEU
}
 Configures the interrupt generation condition. More...
 
enum  gpio_interrupt_selection_t {
  kGPIO_InterruptOutput0 = 0x0U,
  kGPIO_InterruptOutput1 = 0x1U
}
 Configures the selection of interrupt/DMA request/trigger output. More...
 
enum  gpio_pin_interrupt_control_t {
  kGPIO_PinControlNonSecure = 0x01U,
  kGPIO_InterruptControlNonSecure = 0x02U,
  kGPIO_PinControlNonPrivilege = 0x04U,
  kGPIO_InterruptControlNonPrivilege = 0x08U
}
 GPIO pin and interrupt control. More...
 

Driver version

#define FSL_GPIO_DRIVER_VERSION   (MAKE_VERSION(2, 7, 1))
 GPIO driver version. More...
 

Data Structure Documentation

struct gpio_pin_config_t

Each pin can only be configured as either an output pin or an input pin at a time. If configured as an input pin, leave the outputConfig unused. Note that in some use cases, the corresponding port property should be configured in advance with the PORT_SetPinConfig().

Data Fields

gpio_pin_direction_t pinDirection
 GPIO direction, input or output.
 
uint8_t outputLogic
 Set a default output logic, which has no use in input.
 
struct gpio_version_info_t

Data Fields

uint16_t feature
 Feature Specification Number. More...
 
uint8_t minor
 Minor Version Number. More...
 
uint8_t major
 Major Version Number. More...
 

Field Documentation

uint16_t gpio_version_info_t::feature
uint8_t gpio_version_info_t::minor
uint8_t gpio_version_info_t::major

Macro Definition Documentation

#define FSL_GPIO_DRIVER_VERSION   (MAKE_VERSION(2, 7, 1))

Enumeration Type Documentation

Enumerator
kGPIO_DigitalInput 

Set current pin as digital input.

kGPIO_DigitalOutput 

Set current pin as digital output.

Enumerator
kGPIO_InterruptStatusFlagDisabled 

Interrupt status flag is disabled.

kGPIO_DMARisingEdge 

ISF flag and DMA request on rising edge.

kGPIO_DMAFallingEdge 

ISF flag and DMA request on falling edge.

kGPIO_DMAEitherEdge 

ISF flag and DMA request on either edge.

kGPIO_FlagRisingEdge 

Flag sets on rising edge.

kGPIO_FlagFallingEdge 

Flag sets on falling edge.

kGPIO_FlagEitherEdge 

Flag sets on either edge.

kGPIO_InterruptLogicZero 

Interrupt when logic zero.

kGPIO_InterruptRisingEdge 

Interrupt on rising edge.

kGPIO_InterruptFallingEdge 

Interrupt on falling edge.

kGPIO_InterruptEitherEdge 

Interrupt on either edge.

kGPIO_InterruptLogicOne 

Interrupt when logic one.

kGPIO_ActiveHighTriggerOutputEnable 

Enable active high-trigger output.

kGPIO_ActiveLowTriggerOutputEnable 

Enable active low-trigger output.

Enumerator
kGPIO_InterruptOutput0 

Interrupt/DMA request/trigger output 0.

kGPIO_InterruptOutput1 

Interrupt/DMA request/trigger output 1.

Enumerator
kGPIO_PinControlNonSecure 

Pin Control Non-Secure.

kGPIO_InterruptControlNonSecure 

Interrupt Control Non-Secure.

kGPIO_PinControlNonPrivilege 

Pin Control Non-Privilege.

kGPIO_InterruptControlNonPrivilege 

Interrupt Control Non-Privilege.