/* * \brief Client-side Gpio session interface * \author Ivan Loskutov * \date 2012-06-23 */ /* * Copyright (C) 2012 Ksys Labs LLC * Copyright (C) 2012 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. */ #ifndef _INCLUDE__GPIO_SESSION_H__CLIENT_H_ #define _INCLUDE__GPIO_SESSION_H__CLIENT_H_ #include #include namespace Gpio { struct Session_client : Genode::Rpc_client { explicit Session_client(Session_capability session) : Genode::Rpc_client(session) { } void direction_output(int gpio, bool enable) { call(gpio, enable); } void direction_input(int gpio) { call(gpio); } void dataout(int gpio, bool enable) { call(gpio, enable); } int datain(int gpio) { return call(gpio); } void debounce_enable(int gpio, bool enable) { call(gpio, enable); } void debouncing_time(int gpio, unsigned int us) { call(gpio, us); } void falling_detect(int gpio, bool enable) { call(gpio, enable); } void rising_detect(int gpio, bool enable) { call(gpio, enable); } void irq_enable(int gpio, bool enable) { call(gpio, enable); } void irq_sigh(Signal_context_capability cap, int gpio) { call(cap, gpio); } }; } #endif /* _INCLUDE__GPIO_SESSION_H__CLIENT_H_ */