21#define USB_MASS_STORE_CLASS 0x08
26#define USB_MASS_STORE_RBC 0x01
27#define USB_MASS_STORE_8020I 0x02
28#define USB_MASS_STORE_QIC 0x03
29#define USB_MASS_STORE_UFI 0x04
30#define USB_MASS_STORE_8070I 0x05
31#define USB_MASS_STORE_SCSI 0x06
36#define USB_MASS_STORE_CBI0 0x00
37#define USB_MASS_STORE_CBI1 0x01
38#define USB_MASS_STORE_BOT 0x50
44#define USB_DEV_GET_STATUS 0x00
45#define USB_DEV_GET_STATUS_REQ_TYPE_D 0x80
46#define USB_DEV_GET_STATUS_REQ_TYPE_I 0x81
47#define USB_DEV_GET_STATUS_REQ_TYPE_E 0x82
49#define USB_DEV_CLEAR_FEATURE 0x01
50#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D 0x00
51#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I 0x01
52#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E 0x02
54#define USB_DEV_SET_FEATURE 0x03
55#define USB_DEV_SET_FEATURE_REQ_TYPE_D 0x00
56#define USB_DEV_SET_FEATURE_REQ_TYPE_I 0x01
57#define USB_DEV_SET_FEATURE_REQ_TYPE_E 0x02
59#define USB_DEV_SET_ADDRESS 0x05
60#define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00
62#define USB_DEV_GET_DESCRIPTOR 0x06
63#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE 0x80
65#define USB_DEV_SET_DESCRIPTOR 0x07
66#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE 0x00
68#define USB_DEV_GET_CONFIGURATION 0x08
69#define USB_DEV_GET_CONFIGURATION_REQ_TYPE 0x80
71#define USB_DEV_SET_CONFIGURATION 0x09
72#define USB_DEV_SET_CONFIGURATION_REQ_TYPE 0x00
74#define USB_DEV_GET_INTERFACE 0x0A
75#define USB_DEV_GET_INTERFACE_REQ_TYPE 0x81
77#define USB_DEV_SET_INTERFACE 0x0B
78#define USB_DEV_SET_INTERFACE_REQ_TYPE 0x01
80#define USB_DEV_SYNCH_FRAME 0x0C
81#define USB_DEV_SYNCH_FRAME_REQ_TYPE 0x82
106 UINT8 DescriptorType;
109 UINT8 DeviceSubClass;
110 UINT8 DeviceProtocol;
111 UINT8 MaxPacketSize0;
115 UINT8 StrManufacturer;
117 UINT8 StrSerialNumber;
118 UINT8 NumConfigurations;
127 UINT8 DescriptorType;
130 UINT8 ConfigurationValue;
142 UINT8 DescriptorType;
143 UINT8 FirstInterface;
144 UINT8 InterfaceCount;
146 UINT8 FunctionSubclass;
147 UINT8 FunctionProtocol;
148 UINT8 FunctionDescriptionStringIndex;
157 UINT8 DescriptorType;
158 UINT8 InterfaceNumber;
159 UINT8 AlternateSetting;
161 UINT8 InterfaceClass;
162 UINT8 InterfaceSubClass;
163 UINT8 InterfaceProtocol;
173 UINT8 DescriptorType;
174 UINT8 EndpointAddress;
176 UINT16 MaxPacketSize;
186 UINT8 DescriptorType;
196 USB_REQ_TYPE_STANDARD = (0x00 << 5),
197 USB_REQ_TYPE_CLASS = (0x01 << 5),
198 USB_REQ_TYPE_VENDOR = (0x02 << 5),
204 USB_REQ_GET_STATUS = 0x00,
205 USB_REQ_CLEAR_FEATURE = 0x01,
206 USB_REQ_SET_FEATURE = 0x03,
207 USB_REQ_SET_ADDRESS = 0x05,
208 USB_REQ_GET_DESCRIPTOR = 0x06,
209 USB_REQ_SET_DESCRIPTOR = 0x07,
210 USB_REQ_GET_CONFIG = 0x08,
211 USB_REQ_SET_CONFIG = 0x09,
212 USB_REQ_GET_INTERFACE = 0x0A,
213 USB_REQ_SET_INTERFACE = 0x0B,
214 USB_REQ_SYNCH_FRAME = 0x0C,
219 USB_TARGET_DEVICE = 0,
220 USB_TARGET_INTERFACE = 0x01,
221 USB_TARGET_ENDPOINT = 0x02,
222 USB_TARGET_OTHER = 0x03,
227 USB_DESC_TYPE_DEVICE = 0x01,
228 USB_DESC_TYPE_CONFIG = 0x02,
229 USB_DESC_TYPE_STRING = 0x03,
230 USB_DESC_TYPE_INTERFACE = 0x04,
231 USB_DESC_TYPE_ENDPOINT = 0x05,
232 USB_DESC_TYPE_INTERFACE_ASSOCIATION = 0x0b,
233 USB_DESC_TYPE_HID = 0x21,
234 USB_DESC_TYPE_REPORT = 0x22,
235 USB_DESC_TYPE_CS_INTERFACE = 0x24,
236 USB_DESC_TYPE_CS_ENDPOINT = 0x25,
241 USB_FEATURE_ENDPOINT_HALT = 0,
246 USB_ENDPOINT_CONTROL = 0x00,
247 USB_ENDPOINT_ISO = 0x01,
248 USB_ENDPOINT_BULK = 0x02,
249 USB_ENDPOINT_INTERRUPT = 0x03,
251 USB_ENDPOINT_TYPE_MASK = 0x03,
252 USB_ENDPOINT_DIR_IN = 0x80,
257 EFI_USB_INTERRUPT_DELAY = 2000000
258} USB_TYPES_DEFINITION;
268#define USB_HID_GET_DESCRIPTOR_REQ_TYPE 0x81
273#define USB_HID_CLASS_GET_REQ_TYPE 0xa1
274#define USB_HID_CLASS_SET_REQ_TYPE 0x21
279#define HID_ITEM_FORMAT_SHORT 0
280#define HID_ITEM_FORMAT_LONG 1
285#define HID_ITEM_TAG_LONG 15
290#define HID_ITEM_TYPE_MAIN 0
291#define HID_ITEM_TYPE_GLOBAL 1
292#define HID_ITEM_TYPE_LOCAL 2
293#define HID_ITEM_TYPE_RESERVED 3
298#define HID_MAIN_ITEM_TAG_INPUT 8
299#define HID_MAIN_ITEM_TAG_OUTPUT 9
300#define HID_MAIN_ITEM_TAG_FEATURE 11
301#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
302#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
307#define HID_MAIN_ITEM_CONSTANT 0x001
308#define HID_MAIN_ITEM_VARIABLE 0x002
309#define HID_MAIN_ITEM_RELATIVE 0x004
310#define HID_MAIN_ITEM_WRAP 0x008
311#define HID_MAIN_ITEM_NONLINEAR 0x010
312#define HID_MAIN_ITEM_NO_PREFERRED 0x020
313#define HID_MAIN_ITEM_NULL_STATE 0x040
314#define HID_MAIN_ITEM_VOLATILE 0x080
315#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
320#define HID_COLLECTION_PHYSICAL 0
321#define HID_COLLECTION_APPLICATION 1
322#define HID_COLLECTION_LOGICAL 2
327#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
328#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
329#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
330#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
331#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
332#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
333#define HID_GLOBAL_ITEM_TAG_UNIT 6
334#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
335#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
336#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
337#define HID_GLOBAL_ITEM_TAG_PUSH 10
338#define HID_GLOBAL_ITEM_TAG_POP 11
343#define HID_LOCAL_ITEM_TAG_USAGE 0
344#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
345#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
346#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
347#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
348#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
349#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
350#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
351#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
352#define HID_LOCAL_ITEM_TAG_DELIMITER 10
357#define HID_INPUT_REPORT 1
358#define HID_OUTPUT_REPORT 2
359#define HID_FEATURE_REPORT 3
364#define EFI_USB_GET_REPORT_REQUEST 0x01
365#define EFI_USB_GET_IDLE_REQUEST 0x02
366#define EFI_USB_GET_PROTOCOL_REQUEST 0x03
367#define EFI_USB_SET_REPORT_REQUEST 0x09
368#define EFI_USB_SET_IDLE_REQUEST 0x0a
369#define EFI_USB_SET_PROTOCOL_REQUEST 0x0b
377 UINT8 DescriptorType;
378 UINT16 DescriptorLength;
388 UINT8 DescriptorType;
391 UINT8 NumDescriptors;
struct hid_class_descriptor EFI_USB_HID_CLASS_DESCRIPTOR
struct hid_descriptor EFI_USB_HID_DESCRIPTOR