|
DPDK 26.11.0
|
#include <linux/gpio.h>#include <linux/version.h>#include <rte_malloc.h>#include <rte_memcpy.h>#include <rte_rawdev.h>Go to the source code of this file.
Typedefs | |
| typedef void(* | cnxk_gpio_irq_handler_t) (int gpio, void *data) |
| typedef void(* | cnxk_gpio_irq_handler2_t) (struct gpio_v2_line_event *event, void *data) |
Marvell GPIO PMD specific structures and interface
This API allows applications to manage GPIOs in user space along with installing interrupt handlers for low latency signal processing.
Definition in file rte_pmd_cnxk_gpio.h.
| typedef void(* cnxk_gpio_irq_handler_t) (int gpio, void *data) |
GPIO interrupt handler (deprecated)
| gpio | Zero-based GPIO number |
| data | Cookie passed to interrupt handler |
Definition at line 100 of file rte_pmd_cnxk_gpio.h.
| typedef void(* cnxk_gpio_irq_handler2_t) (struct gpio_v2_line_event *event, void *data) |
GPIO interrupt handler
| event | Pointer to gpio event data |
| data | Cookie passed to interrupt handler |
Definition at line 119 of file rte_pmd_cnxk_gpio.h.
| enum cnxk_gpio_msg_type |
Available message types
Definition at line 43 of file rte_pmd_cnxk_gpio.h.
| enum cnxk_gpio_pin_edge |
Available edges
Definition at line 69 of file rte_pmd_cnxk_gpio.h.
| enum cnxk_gpio_pin_dir |
Available directions
| Enumerator | |
|---|---|
| CNXK_GPIO_PIN_DIR_IN | Set direction to input |
| CNXK_GPIO_PIN_DIR_OUT | Set direction to output |
| CNXK_GPIO_PIN_DIR_HIGH | Set direction to output and value to 1 |
Definition at line 81 of file rte_pmd_cnxk_gpio.h.
|
static |
Set output to specific value
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| val | Value output will be set to. 0 represents low state while 1 high state |
Definition at line 185 of file rte_pmd_cnxk_gpio.h.
|
static |
Select signal edge that triggers interrupt
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| edge | Signal edge that triggers interrupt |
Definition at line 209 of file rte_pmd_cnxk_gpio.h.
|
static |
Configure GPIO as input or output
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| dir | Direction of the GPIO |
Definition at line 234 of file rte_pmd_cnxk_gpio.h.
|
static |
Enable or disable inverted logic
If GPIO is configured as output then writing 1 or 0 will result in setting output to respectively low or high
If GPIO is configured as input then logic inversion applies to edges. Both current and future settings are affected
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| val | 0 to disable, 1 to enable inverted logic |
Definition at line 264 of file rte_pmd_cnxk_gpio.h.
|
static |
Read GPIO value
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| val | Where to store read logical signal value i.e 0 or 1 |
Definition at line 288 of file rte_pmd_cnxk_gpio.h.
|
static |
Read GPIO edge
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| edge | Where to store edge |
Definition at line 311 of file rte_pmd_cnxk_gpio.h.
|
static |
Read GPIO direction
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| dir | Where to store direction |
Definition at line 335 of file rte_pmd_cnxk_gpio.h.
|
static |
Read whether GPIO is active low
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| val | Where to store active low state |
Definition at line 358 of file rte_pmd_cnxk_gpio.h.
|
static |
Attach interrupt handler to GPIO (deprecated)
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| cpu | CPU which will be handling interrupt |
| handler | Interrupt handler to be executed |
| data | Data to be passed to interrupt handler |
Definition at line 386 of file rte_pmd_cnxk_gpio.h.
|
static |
Attach interrupt handler to GPIO
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| handler | Interrupt handler to be executed |
| data | Data to be passed to interrupt handler |
Definition at line 418 of file rte_pmd_cnxk_gpio.h.
|
static |
Detach interrupt handler from GPIO
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
Definition at line 444 of file rte_pmd_cnxk_gpio.h.
|
static |
Enable interrupt
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
| edge | Edge that should trigger interrupt |
Definition at line 468 of file rte_pmd_cnxk_gpio.h.
|
static |
Disable interrupt
| dev_id | The identifier of the device |
| gpio | Zero-based GPIO number |
Definition at line 486 of file rte_pmd_cnxk_gpio.h.