L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 * License: see LICENSE.spdx (in this directory or the directories above)
6 */
7#pragma once
8
9#include <l4/sys/compiler.h>
10#include <l4/sys/types.h>
11#include <l4/vbus/vbus_types.h>
12
20
30
40
48int L4_CV
50 unsigned pin, unsigned mode, int value);
51
59int L4_CV
61 unsigned pin, unsigned mode);
62
70int L4_CV
72 unsigned pin, unsigned func, unsigned value);
73
81int L4_CV
83 unsigned pin, unsigned func, unsigned *value);
84
92int L4_CV
94 unsigned pin);
95
103int L4_CV
105 unsigned pin, int value);
106
115int L4_CV
117 unsigned offset, unsigned mask,
118 unsigned mode, unsigned value);
119
128int L4_CV
130 unsigned offset, unsigned mask,
131 unsigned func, unsigned value);
132
139int L4_CV
141 unsigned offset, unsigned *data);
142
151int L4_CV
153 unsigned offset, unsigned mask, unsigned data);
154
162int L4_CV
164 unsigned pin);
165
L4 compiler related defines.
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:335
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:167
#define L4_CV
Define calling convention.
Definition linkage.h:33
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:164
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:25
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:35
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:28
@ L4VBUS_GPIO_SETUP_INPUT
Set GPIO pin to input.
Definition vbus_gpio.h:26
@ L4VBUS_GPIO_SETUP_OUTPUT
Set GPIO pin to output.
Definition vbus_gpio.h:27
@ L4VBUS_GPIO_PIN_PULL_DOWN
enable pull down resistor
Definition vbus_gpio.h:38
@ L4VBUS_GPIO_PIN_PULL_NONE
No pull up or pull down resistors.
Definition vbus_gpio.h:36
@ L4VBUS_GPIO_PIN_PULL_UP
enable pull up resistor
Definition vbus_gpio.h:37
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:18