12#include <l4/vbus/vbus>
13#include <l4/vbus/vbus_gpio.h>
51 int set(
int value)
const
66 int setup(
unsigned mode,
unsigned value)
const
124 unsigned pin()
const {
return _pin; }
150 Pin_slice(
unsigned offset,
unsigned mask) : offset(offset), mask(mask) {}
151 unsigned offset, mask;
190 mask.mask, func, value);
203 int get(
unsigned offset,
unsigned *data)
const
Device on a L4vbus::Vbus.
Device()
Construct a new vbus device using the NULL device L4VBUS_NULL.
l4vbus_device_handle_t _dev
The device handle for this device.
L4::Cap< Vbus > _bus
The Vbus capability where this device is located on.
A Gpio_module groups multiple GPIO pins together.
int setup(Pin_slice const &mask, unsigned mode, unsigned value) const
Configure function of multiple GPIO pins at once.
int config_pad(Pin_slice const &mask, unsigned func, unsigned value) const
Hardware specific configuration function for multiple GPIO pins.
int get(unsigned offset, unsigned *data) const
Read values of multiple GPIO pins at once.
int set(Pin_slice const &mask, unsigned data)
Set multiple GPIO output pins at once.
Gpio_pin pin(unsigned pin) const
Get Gpio_pin for a specific pin of this Gpio_module.
int set(int value) const
Set GPIO output pin.
int config_get(unsigned func, unsigned *value) const
Read hardware specific configuration.
int get() const
Read value of GPIO input pin.
int to_irq() const
Create IRQ for GPIO pin.
int config_pull(unsigned mode) const
Generic function to set pull up/down mode.
unsigned pin() const
Get pin number.
int config_pad(unsigned func, unsigned value) const
Hardware specific configuration function.
int setup(unsigned mode, unsigned value) const
Configure the function of a GPIO pin.
int l4vbus_gpio_to_irq(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin)
Create IRQ for GPIO pin.
int l4vbus_gpio_set(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, int value)
Set GPIO output pin.
int l4vbus_gpio_multi_set(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned offset, unsigned mask, unsigned data)
Set multiple GPIO output pins at once.
int l4vbus_gpio_setup(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned mode, int value)
Configure the function of a GPIO pin.
int l4vbus_gpio_config_pull(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned mode)
Generic function to set pull up/down mode.
int l4vbus_gpio_multi_config_pad(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned offset, unsigned mask, unsigned func, unsigned value)
Hardware specific configuration function for multiple GPIO pins.
int l4vbus_gpio_config_get(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned func, unsigned *value)
Read hardware specific configuration.
int l4vbus_gpio_multi_setup(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned offset, unsigned mask, unsigned mode, unsigned value)
Configure function of multiple GPIO pins at once.
int l4vbus_gpio_config_pad(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned func, unsigned value)
Hardware specific configuration function.
int l4vbus_gpio_multi_get(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned offset, unsigned *data)
Read values of multiple GPIO pins at once.
int l4vbus_gpio_get(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin)
Read value of GPIO input pin.
C++ interface of the Vbus API.
A slice of the pins provided by this module.