12#ifndef ZEPHYR_INCLUDE_DRIVERS_GPIO_GPIO_EMUL_H_
13#define ZEPHYR_INCLUDE_DRIVERS_GPIO_GPIO_EMUL_H_
104 ret = (values &
BIT(pin)) ? 1 : 0;
Public APIs for GPIO drivers.
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.
Definition gpio_emul.h:69
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.
static int gpio_emul_output_get(const struct device *port, gpio_pin_t pin)
Read the value of one emulated GPIO output pin.
Definition gpio_emul.h:97
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.
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.
uint8_t gpio_pin_t
Provides a type to hold a GPIO pin index.
Definition gpio.h:255
uint32_t gpio_flags_t
Provides a type to hold GPIO configuration flags.
Definition gpio.h:275
uint32_t gpio_port_pins_t
Identifies a set of pins associated with a port.
Definition gpio.h:234
uint32_t gpio_port_value_t
Provides values for a set of pins associated with a port.
Definition gpio.h:247
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
flags
Definition parser.h:96
Runtime device structure (in ROM) per driver instance.
Definition device.h:412