2003-01-28 16:58:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2011-02-24 22:05:47 +00:00
|
|
|
// $Id$
|
2003-01-28 16:58:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2016-12-02 17:30:16 +00:00
|
|
|
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
|
|
|
|
// 2009-2016 The Bochs Project
|
2003-01-28 16:58:10 +00:00
|
|
|
//
|
|
|
|
// 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
|
2009-02-08 09:05:52 +00:00
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-01-28 16:58:10 +00:00
|
|
|
|
2009-01-19 09:48:12 +00:00
|
|
|
#ifndef BX_IODEV_USB_UHCI_H
|
|
|
|
#define BX_IODEV_USB_UHCI_H
|
2006-03-07 18:16:41 +00:00
|
|
|
|
2009-01-19 09:48:12 +00:00
|
|
|
#if BX_USE_USB_UHCI_SMF
|
|
|
|
# define BX_UHCI_THIS theUSB_UHCI->
|
|
|
|
# define BX_UHCI_THIS_PTR theUSB_UHCI
|
2003-01-28 16:58:10 +00:00
|
|
|
#else
|
2009-01-19 09:48:12 +00:00
|
|
|
# define BX_UHCI_THIS this->
|
|
|
|
# define BX_UHCI_THIS_PTR this
|
2003-01-28 16:58:10 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-05 21:20:54 +00:00
|
|
|
class bx_usb_uhci_c : public bx_uhci_core_c {
|
2003-01-28 16:58:10 +00:00
|
|
|
public:
|
2009-01-19 09:48:12 +00:00
|
|
|
bx_usb_uhci_c();
|
|
|
|
virtual ~bx_usb_uhci_c();
|
2006-03-07 18:16:41 +00:00
|
|
|
virtual void init(void);
|
|
|
|
virtual void reset(unsigned);
|
2006-05-27 15:54:49 +00:00
|
|
|
virtual void register_state(void);
|
|
|
|
virtual void after_restore_state(void);
|
2006-03-07 21:11:20 +00:00
|
|
|
|
2009-01-04 21:46:20 +00:00
|
|
|
static const char *usb_param_handler(bx_param_string_c *param, int set,
|
|
|
|
const char *oldval, const char *val, int maxlen);
|
2003-01-28 16:58:10 +00:00
|
|
|
|
|
|
|
private:
|
2015-11-05 21:20:54 +00:00
|
|
|
Bit8u device_change;
|
|
|
|
int rt_conf_id;
|
2009-01-19 09:48:12 +00:00
|
|
|
|
2015-11-05 21:20:54 +00:00
|
|
|
void init_device(Bit8u port, bx_list_c *portconf);
|
2009-02-26 22:46:37 +00:00
|
|
|
static void remove_device(Bit8u port);
|
2009-04-06 09:30:26 +00:00
|
|
|
|
2011-06-11 19:38:52 +00:00
|
|
|
static void runtime_config_handler(void *);
|
|
|
|
void runtime_config(void);
|
2003-01-28 16:58:10 +00:00
|
|
|
};
|
2004-12-16 19:05:01 +00:00
|
|
|
|
2006-03-07 18:16:41 +00:00
|
|
|
#endif
|