1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """USB constant definitions.
9 class DescriptorType(object):
12 See Universal Serial Bus Specification Revision 2.0 Table 9-5.
20 OTHER_SPEED_CONFIGURATION
= 7
22 DEVICE_CAPABILITY
= 16
25 class CapabilityType(object):
26 """Device capability types.
28 See Universal Serial Bus 3.1 Specification, Revision 1.0 Table 9-14.
31 USB_20_EXTENSION
= 0x02
35 POWER_DELIVERY_CAPABILITY
= 0x06
36 BATTERY_INFO_CAPABILITY
= 0x07
37 PD_CONSUMER_PORT_CAPABILITY
= 0x08
38 PD_PROVIDER_PORT_CAPABILITY
= 0x09
39 SUPERSPEED_PLUS
= 0x0A
40 PRECISION_TIME_MEASUREMENT
= 0x0B
41 WIRELESS_USB_EXT
= 0x0C
44 class DeviceClass(object):
47 See http://www.usb.org/developers/defined_class.
65 class DeviceSubClass(object):
68 See http://www.usb.org/developers/defined_class.
74 class DeviceProtocol(object):
77 See http://www.usb.org/developers/defined_class.
83 class InterfaceClass(object):
86 See http://www.usb.org/developers/defined_class.
91 class InterfaceSubClass(object):
94 See http://www.usb.org/developers/defined_class.
99 class InterfaceProtocol(object):
102 See http://www.usb.org/developers/defined_class.
107 class TransferType(object):
110 See http://www.usb.org/developers/defined_class.
120 """Data transfer direction.
122 See Universal Serial Bus Specification Revision 2.0 Table 9-2.
131 See Universal Serial Bus Specification Revision 2.0 Table 9-2.
140 class Recipient(object):
141 """Request Recipient.
143 See Universal Serial Bus Specification Revision 2.0 Table 9-2.
152 class Request(object):
153 """Standard Request Codes.
155 See Universal Serial Bus Specification Revision 2.0 Table 9-4.
161 GET_DESCRIPTOR
= 0x06
162 SET_DESCRIPTOR
= 0x07
163 GET_CONFIGURATION
= 0x08
164 SET_CONFIGURATION
= 0x09
169 SET_ISOCH_DELAY
= 0x31
181 class VendorID(object):
185 class ProductID(object):
186 GOOGLE_TEST_GADGET
= 0x58F0
187 GOOGLE_KEYBOARD_GADGET
= 0x58F1
188 GOOGLE_MOUSE_GADGET
= 0x58F2
189 GOOGLE_HID_ECHO_GADGET
= 0x58F3
190 GOOGLE_ECHO_GADGET
= 0x58F4
191 GOOGLE_COMPOSITE_ECHO_GADGET
= 0x58F5