|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | gpio_driver_api |
| Driver Operations GPIO driver operations More... | |
Typedefs | |
| typedef int(* | gpio_api_pin_configure_t) (const struct device *port, gpio_pin_t pin, gpio_flags_t flags) |
| Callback API to configure a single pin. | |
| typedef int(* | gpio_api_pin_get_config_t) (const struct device *port, gpio_pin_t pin, gpio_flags_t *flags) |
| Callback API to get the configuration of a single pin. | |
| typedef int(* | gpio_api_port_get_raw_t) (const struct device *port, gpio_port_value_t *value) |
| Callback API to get the physical level of all input pins in a port. | |
| typedef int(* | gpio_api_port_set_masked_raw_t) (const struct device *port, gpio_port_pins_t mask, gpio_port_value_t value) |
| Callback API to set the physical level of selected output pins in a port. | |
| typedef int(* | gpio_api_port_set_bits_raw_t) (const struct device *port, gpio_port_pins_t pins) |
| Callback API to set the physical level of selected output pins to high. | |
| typedef int(* | gpio_api_port_clear_bits_raw_t) (const struct device *port, gpio_port_pins_t pins) |
| Callback API to set the physical level of selected output pins to low. | |
| typedef int(* | gpio_api_port_toggle_bits_t) (const struct device *port, gpio_port_pins_t pins) |
| Callback API to toggle the level of selected output pins. | |
| typedef int(* | gpio_api_pin_interrupt_configure_t) (const struct device *port, gpio_pin_t pin, enum gpio_int_mode mode, enum gpio_int_trig trig) |
| Callback API to configure a pin interrupt. | |
| typedef int(* | gpio_api_manage_callback_t) (const struct device *port, struct gpio_callback *cb, bool set) |
| Callback API to add or remove an application callback. | |
| typedef uint32_t(* | gpio_api_get_pending_int_t) (const struct device *dev) |
| Callback API to get pending interrupts. | |
| typedef int(* | gpio_api_port_get_direction_t) (const struct device *port, gpio_port_pins_t map, gpio_port_pins_t *inputs, gpio_port_pins_t *outputs) |
| Callback API to get the direction of selected pins in a port. | |
Enumerations | |
| enum | gpio_int_mode { GPIO_INT_MODE_DISABLED = BIT(21) , GPIO_INT_MODE_LEVEL = GPIO_INT_ENABLE , GPIO_INT_MODE_EDGE = GPIO_INT_ENABLE | GPIO_INT_EDGE , GPIO_INT_MODE_DISABLE_ONLY = BIT(21) | GPIO_INT_ENABLE_DISABLE_ONLY , GPIO_INT_MODE_ENABLE_ONLY = GPIO_INT_ENABLE | GPIO_INT_ENABLE_DISABLE_ONLY } |
| Interrupt modes for the pin_interrupt_configure driver operation. More... | |
| enum | gpio_int_trig { GPIO_INT_TRIG_LOW = GPIO_INT_LOW_0 , GPIO_INT_TRIG_HIGH = GPIO_INT_HIGH_1 , GPIO_INT_TRIG_BOTH = GPIO_INT_LOW_0 | GPIO_INT_HIGH_1 , GPIO_INT_TRIG_WAKE = GPIO_INT_WAKEUP , GPIO_INT_TRIG_WAKE_LOW = GPIO_INT_LOW_0 | GPIO_INT_WAKEUP , GPIO_INT_TRIG_WAKE_HIGH = GPIO_INT_HIGH_1 | GPIO_INT_WAKEUP , GPIO_INT_TRIG_WAKE_BOTH = GPIO_INT_LOW_0 | GPIO_INT_HIGH_1 | GPIO_INT_WAKEUP } |
| Interrupt triggers for the pin_interrupt_configure driver operation. More... | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a GPIO driver.
#include <zephyr/drivers/gpio.h>
Callback API to get pending interrupts.
See gpio_get_pending_int() for argument description.
| typedef int(* gpio_api_manage_callback_t) (const struct device *port, struct gpio_callback *cb, bool set) |
#include <zephyr/drivers/gpio.h>
Callback API to add or remove an application callback.
See gpio_add_callback() and gpio_remove_callback() for argument description.
| typedef int(* gpio_api_pin_configure_t) (const struct device *port, gpio_pin_t pin, gpio_flags_t flags) |
#include <zephyr/drivers/gpio.h>
Callback API to configure a single pin.
See gpio_pin_configure() for argument description.
| typedef int(* gpio_api_pin_get_config_t) (const struct device *port, gpio_pin_t pin, gpio_flags_t *flags) |
#include <zephyr/drivers/gpio.h>
Callback API to get the configuration of a single pin.
See gpio_pin_get_config() for argument description.
| typedef int(* gpio_api_pin_interrupt_configure_t) (const struct device *port, gpio_pin_t pin, enum gpio_int_mode mode, enum gpio_int_trig trig) |
#include <zephyr/drivers/gpio.h>
Callback API to configure a pin interrupt.
See gpio_pin_interrupt_configure() for argument description, noting that the public GPIO_INT_* flags are decomposed into mode and trig before being passed to the driver.
| typedef int(* gpio_api_port_clear_bits_raw_t) (const struct device *port, gpio_port_pins_t pins) |
#include <zephyr/drivers/gpio.h>
Callback API to set the physical level of selected output pins to low.
See gpio_port_clear_bits_raw() for argument description.
| typedef int(* gpio_api_port_get_direction_t) (const struct device *port, gpio_port_pins_t map, gpio_port_pins_t *inputs, gpio_port_pins_t *outputs) |
#include <zephyr/drivers/gpio.h>
Callback API to get the direction of selected pins in a port.
See gpio_port_get_direction() for argument description.
| typedef int(* gpio_api_port_get_raw_t) (const struct device *port, gpio_port_value_t *value) |
#include <zephyr/drivers/gpio.h>
Callback API to get the physical level of all input pins in a port.
See gpio_port_get_raw() for argument description.
| typedef int(* gpio_api_port_set_bits_raw_t) (const struct device *port, gpio_port_pins_t pins) |
#include <zephyr/drivers/gpio.h>
Callback API to set the physical level of selected output pins to high.
See gpio_port_set_bits_raw() for argument description.
| typedef int(* gpio_api_port_set_masked_raw_t) (const struct device *port, gpio_port_pins_t mask, gpio_port_value_t value) |
#include <zephyr/drivers/gpio.h>
Callback API to set the physical level of selected output pins in a port.
See gpio_port_set_masked_raw() for argument description.
| typedef int(* gpio_api_port_toggle_bits_t) (const struct device *port, gpio_port_pins_t pins) |
#include <zephyr/drivers/gpio.h>
Callback API to toggle the level of selected output pins.
See gpio_port_toggle_bits() for argument description.
| enum gpio_int_mode |
#include <zephyr/drivers/gpio.h>
Interrupt modes for the pin_interrupt_configure driver operation.
Used by driver api function pin_interrupt_configure, these are defined in terms of the public flags so we can just mask and pass them through to the driver api.
| enum gpio_int_trig |
#include <zephyr/drivers/gpio.h>
Interrupt triggers for the pin_interrupt_configure driver operation.