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,
29 B_USB_RAW_COMMAND_SET_CONFIGURATION = 0x3000,
30 B_USB_RAW_COMMAND_SET_FEATURE,
31 B_USB_RAW_COMMAND_CLEAR_FEATURE,
32 B_USB_RAW_COMMAND_GET_STATUS,
33 B_USB_RAW_COMMAND_GET_DESCRIPTOR,
34 B_USB_RAW_COMMAND_SET_ALT_INTERFACE,
36 B_USB_RAW_COMMAND_CONTROL_TRANSFER = 0x4000,
37 B_USB_RAW_COMMAND_INTERRUPT_TRANSFER,
38 B_USB_RAW_COMMAND_BULK_TRANSFER,
39 B_USB_RAW_COMMAND_ISOCHRONOUS_TRANSFER
44 B_USB_RAW_STATUS_SUCCESS = 0,
46 B_USB_RAW_STATUS_FAILED,
47 B_USB_RAW_STATUS_ABORTED,
48 B_USB_RAW_STATUS_STALLED,
49 B_USB_RAW_STATUS_CRC_ERROR,
50 B_USB_RAW_STATUS_TIMEOUT,
52 B_USB_RAW_STATUS_INVALID_CONFIGURATION,
53 B_USB_RAW_STATUS_INVALID_INTERFACE,
54 B_USB_RAW_STATUS_INVALID_ENDPOINT,
55 B_USB_RAW_STATUS_INVALID_STRING,
57 B_USB_RAW_STATUS_NO_MEMORY
58 } usb_raw_command_status;
68 usb_device_descriptor *descriptor;
73 usb_configuration_descriptor *descriptor;
79 uint32 alternate_info;
81 uint32 interface_index;
86 usb_interface_descriptor *descriptor;
88 uint32 interface_index;
93 usb_interface_descriptor *descriptor;
95 uint32 interface_index;
96 uint32 alternate_index;
101 usb_endpoint_descriptor *descriptor;
103 uint32 interface_index;
104 uint32 endpoint_index;
109 usb_endpoint_descriptor *descriptor;
111 uint32 interface_index;
112 uint32 alternate_index;
113 uint32 endpoint_index;
118 usb_descriptor *descriptor;
120 uint32 interface_index;
121 uint32 generic_index;
127 usb_descriptor *descriptor;
129 uint32 interface_index;
130 uint32 alternate_index;
131 uint32 generic_index;
137 usb_string_descriptor *descriptor;
175 usb_iso_packet_descriptor *packet_descriptors;
180 #endif // _USB_RAW_H_