47 |
//#define USB_STATE_CONFIGURED 5 |
//#define USB_STATE_CONFIGURED 5 |
48 |
#define USB_STATE_SUSPENDED 6 |
#define USB_STATE_SUSPENDED 6 |
49 |
|
|
50 |
|
#define USB_CLASS_AUDIO 1 |
51 |
|
#define USB_CLASS_COMM 2 |
52 |
|
#define USB_CLASS_HID 3 |
53 |
|
#define USB_CLASS_PHYSICAL 5 |
54 |
|
#define USB_CLASS_STILL_IMAGE 6 |
55 |
|
#define USB_CLASS_PRINTER 7 |
56 |
|
#define USB_CLASS_MASS_STORAGE 8 |
57 |
|
#define USB_CLASS_HUB 9 |
58 |
|
#define USB_CLASS_CDC_DATA 0x0a |
59 |
|
#define USB_CLASS_CSCID 0x0b |
60 |
|
#define USB_CLASS_CONTENT_SEC 0x0d |
61 |
|
#define USB_CLASS_APP_SPEC 0xfe |
62 |
|
#define USB_CLASS_VENDOR_SPEC 0xff |
63 |
|
|
64 |
#define USB_DIR_OUT 0 |
#define USB_DIR_OUT 0 |
65 |
#define USB_DIR_IN 0x80 |
#define USB_DIR_IN 0x80 |
66 |
|
|
139 |
|
|
140 |
/* USB port on which a device can be connected */ |
/* USB port on which a device can be connected */ |
141 |
struct USBPort { |
struct USBPort { |
142 |
|
USBDevice *dev; |
143 |
void (*attach)(USBPort *port, USBDevice *dev); |
void (*attach)(USBPort *port, USBDevice *dev); |
144 |
void *opaque; |
void *opaque; |
145 |
int index; /* internal port index, may be used with the opaque */ |
int index; /* internal port index, may be used with the opaque */ |
158 |
void usb_uhci_init(PCIBus *bus, USBPort **usb_ports); |
void usb_uhci_init(PCIBus *bus, USBPort **usb_ports); |
159 |
|
|
160 |
/* usb-linux.c */ |
/* usb-linux.c */ |
161 |
USBDevice *usb_host_hub_init(void); |
USBDevice *usb_host_device_open(const char *devname); |
162 |
|
void usb_host_info(void); |
163 |
|
|
164 |
/* usb-hid.c */ |
/* usb-hid.c */ |
165 |
USBDevice *usb_mouse_init(void); |
USBDevice *usb_mouse_init(void); |