L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
vbus_gpio.h
1/*
2 * (c) 2011 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
4 *
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
8 */
9#pragma once
10
11#include <l4/sys/compiler.h>
12#include <l4/sys/types.h>
13#include <l4/vbus/vbus_types.h>
14
22
32
42
50int L4_CV
52 unsigned pin, unsigned mode, int value);
53
61int L4_CV
63 unsigned pin, unsigned mode);
64
72int L4_CV
74 unsigned pin, unsigned func, unsigned value);
75
83int L4_CV
85 unsigned pin, unsigned func, unsigned *value);
86
94int L4_CV
96 unsigned pin);
97
105int L4_CV
107 unsigned pin, int value);
108
117int L4_CV
119 unsigned offset, unsigned mask,
120 unsigned mode, unsigned value);
121
130int L4_CV
132 unsigned offset, unsigned mask,
133 unsigned func, unsigned value);
134
141int L4_CV
143 unsigned offset, unsigned *data);
144
153int L4_CV
155 unsigned offset, unsigned mask, unsigned data);
156
164int L4_CV
166 unsigned pin);
167
L4 compiler related defines.
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:199
#define L4_CV
Define calling convention.
Definition linkage.h:44
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:196
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.
L4vbus_gpio_generic_func
Constants for generic GPIO functions.
Definition vbus_gpio.h:27
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.
L4vbus_gpio_pull_modes
Constants for generic GPIO pull up/down resistor configuration.
Definition vbus_gpio.h:37
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.
@ L4VBUS_GPIO_SETUP_IRQ
Set GPIO pin to IRQ.
Definition vbus_gpio.h:30
@ L4VBUS_GPIO_SETUP_INPUT
Set GPIO pin to input.
Definition vbus_gpio.h:28
@ L4VBUS_GPIO_SETUP_OUTPUT
Set GPIO pin to output.
Definition vbus_gpio.h:29
@ L4VBUS_GPIO_PIN_PULL_DOWN
enable pull down resistor
Definition vbus_gpio.h:40
@ L4VBUS_GPIO_PIN_PULL_NONE
No pull up or pull down resistors.
Definition vbus_gpio.h:38
@ L4VBUS_GPIO_PIN_PULL_UP
enable pull up resistor
Definition vbus_gpio.h:39
Common L4 ABI Data Types.
This header file contains descriptions of vbus related data types and constants.
l4_mword_t l4vbus_device_handle_t
Device handle for a device on the vbus.
Definition vbus_types.h:20