basvandijk / usb

Communicate with USB devices
Other
27 stars 12 forks source link

`readControl` doesn't set request direction correctly #13

Closed mkeeter closed 9 years ago

mkeeter commented 9 years ago

To construct the USB setup packet's bmRequestType byte, readControl uses marshallControlSetup, which in turn calls marshalRequestType.

Nothing in this function touches bit 7 of the bmRequestType byte, so the transfer is always sent out as a host-to-device transfer (rather than device-to-host), effectively writing rather than reading.

basvandijk commented 9 years ago

Fixed by #14.