WICG / webusb

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

can i set an extra parameter (i.e: data) in USBControlTransferOut? #159

Closed tayler0101 closed 5 years ago

tayler0101 commented 5 years ago

hi everyone I am trying to connect to cp210x UHRT chip, but I con't configure the chip due to lack of the needed parameter like data a size. I already tried but it dosen't work without this parameters, is there is anyway to do it?

odejesush commented 5 years ago

The controlTransferOut method accepts two parameters, a USBControlTransferParameters and a BufferSource. The USBControlTransferParameters is used for the setup packet that is transmitted to the device, and the length of the BufferSource is used to determine the size of the data. For reference, please look at the specification for controlTransferOut.

Closing this issue because this issue tracker is not a support forum. If you have further questions please post on Stack Overflow under the #webusb tag where your question (and the answer) will be indexed by search engines and hopefully help other developers as well.