WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.3k stars 126 forks source link

Parameters of USBControlTransferParameters come from? #173

Closed GanZhiXiong closed 4 years ago

GanZhiXiong commented 4 years ago

image

Where do the values in the red box of the screenshot come from? requestType, recipient, request, value, index, I'm just writing these arbitrary parameters, so I don't know how to write these parameters?

reillyeon commented 4 years ago

I don't know what screenshot this code comes from so I don't know where the values used by this author of this code came from.

I general these values come from the USB specification (in the case of "standard" and "class" request types) or are defined by the device manufacturer (in the case of a "vendor" request type).

Closing this issue as it is not specification-related. In the future questions like this should be asked on StackOverflow with the "webusb" tag.