/* * \brief Client-side Gpio session interface * \author Ivan Loskutov * \author Stefan Kalkowski * \date 2012-06-23 */ /* * Copyright (C) 2012 Ksys Labs LLC * Copyright (C) 2012-2013 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; } struct Gpio::Session_client : Genode::Rpc_client { explicit Session_client(Session_capability session) : Genode::Rpc_client(session) { } void direction(Direction d) override { call(d); } void write(bool level) override { call(level); } bool read() override { return call(); } void debouncing(unsigned int us) override { call(us); } void irq_type(Irq_type it) override { call(it); } void irq_enable(bool enable) override { call(enable); } void irq_sigh(Genode::Signal_context_capability cap) override { call(cap); } }; #endif /* _INCLUDE__GPIO_SESSION_H__CLIENT_H_ */