![]()  | 
  
    L4Re Operating System Framework
    
   Interface and Usage Documentation 
   | 
 
Enumerations | |
| enum | L4vbus_gpio_generic_func { L4VBUS_GPIO_SETUP_INPUT = 0x100 , L4VBUS_GPIO_SETUP_OUTPUT = 0x200 , L4VBUS_GPIO_SETUP_IRQ = 0x300 } | 
| Constants for generic GPIO functions.  More... | |
| enum | L4vbus_gpio_pull_modes { L4VBUS_GPIO_PIN_PULL_NONE = 0x100 , L4VBUS_GPIO_PIN_PULL_UP = 0x200 , L4VBUS_GPIO_PIN_PULL_DOWN = 0x300 } | 
| Constants for generic GPIO pull up/down resistor configuration.  More... | |
Functions | |
| 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_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_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_get (l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin) | 
| Read value of GPIO input 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_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_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_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_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_to_irq (l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned pin) | 
| Create IRQ for GPIO pin.      | |
Constants for generic GPIO functions.
| Enumerator | |
|---|---|
| L4VBUS_GPIO_SETUP_INPUT | Set GPIO pin to input.  | 
| L4VBUS_GPIO_SETUP_OUTPUT | Set GPIO pin to output.  | 
| L4VBUS_GPIO_SETUP_IRQ | Set GPIO pin to IRQ.  | 
Definition at line 24 of file vbus_gpio.h.
Constants for generic GPIO pull up/down resistor configuration.
| Enumerator | |
|---|---|
| L4VBUS_GPIO_PIN_PULL_NONE | No pull up or pull down resistors.  | 
| L4VBUS_GPIO_PIN_PULL_UP | enable pull up resistor  | 
| L4VBUS_GPIO_PIN_PULL_DOWN | enable pull down resistor  | 
Definition at line 34 of file vbus_gpio.h.
| 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.
| vbus | V-BUS capability | |
| handle | Device handle for the GPIO chip | |
| pin | GPIO pin number | |
| 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. | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::config_get().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin number | 
| 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 | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::config_pad().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin number | 
| mode | mode for pull up/down resistors, see L4vbus_gpio_pull_modes | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::config_pull().
| int l4vbus_gpio_get | ( | l4_cap_idx_t | vbus, | 
| l4vbus_device_handle_t | handle, | ||
| unsigned | pin ) | 
Read value of GPIO input pin.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin number to read from | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::get().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| offset | Pin corresponding to the LSB in mask. Note: allowed may be hardware specific. | 
| 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 | 
References L4_CV.
Referenced by L4vbus::Gpio_module::config_pad().
| 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.
| vbus | V-BUS capability | |
| handle | Device handle for the GPIO chip | |
| 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. | 
References L4_CV.
Referenced by L4vbus::Gpio_module::get().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| offset | Pin corresponding to the LSB in data. Note: allowed may be hardware specific. | 
| 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. | 
References L4_CV.
Referenced by L4vbus::Gpio_module::set().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| offset | Pin corresponding to the LSB in mask. Note: allowed may be hardware specific. | 
| 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 | 
References L4_CV.
Referenced by L4vbus::Gpio_module::setup().
| int l4vbus_gpio_set | ( | l4_cap_idx_t | vbus, | 
| l4vbus_device_handle_t | handle, | ||
| unsigned | pin, | ||
| int | value ) | 
Set GPIO output pin.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin number to write to | 
| value | Value to write to the GPIO pin (usually 0 or 1) | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::set().
| 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.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin number | 
| 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 | 
References L4_CV.
Referenced by L4vbus::Gpio_pin::setup().
| int l4vbus_gpio_to_irq | ( | l4_cap_idx_t | vbus, | 
| l4vbus_device_handle_t | handle, | ||
| unsigned | pin ) | 
Create IRQ for GPIO pin.
| vbus | V-BUS capability | 
| handle | Device handle for the GPIO chip | 
| pin | GPIO pin to create an IRQ for. | 
References L4_END_DECLS.
Referenced by L4vbus::Gpio_pin::to_irq().