Bochs/bochs/iodev/usb/usb_uhci.h
Volker Ruppert d455659bd1 Split the USB UHCI code in two parts: uhci_core.cc implements the device
emulation and usb_uhci.cc implements the setup for the PIIX3 chipset and the
runtime device change code. The UHCI core is required for the EHCI emulation,
since there can be multiple "companion" controllers for USB 1.1 device handling.
2015-11-05 21:20:54 +00:00

57 lines
1.8 KiB
C++

/////////////////////////////////////////////////////////////////////////
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// 2009-2015 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef BX_IODEV_USB_UHCI_H
#define BX_IODEV_USB_UHCI_H
#if BX_USE_USB_UHCI_SMF
# define BX_UHCI_THIS theUSB_UHCI->
# define BX_UHCI_THIS_PTR theUSB_UHCI
#else
# define BX_UHCI_THIS this->
# define BX_UHCI_THIS_PTR this
#endif
class bx_usb_uhci_c : public bx_uhci_core_c {
public:
bx_usb_uhci_c();
virtual ~bx_usb_uhci_c();
virtual void init(void);
virtual void reset(unsigned);
virtual void register_state(void);
virtual void after_restore_state(void);
static const char *usb_param_handler(bx_param_string_c *param, int set,
const char *oldval, const char *val, int maxlen);
private:
Bit8u device_change;
int rt_conf_id;
void init_device(Bit8u port, bx_list_c *portconf);
static void remove_device(Bit8u port);
static void runtime_config_handler(void *);
void runtime_config(void);
};
#endif