| 
    Zephyr Project API
    3.2.0
    
   A Scalable Open Source RTOS 
   | 
 
Emulated GPIO backend API. More...
Functions | |
| int | gpio_emul_input_set_masked (const struct device *port, gpio_port_pins_t pins, gpio_port_value_t values) | 
Modify the values of one or more emulated GPIO input pins.  More... | |
| static int | gpio_emul_input_set (const struct device *port, gpio_pin_t pin, int value) | 
Modify the value of one emulated GPIO input pin.  More... | |
| int | gpio_emul_output_get_masked (const struct device *port, gpio_port_pins_t pins, gpio_port_value_t *values) | 
Read the value of one or more emulated GPIO output pins.  More... | |
| static int | gpio_emul_output_get (const struct device *port, gpio_pin_t pin) | 
Read the value of one emulated GPIO output pin.  More... | |
| int | gpio_emul_flags_get (const struct device *port, gpio_pin_t pin, gpio_flags_t *flags) | 
Get flags for a given emulated GPIO pin.  More... | |
Emulated GPIO backend API.
Behaviour of emulated GPIO is application-defined. As-such, each application may
An example of an appropriate Device Tree overlay file is in tests/drivers/gpio/gpio_basic_api/boards/native_posix_64.overlay.
An example of registering a callback to emulate "wiring" as well as an example of calling gpio_emul_input_set is in the file tests/drivers/gpio/gpio_basic_api/src/main.c .
| int gpio_emul_flags_get | ( | const struct device * | port, | 
| gpio_pin_t | pin, | ||
| gpio_flags_t * | flags | ||
| ) | 
#include <include/zephyr/drivers/gpio/gpio_emul.h>
Get flags for a given emulated GPIO pin. 
For more information on available flags, see GPIO Driver APIs.
| port | The emulated GPIO port | 
| pin | The pin to retrieve flags for  | 
| flags | a pointer to where the flags for pin will be stored | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/gpio/gpio_emul.h>
Modify the value of one emulated GPIO input pin. 
| port | The emulated GPIO port | 
| pin | The pin to modify | 
| value | New values to assign to pin  | 
| int gpio_emul_input_set_masked | ( | const struct device * | port, | 
| gpio_port_pins_t | pins, | ||
| gpio_port_value_t | values | ||
| ) | 
#include <include/zephyr/drivers/gpio/gpio_emul.h>
Modify the values of one or more emulated GPIO input pins. 
| port | The emulated GPIO port | 
| pins | The mask of pins that have changed | 
| values | New values to assign to pins  | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/gpio/gpio_emul.h>
Read the value of one emulated GPIO output pin. 
| port | The emulated GPIO port | 
| pin | The pin to read | 
| int gpio_emul_output_get_masked | ( | const struct device * | port, | 
| gpio_port_pins_t | pins, | ||
| gpio_port_value_t * | values | ||
| ) | 
#include <include/zephyr/drivers/gpio/gpio_emul.h>
Read the value of one or more emulated GPIO output pins. 
| port | The emulated GPIO port | 
| pins | The mask of pins that have changed | 
| values | A pointer to where the value of pins will be stored |