![]()  | 
  
    L4Re Operating System Framework
    
   Interface and Usage Documentation 
   | 
 
A GPIO pin. More...
#include <vbus_gpio>
Public Member Functions | |
| int | get () const | 
| Read value of GPIO input pin.   | |
| int | set (int value) const | 
| Set GPIO output pin.   | |
| int | setup (unsigned mode, unsigned value) const | 
| Configure the function of a GPIO pin.   | |
| int | config_pull (unsigned mode) const | 
| Generic function to set pull up/down mode.   | |
| int | config_pad (unsigned func, unsigned value) const | 
| Hardware specific configuration function.   | |
| int | config_get (unsigned func, unsigned *value) const | 
| Read hardware specific configuration.   | |
| int | to_irq () const | 
| Create IRQ for GPIO pin.   | |
| unsigned | pin () const | 
| Get pin number.   | |
| 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.  | |
      
  | 
  inline | 
Read hardware specific configuration.
| func | Hardware specific configuration register to read from. Usually this is an offset to the GPIO chip's base address. | |
| [out] | value | The configuration value. | 
Definition at line 102 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_config_get().
      
  | 
  inline | 
Hardware specific configuration function.
| 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 pin | 
Definition at line 89 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_config_pad().
      
  | 
  inline | 
Generic function to set pull up/down mode.
| mode | mode for pull up/down resistors, see L4vbus_gpio_pull_modes | 
Definition at line 75 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_config_pull().
      
  | 
  inline | 
Read value of GPIO input pin.
Definition at line 38 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_get().
      
  | 
  inline | 
      
  | 
  inline | 
Set GPIO output pin.
| value | Value to write to the GPIO pin (usually 0 or 1) | 
Definition at line 49 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_set().
      
  | 
  inline | 
Configure the function of a GPIO pin.
| 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 pin to if it is configured as an output pin | 
Definition at line 64 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_setup().
      
  | 
  inline | 
Create IRQ for GPIO pin.
Definition at line 112 of file vbus_gpio.
References L4vbus::Device::_bus, L4vbus::Device::_dev, and l4vbus_gpio_to_irq().