Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gpio_driver_api Struct Reference

Driver Operations GPIO driver operations More...

#include <zephyr/drivers/gpio.h>

Data Fields

gpio_api_pin_configure_t pin_configure
  REQ Configure a single pin.
gpio_api_pin_get_config_t pin_get_config
  OPT Get a configuration of a single pin.
gpio_api_port_get_raw_t port_get_raw
  REQ Get physical level of all input pins in a port.
gpio_api_port_set_masked_raw_t port_set_masked_raw
  REQ Set physical level of output pins in a port.
gpio_api_port_set_bits_raw_t port_set_bits_raw
  REQ Set physical level of selected output pins to high.
gpio_api_port_clear_bits_raw_t port_clear_bits_raw
  REQ Set physical level of selected output pins to low.
gpio_api_port_toggle_bits_t port_toggle_bits
  REQ Toggle level of selected output pins.
gpio_api_pin_interrupt_configure_t pin_interrupt_configure
  OPT Configure pin interrupt.
gpio_api_manage_callback_t manage_callback
  OPT Add or remove an application callback.
gpio_api_get_pending_int_t get_pending_int
  OPT Function to get pending interrupts.
gpio_api_port_get_direction_t port_get_direction
  OPT Get direction of select pins in a port.

Detailed Description

Driver Operations GPIO driver operations

This is the driver API structure any GPIO driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ get_pending_int

gpio_api_get_pending_int_t gpio_driver_api::get_pending_int

OPT Function to get pending interrupts.

◆ manage_callback

gpio_api_manage_callback_t gpio_driver_api::manage_callback

OPT Add or remove an application callback.

See gpio_add_callback() and gpio_remove_callback().

◆ pin_configure

gpio_api_pin_configure_t gpio_driver_api::pin_configure

REQ Configure a single pin.

◆ pin_get_config

gpio_api_pin_get_config_t gpio_driver_api::pin_get_config

OPT Get a configuration of a single pin.

Attention
Available only when the following Kconfig option is enabled: CONFIG_GPIO_GET_CONFIG.

◆ pin_interrupt_configure

gpio_api_pin_interrupt_configure_t gpio_driver_api::pin_interrupt_configure

OPT Configure pin interrupt.

◆ port_clear_bits_raw

gpio_api_port_clear_bits_raw_t gpio_driver_api::port_clear_bits_raw

REQ Set physical level of selected output pins to low.

◆ port_get_direction

gpio_api_port_get_direction_t gpio_driver_api::port_get_direction

OPT Get direction of select pins in a port.

Attention
Available only when the following Kconfig option is enabled: CONFIG_GPIO_GET_DIRECTION.

◆ port_get_raw

gpio_api_port_get_raw_t gpio_driver_api::port_get_raw

REQ Get physical level of all input pins in a port.

◆ port_set_bits_raw

gpio_api_port_set_bits_raw_t gpio_driver_api::port_set_bits_raw

REQ Set physical level of selected output pins to high.

◆ port_set_masked_raw

gpio_api_port_set_masked_raw_t gpio_driver_api::port_set_masked_raw

REQ Set physical level of output pins in a port.

◆ port_toggle_bits

gpio_api_port_toggle_bits_t gpio_driver_api::port_toggle_bits

REQ Toggle level of selected output pins.


The documentation for this struct was generated from the following file: