Lines Matching defs:usb_constants
10 import usb_constants
28 self._speed = usb_constants.Speed.UNKNOWN
48 if self._speed == usb_constants.Speed.FULL:
50 elif self._speed == usb_constants.Speed.HIGH:
89 self._speed = usb_constants.Speed.UNKNOWN
110 assert request_type & usb_constants.Dir.IN
111 typ = request_type & usb_constants.Type.MASK
112 recipient = request_type & usb_constants.Recipient.MASK
113 if typ == usb_constants.Type.STANDARD:
116 elif typ == usb_constants.Type.CLASS:
119 elif typ == usb_constants.Type.VENDOR:
136 assert not request_type & usb_constants.Dir.IN
137 typ = request_type & usb_constants.Type.MASK
138 recipient = request_type & usb_constants.Recipient.MASK
139 if typ == usb_constants.Type.STANDARD:
142 elif typ == usb_constants.Type.CLASS:
145 elif typ == usb_constants.Type.VENDOR:
162 if not endpoint & usb_constants.Dir.IN:
200 if request == usb_constants.Request.GET_DESCRIPTOR:
226 if recipient == usb_constants.Recipient.DEVICE:
227 if typ == usb_constants.DescriptorType.STRING:
285 if request == usb_constants.Request.SET_CONFIGURATION:
286 if recipient == usb_constants.Recipient.DEVICE:
288 elif request == usb_constants.Request.SET_INTERFACE:
289 if recipient == usb_constants.Recipient.INTERFACE:
350 header = struct.pack('<BB', length, usb_constants.DescriptorType.STRING)
363 '<BB', 2 + len(string), usb_constants.DescriptorType.STRING)