12 #include <l4/vbus/vbus> 13 #include <l4/vbus/vbus_gpio.h> 45 int set(
int value)
const 60 int setup(
unsigned mode,
unsigned value)
const 118 unsigned pin()
const {
return _pin; }
144 Pin_slice(
unsigned offset,
unsigned mask) : offset(offset), mask(mask) {}
145 unsigned offset, mask;
184 mask.mask, func, value);
197 int get(
unsigned offset,
unsigned *data)
const 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 to_irq() const
Create IRQ for GPIO pin.
int config_get(unsigned func, unsigned *value) const
Read hardware specific configuration.
Device on a L4vbus::Vbus.
int config_pad(Pin_slice const &mask, unsigned func, unsigned value) const
Hardware specific configuration function for multiple GPIO pins.
int setup(Pin_slice const &mask, unsigned mode, unsigned value) const
Configure function of multiple GPIO pins at once.
unsigned pin() const
Get pin number.
int config_pad(unsigned func, unsigned value) const
Hardware specific configuration function.
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_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_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_config_pull(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned mode)
Generic function to set pull up/down mode.
l4vbus_device_handle_t _dev
The device handle for this device.
int setup(unsigned mode, unsigned value) const
Configure the function of a GPIO pin.
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.
Gpio_pin pin(unsigned pin) const
Get Gpio_pin for a specific pin of this Gpio_module.
int l4vbus_gpio_get(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin)
Read value of GPIO input pin.
A Gpio_module groups multiple GPIO pins together.
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_pad(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin, unsigned func, unsigned value)
Hardware specific configuration function.
int config_pull(unsigned mode) const
Generic function to set pull up/down mode.
int l4vbus_gpio_to_irq(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin)
Create IRQ for GPIO pin.
A slice of the pins provided by this module.
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.