Classes | Enumerator | Variables
Gpio_driver

Classes

struct  _gpio_pin_config
 GPIO Init structure definition. More...
 

Variables

gpio_pin_direction_t _gpio_pin_config::direction
 
gpio_interrupt_mode_t _gpio_pin_config::interruptMode
 
uint8_t _gpio_pin_config::outputLogic
 

Driver version

enum  _gpio_pin_direction { kGPIO_DigitalInput = 0U, kGPIO_DigitalOutput = 1U }
 GPIO direction definition. More...
 
enum  _gpio_interrupt_mode {
  kGPIO_NoIntmode = 0U, kGPIO_IntLowLevel = 1U, kGPIO_IntHighLevel = 2U, kGPIO_IntRisingEdge = 3U,
  kGPIO_IntFallingEdge = 4U, kGPIO_IntRisingOrFallingEdge = 5U
}
 GPIO interrupt mode definition. More...
 
typedef enum _gpio_pin_direction gpio_pin_direction_t
 GPIO direction definition. More...
 
typedef enum _gpio_interrupt_mode gpio_interrupt_mode_t
 GPIO interrupt mode definition. More...
 
typedef struct _gpio_pin_config gpio_pin_config_t
 GPIO Init structure definition. More...
 
#define FSL_GPIO_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 GPIO driver version 2.0.3. More...
 

GPIO Initialization and Configuration functions

void GPIO_PinInit (GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *Config)
 Initializes the GPIO peripheral according to the specified parameters in the initConfig. More...
 

GPIO Reads and Write Functions

void GPIO_PinWrite (GPIO_Type *base, uint32_t pin, uint8_t output)
 Sets the output level of the individual GPIO pin to logic 1 or 0. More...
 
static void GPIO_WritePinOutput (GPIO_Type *base, uint32_t pin, uint8_t output)
 Sets the output level of the individual GPIO pin to logic 1 or 0. More...
 
static void GPIO_PortSet (GPIO_Type *base, uint32_t mask)
 Sets the output level of the multiple GPIO pins to the logic 1. More...
 
static void GPIO_SetPinsOutput (GPIO_Type *base, uint32_t mask)
 Sets the output level of the multiple GPIO pins to the logic 1. More...
 
static void GPIO_PortClear (GPIO_Type *base, uint32_t mask)
 Sets the output level of the multiple GPIO pins to the logic 0. More...
 
static void GPIO_ClearPinsOutput (GPIO_Type *base, uint32_t mask)
 Sets the output level of the multiple GPIO pins to the logic 0. More...
 
static void GPIO_PortToggle (GPIO_Type *base, uint32_t mask)
 Reverses the current output logic of the multiple GPIO pins. More...
 
static uint32_t GPIO_PinRead (GPIO_Type *base, uint32_t pin)
 Reads the current input value of the GPIO port. More...
 
static uint32_t GPIO_ReadPinInput (GPIO_Type *base, uint32_t pin)
 Reads the current input value of the GPIO port. More...
 

GPIO Reads Pad Status Functions

static uint8_t GPIO_PinReadPadStatus (GPIO_Type *base, uint32_t pin)
 Reads the current GPIO pin pad status. More...
 
static uint8_t GPIO_ReadPadStatus (GPIO_Type *base, uint32_t pin)
 Reads the current GPIO pin pad status. More...
 

Interrupts and flags management functions

void GPIO_PinSetInterruptConfig (GPIO_Type *base, uint32_t pin, gpio_interrupt_mode_t pinInterruptMode)
 Sets the current pin interrupt mode. More...
 
static void GPIO_SetPinInterruptConfig (GPIO_Type *base, uint32_t pin, gpio_interrupt_mode_t pinInterruptMode)
 Sets the current pin interrupt mode. More...
 
static void GPIO_PortEnableInterrupts (GPIO_Type *base, uint32_t mask)
 Enables the specific pin interrupt. More...
 
static void GPIO_EnableInterrupts (GPIO_Type *base, uint32_t mask)
 Enables the specific pin interrupt. More...
 
static void GPIO_PortDisableInterrupts (GPIO_Type *base, uint32_t mask)
 Disables the specific pin interrupt. More...
 
static void GPIO_DisableInterrupts (GPIO_Type *base, uint32_t mask)
 Disables the specific pin interrupt. More...
 
static uint32_t GPIO_PortGetInterruptFlags (GPIO_Type *base)
 Reads individual pin interrupt status. More...
 
static uint32_t GPIO_GetPinsInterruptFlags (GPIO_Type *base)
 Reads individual pin interrupt status. More...
 
static void GPIO_PortClearInterruptFlags (GPIO_Type *base, uint32_t mask)
 Clears pin interrupt flag. Status flags are cleared by writing a 1 to the corresponding bit position. More...
 
static void GPIO_ClearPinsInterruptFlags (GPIO_Type *base, uint32_t mask)
 Clears pin interrupt flag. Status flags are cleared by writing a 1 to the corresponding bit position. More...
 

Detailed Description

Macro Definition Documentation

◆ FSL_GPIO_DRIVER_VERSION

#define FSL_GPIO_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))

GPIO driver version 2.0.3.

Definition at line 26 of file fsl_gpio.h.

Typedef Documentation

◆ gpio_interrupt_mode_t

GPIO interrupt mode definition.

◆ gpio_pin_config_t

GPIO Init structure definition.

◆ gpio_pin_direction_t

GPIO direction definition.

Enumeration Type Documentation

◆ _gpio_interrupt_mode

GPIO interrupt mode definition.

Enumerator
kGPIO_NoIntmode 

Set current pin general IO functionality.

kGPIO_IntLowLevel 

Set current pin interrupt is low-level sensitive.

kGPIO_IntHighLevel 

Set current pin interrupt is high-level sensitive.

kGPIO_IntRisingEdge 

Set current pin interrupt is rising-edge sensitive.

kGPIO_IntFallingEdge 

Set current pin interrupt is falling-edge sensitive.

kGPIO_IntRisingOrFallingEdge 

Enable the edge select bit to override the ICR register's configuration.

Definition at line 37 of file fsl_gpio.h.

◆ _gpio_pin_direction

GPIO direction definition.

Enumerator
kGPIO_DigitalInput 

Set current pin as digital input.

kGPIO_DigitalOutput 

Set current pin as digital output.

Definition at line 30 of file fsl_gpio.h.

Function Documentation

◆ GPIO_ClearPinsInterruptFlags()

static void GPIO_ClearPinsInterruptFlags ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Clears pin interrupt flag. Status flags are cleared by writing a 1 to the corresponding bit position.

Parameters
baseGPIO base pointer.
maskGPIO pin number macro.

Definition at line 328 of file fsl_gpio.h.

◆ GPIO_ClearPinsOutput()

static void GPIO_ClearPinsOutput ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Sets the output level of the multiple GPIO pins to the logic 0.

Deprecated:
Do not use this function. It has been superceded by GPIO_PortClear.

Definition at line 149 of file fsl_gpio.h.

◆ GPIO_DisableInterrupts()

static void GPIO_DisableInterrupts ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Disables the specific pin interrupt.

Deprecated:
Do not use this function. It has been superceded by GPIO_PortDisableInterrupts.

Definition at line 282 of file fsl_gpio.h.

◆ GPIO_EnableInterrupts()

static void GPIO_EnableInterrupts ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Enables the specific pin interrupt.

Parameters
baseGPIO base pointer.
maskGPIO pin number macro.

Definition at line 262 of file fsl_gpio.h.

◆ GPIO_GetPinsInterruptFlags()

static uint32_t GPIO_GetPinsInterruptFlags ( GPIO_Type base)
inlinestatic

Reads individual pin interrupt status.

Parameters
baseGPIO base pointer.
Return values
currentpin interrupt status flag.

Definition at line 304 of file fsl_gpio.h.

◆ GPIO_PinInit()

void GPIO_PinInit ( GPIO_Type base,
uint32_t  pin,
const gpio_pin_config_t Config 
)

Initializes the GPIO peripheral according to the specified parameters in the initConfig.

Parameters
baseGPIO base pointer.
pinSpecifies the pin number
Configpointer to a gpio_pin_config_t structure that contains the configuration information.

brief Initializes the GPIO peripheral according to the specified parameters in the initConfig.

param base GPIO base pointer. param pin Specifies the pin number param initConfig pointer to a ref gpio_pin_config_t structure that contains the configuration information.

Definition at line 71 of file fsl_gpio.c.

◆ GPIO_PinRead()

static uint32_t GPIO_PinRead ( GPIO_Type base,
uint32_t  pin 
)
inlinestatic

Reads the current input value of the GPIO port.

Parameters
baseGPIO base pointer.
pinGPIO port pin number.
Return values
GPIOport input value.

Definition at line 174 of file fsl_gpio.h.

◆ GPIO_PinReadPadStatus()

static uint8_t GPIO_PinReadPadStatus ( GPIO_Type base,
uint32_t  pin 
)
inlinestatic

Reads the current GPIO pin pad status.

Parameters
baseGPIO base pointer.
pinGPIO port pin number.
Return values
GPIOpin pad status value.

Definition at line 203 of file fsl_gpio.h.

◆ GPIO_PinSetInterruptConfig()

void GPIO_PinSetInterruptConfig ( GPIO_Type base,
uint32_t  pin,
gpio_interrupt_mode_t  pinInterruptMode 
)

Sets the current pin interrupt mode.

Parameters
baseGPIO base pointer.
pinGPIO port pin number.
pinInterruptModepointer to a gpio_interrupt_mode_t structure that contains the interrupt mode information.

brief Sets the current pin interrupt mode.

param base GPIO base pointer. param pin GPIO port pin number. param pininterruptMode pointer to a ref gpio_interrupt_mode_t structure that contains the interrupt mode information.

Definition at line 132 of file fsl_gpio.c.

◆ GPIO_PinWrite()

void GPIO_PinWrite ( GPIO_Type base,
uint32_t  pin,
uint8_t  output 
)

Sets the output level of the individual GPIO pin to logic 1 or 0.

Parameters
baseGPIO base pointer.
pinGPIO port pin number.
outputGPIOpin output logic level.
  • 0: corresponding pin output low-logic level.
  • 1: corresponding pin output high-logic level.

brief Sets the output level of the individual GPIO pin to logic 1 or 0.

param base GPIO base pointer. param pin GPIO port pin number. param output GPIOpin output logic level.

  • 0: corresponding pin output low-logic level.
  • 1: corresponding pin output high-logic level.

Definition at line 111 of file fsl_gpio.c.

◆ GPIO_PortClear()

static void GPIO_PortClear ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Sets the output level of the multiple GPIO pins to the logic 0.

Parameters
baseGPIO peripheral base pointer (GPIO1, GPIO2, GPIO3, and so on.)
maskGPIO pin number macro

Definition at line 136 of file fsl_gpio.h.

◆ GPIO_PortClearInterruptFlags()

static void GPIO_PortClearInterruptFlags ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Clears pin interrupt flag. Status flags are cleared by writing a 1 to the corresponding bit position.

Parameters
baseGPIO base pointer.
maskGPIO pin number macro.

Definition at line 316 of file fsl_gpio.h.

◆ GPIO_PortDisableInterrupts()

static void GPIO_PortDisableInterrupts ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Disables the specific pin interrupt.

Parameters
baseGPIO base pointer.
maskGPIO pin number macro.

Definition at line 273 of file fsl_gpio.h.

◆ GPIO_PortEnableInterrupts()

static void GPIO_PortEnableInterrupts ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Enables the specific pin interrupt.

Parameters
baseGPIO base pointer.
maskGPIO pin number macro.

Definition at line 251 of file fsl_gpio.h.

◆ GPIO_PortGetInterruptFlags()

static uint32_t GPIO_PortGetInterruptFlags ( GPIO_Type base)
inlinestatic

Reads individual pin interrupt status.

Parameters
baseGPIO base pointer.
Return values
currentpin interrupt status flag.

Definition at line 293 of file fsl_gpio.h.

◆ GPIO_PortSet()

static void GPIO_PortSet ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Sets the output level of the multiple GPIO pins to the logic 1.

Parameters
baseGPIO peripheral base pointer (GPIO1, GPIO2, GPIO3, and so on.)
maskGPIO pin number macro

Definition at line 112 of file fsl_gpio.h.

◆ GPIO_PortToggle()

static void GPIO_PortToggle ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Reverses the current output logic of the multiple GPIO pins.

Parameters
baseGPIO peripheral base pointer (GPIO1, GPIO2, GPIO3, and so on.)
maskGPIO pin number macro

Definition at line 160 of file fsl_gpio.h.

◆ GPIO_ReadPadStatus()

static uint8_t GPIO_ReadPadStatus ( GPIO_Type base,
uint32_t  pin 
)
inlinestatic

Reads the current GPIO pin pad status.

Deprecated:
Do not use this function. It has been superceded by GPIO_PinReadPadStatus.

Definition at line 214 of file fsl_gpio.h.

◆ GPIO_ReadPinInput()

static uint32_t GPIO_ReadPinInput ( GPIO_Type base,
uint32_t  pin 
)
inlinestatic

Reads the current input value of the GPIO port.

Deprecated:
Do not use this function. It has been superceded by GPIO_PinRead.

Definition at line 185 of file fsl_gpio.h.

◆ GPIO_SetPinInterruptConfig()

static void GPIO_SetPinInterruptConfig ( GPIO_Type base,
uint32_t  pin,
gpio_interrupt_mode_t  pinInterruptMode 
)
inlinestatic

Sets the current pin interrupt mode.

Deprecated:
Do not use this function. It has been superceded by GPIO_PinSetInterruptConfig.

Definition at line 240 of file fsl_gpio.h.

◆ GPIO_SetPinsOutput()

static void GPIO_SetPinsOutput ( GPIO_Type base,
uint32_t  mask 
)
inlinestatic

Sets the output level of the multiple GPIO pins to the logic 1.

Deprecated:
Do not use this function. It has been superceded by GPIO_PortSet.

Definition at line 125 of file fsl_gpio.h.

◆ GPIO_WritePinOutput()

static void GPIO_WritePinOutput ( GPIO_Type base,
uint32_t  pin,
uint8_t  output 
)
inlinestatic

Sets the output level of the individual GPIO pin to logic 1 or 0.

Deprecated:
Do not use this function. It has been superceded by GPIO_PinWrite.

Definition at line 101 of file fsl_gpio.h.

Variable Documentation

◆ direction

gpio_pin_direction_t _gpio_pin_config::direction

Specifies the pin direction.

Definition at line 50 of file fsl_gpio.h.

◆ interruptMode

gpio_interrupt_mode_t _gpio_pin_config::interruptMode

Specifies the pin interrupt mode, a value of gpio_interrupt_mode_t.

Definition at line 53 of file fsl_gpio.h.

◆ outputLogic

uint8_t _gpio_pin_config::outputLogic

Set a default output logic, which has no use in input

Definition at line 51 of file fsl_gpio.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:11