RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Gpio_driver

Data Structures

struct  _gpio_pin_config
 GPIO Init structure definition. More...
 

Variables

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

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.
 
typedef enum _gpio_interrupt_mode gpio_interrupt_mode_t
 GPIO interrupt mode definition.
 
typedef struct _gpio_pin_config gpio_pin_config_t
 GPIO Init structure definition.
 
#define FSL_GPIO_DRIVER_VERSION   (MAKE_VERSION(2, 0, 6))
 GPIO driver version.
 

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.
 

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.
 

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.
 

Detailed Description

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.

◆ _gpio_pin_direction

GPIO direction definition.

Enumerator
kGPIO_DigitalInput 

Set current pin as digital input.

kGPIO_DigitalOutput 

Set current pin as digital output.

Function Documentation

◆ 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.

◆ 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.

◆ 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.

Variable Documentation

◆ direction

gpio_pin_direction_t _gpio_pin_config::direction

Specifies the pin direction.

◆ interruptMode

gpio_interrupt_mode_t _gpio_pin_config::interruptMode

Specifies the pin interrupt mode, a value of gpio_interrupt_mode_t.

◆ outputLogic

uint8_t _gpio_pin_config::outputLogic

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