/* * \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-2015 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); } Genode::Irq_session_capability irq_session(Irq_type type) override { return call(type); } }; #endif /* _INCLUDE__GPIO_SESSION_H__CLIENT_H_ */