/* * \brief Client-side interface for PCI device * \author Norman Feske * \date 2008-01-28 */ /* * Copyright (C) 2008-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__PCI_DEVICE__CLIENT_H_ #define _INCLUDE__PCI_DEVICE__CLIENT_H_ #include #include #include #include namespace Pci { struct Device_client : public Genode::Rpc_client { Device_client(Device_capability device) : Genode::Rpc_client(device) { } void bus_address(unsigned char *bus, unsigned char *dev, unsigned char *fn) { call(bus, dev, fn); } unsigned short vendor_id() { return call(); } unsigned short device_id() { return call(); } unsigned class_code() { return call(); } Resource resource(int resource_id) { return call(resource_id); } unsigned config_read(unsigned char address, Access_size size) { return call(address, size); } void config_write(unsigned char address, unsigned value, Access_size size) { call(address, value, size); } }; } #endif /* _INCLUDE__PCI_DEVICE__CLIENT_H_ */