L4Re Operating System Framework
Interface and Usage Documentation
|
A Gpio_module groups multiple GPIO pins together. More...
#include <vbus_gpio>
Data Structures | |
struct | Pin_slice |
A slice of the pins provided by this module. More... | |
Public Member Functions | |
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. | |
Public Member Functions inherited from L4vbus::Device | |
Device () | |
Construct a new vbus device using the NULL device L4VBUS_NULL. | |
Device (L4::Cap< Vbus > bus, l4vbus_device_handle_t dev) | |
Construct a new vbus device using a device handle. | |
L4::Cap< Vbus > | bus_cap () const |
Access the Vbus capability of the underlying virtual bus. | |
l4vbus_device_handle_t | dev_handle () const |
Access the device handle of this device. | |
int | device_by_hid (Device *child, char const *hid, int depth=L4VBUS_MAX_DEPTH, l4vbus_device_t *devinfo=0) const |
Find a device by the hardware interface identifier (HID). | |
int | next_device (Device *child, int depth=L4VBUS_MAX_DEPTH, l4vbus_device_t *devinfo=0) const |
Find next child following child . | |
int | device (l4vbus_device_t *devinfo) const |
Obtain detailed information about a Vbus device. | |
int | get_resource (unsigned res_idx, l4vbus_resource_t *res) const |
Obtain the resource description of an individual device resource. | |
int | is_compatible (char const *cid) const |
Check if the given device has a compatibility ID (CID) or HID that matches cid. | |
bool | operator== (Device const &o) const |
Test if two devices are the same Vbus device. | |
bool | operator!= (Device const &o) const |
Test if two Vbus devices are not the same. | |
Public Member Functions inherited from L4vbus::Pm< Device > | |
int | pm_suspend () const |
Suspend the device. | |
int | pm_resume () const |
Resume the device. | |
Additional Inherited Members | |
Protected Attributes inherited from L4vbus::Device | |
L4::Cap< Vbus > | _bus |
The Vbus capability where this device is located on. | |
l4vbus_device_handle_t | _dev |
The device handle for this device. | |
A Gpio_module groups multiple GPIO pins together.
|
inline |
Hardware specific configuration function for multiple GPIO pins.
mask | Mask of GPIO pins to configure. A bit set to 1 configures this pin. A maximum of 32 pins can be configured at once. The real number depends on the hardware and the driver implementation. |
func | Hardware specific configuration register, usually offset to the GPIO chip's base address. |
value | Value which is written into the hardware specific configuration register for the specified pins |
Definition at line 187 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_multi_config_pad().
|
inline |
Read values of multiple GPIO pins at once.
offset | Pin corresponding to the LSB in data. Note: allowed may be hardware specific. | |
[out] | data | Each bit returns the value (0 or 1) for the corresponding GPIO pin. The value of pins that are not accessible is undefined. |
Definition at line 203 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_multi_get().
|
inline |
|
inline |
Set multiple GPIO output pins at once.
mask | Mask of GPIO pins to set. A bit set to 1 selects this pin. A maximum of 32 pins can be set at once. The real number depends on the hardware and the driver implementation. |
data | Each bit corresponds to the GPIO pin in mask. The value of each bit is written to the GPIO pin if its bit in mask is set. |
Definition at line 219 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_multi_set().
|
inline |
Configure function of multiple GPIO pins at once.
mask | Mask of GPIO pins to configure. A bit set to 1 configures this pin. A maximum of 32 pins can be configured at once. The real number depends on the hardware and the driver implementation. |
mode | GPIO function, see L4vbus_gpio_generic_func for generic functions. Hardware specific functions must be provided in the lower 8 bits. |
value | Optional value to set the GPIO pins to if they are configured as output pins |
Definition at line 168 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_multi_setup().