genode/repos/base/include/io_port_session/client.h

48 lines
1.3 KiB
C
Raw Normal View History

2011-12-22 15:19:25 +00:00
/*
* \brief Client-side I/O-port session interface
* \author Christian Helmuth
* \date 2007-04-17
*/
/*
* Copyright (C) 2007-2017 Genode Labs GmbH
2011-12-22 15:19:25 +00:00
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
2011-12-22 15:19:25 +00:00
*/
#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; }
2011-12-22 15:19:25 +00:00
struct Genode::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) { }
2011-12-22 15:19:25 +00:00
unsigned char inb(unsigned short address) override {
return call<Rpc_inb>(address); }
2011-12-22 15:19:25 +00:00
unsigned short inw(unsigned short address) override {
return call<Rpc_inw>(address); }
2011-12-22 15:19:25 +00:00
unsigned inl(unsigned short address) override {
return call<Rpc_inl>(address); }
2011-12-22 15:19:25 +00:00
void outb(unsigned short address, unsigned char value) override {
call<Rpc_outb>(address, value); }
2011-12-22 15:19:25 +00:00
void outw(unsigned short address, unsigned short value) override {
call<Rpc_outw>(address, value); }
void outl(unsigned short address, unsigned value) override {
call<Rpc_outl>(address, value); }
};
2011-12-22 15:19:25 +00:00
#endif /* _INCLUDE__IO_PORT_SESSION__CLIENT_H_ */