genode/repos/base/include/io_port_session/client.h
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00

48 lines
1.2 KiB
C++

/*
* \brief Client-side I/O-port session interface
* \author Christian Helmuth
* \date 2007-04-17
*/
/*
* Copyright (C) 2007-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__IO_PORT_SESSION__CLIENT_H_
#define _INCLUDE__IO_PORT_SESSION__CLIENT_H_
#include <io_port_session/capability.h>
#include <base/rpc_client.h>
namespace Genode {
struct Io_port_session_client : Rpc_client<Io_port_session>
{
explicit Io_port_session_client(Io_port_session_capability session)
: Rpc_client<Io_port_session>(session) { }
unsigned char inb(unsigned short address) {
return call<Rpc_inb>(address); }
unsigned short inw(unsigned short address) {
return call<Rpc_inw>(address); }
unsigned inl(unsigned short address) {
return call<Rpc_inl>(address); }
void outb(unsigned short address, unsigned char value) {
call<Rpc_outb>(address, value); }
void outw(unsigned short address, unsigned short value) {
call<Rpc_outw>(address, value); }
void outl(unsigned short address, unsigned value) {
call<Rpc_outl>(address, value); }
};
}
#endif /* _INCLUDE__IO_PORT_SESSION__CLIENT_H_ */