2 * Copyright 2006-2008, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
11 #define B_USB_RAW_PROTOCOL_VERSION 0x0015
12 #define B_USB_RAW_ACTIVE_ALTERNATE 0xffffffff
15 B_USB_RAW_COMMAND_GET_VERSION = 0x1000,
17 B_USB_RAW_COMMAND_GET_DEVICE_DESCRIPTOR = 0x2000,
18 B_USB_RAW_COMMAND_GET_CONFIGURATION_DESCRIPTOR,
19 B_USB_RAW_COMMAND_GET_INTERFACE_DESCRIPTOR,
20 B_USB_RAW_COMMAND_GET_ENDPOINT_DESCRIPTOR,
21 B_USB_RAW_COMMAND_GET_STRING_DESCRIPTOR,
22 B_USB_RAW_COMMAND_GET_GENERIC_DESCRIPTOR,
23 B_USB_RAW_COMMAND_GET_ALT_INTERFACE_COUNT,
24 B_USB_RAW_COMMAND_GET_ACTIVE_ALT_INTERFACE_INDEX,
25 B_USB_RAW_COMMAND_GET_INTERFACE_DESCRIPTOR_ETC,
26 B_USB_RAW_COMMAND_GET_ENDPOINT_DESCRIPTOR_ETC,
27 B_USB_RAW_COMMAND_GET_GENERIC_DESCRIPTOR_ETC,
28 B_USB_RAW_COMMAND_GET_CONFIGURATION_DESCRIPTOR_ETC,
30 B_USB_RAW_COMMAND_SET_CONFIGURATION = 0x3000,
31 B_USB_RAW_COMMAND_SET_FEATURE,
32 B_USB_RAW_COMMAND_CLEAR_FEATURE,
33 B_USB_RAW_COMMAND_GET_STATUS,
34 B_USB_RAW_COMMAND_GET_DESCRIPTOR,
35 B_USB_RAW_COMMAND_SET_ALT_INTERFACE,
37 B_USB_RAW_COMMAND_CONTROL_TRANSFER = 0x4000,
38 B_USB_RAW_COMMAND_INTERRUPT_TRANSFER,
39 B_USB_RAW_COMMAND_BULK_TRANSFER,
40 B_USB_RAW_COMMAND_ISOCHRONOUS_TRANSFER
45 B_USB_RAW_STATUS_SUCCESS = 0,
47 B_USB_RAW_STATUS_FAILED,
48 B_USB_RAW_STATUS_ABORTED,
49 B_USB_RAW_STATUS_STALLED,
50 B_USB_RAW_STATUS_CRC_ERROR,
51 B_USB_RAW_STATUS_TIMEOUT,
53 B_USB_RAW_STATUS_INVALID_CONFIGURATION,
54 B_USB_RAW_STATUS_INVALID_INTERFACE,
55 B_USB_RAW_STATUS_INVALID_ENDPOINT,
56 B_USB_RAW_STATUS_INVALID_STRING,
58 B_USB_RAW_STATUS_NO_MEMORY
59 } usb_raw_command_status;
69 usb_device_descriptor *descriptor;
74 usb_configuration_descriptor *descriptor;
80 usb_configuration_descriptor *descriptor;
87 uint32 alternate_info;
89 uint32 interface_index;
94 usb_interface_descriptor *descriptor;
96 uint32 interface_index;
101 usb_interface_descriptor *descriptor;
103 uint32 interface_index;
104 uint32 alternate_index;
109 usb_endpoint_descriptor *descriptor;
111 uint32 interface_index;
112 uint32 endpoint_index;
117 usb_endpoint_descriptor *descriptor;
119 uint32 interface_index;
120 uint32 alternate_index;
121 uint32 endpoint_index;
126 usb_descriptor *descriptor;
128 uint32 interface_index;
129 uint32 generic_index;
135 usb_descriptor *descriptor;
137 uint32 interface_index;
138 uint32 alternate_index;
139 uint32 generic_index;
145 usb_string_descriptor *descriptor;
183 usb_iso_packet_descriptor *packet_descriptors;
188 #endif // _USB_RAW_H_