Browse Source

Add the libusb control setup size offset for control writes.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
e6280c85d2
  1. 2
      usbutils.c

2
usbutils.c

@ -2719,7 +2719,7 @@ static int usb_control_transfer(libusb_device_handle *dev_handle, uint8_t bmRequ
init_usb_transfer(&ut); init_usb_transfer(&ut);
if (!receive) if (!receive)
memcpy(buf, buffer, wLength); memcpy(buf + LIBUSB_CONTROL_SETUP_SIZE, buffer, wLength);
libusb_fill_control_setup(buf, bmRequestType, bRequest, wValue, libusb_fill_control_setup(buf, bmRequestType, bRequest, wValue,
wIndex, wLength); wIndex, wLength);
libusb_fill_control_transfer(ut.transfer, dev_handle, buf, transfer_callback, libusb_fill_control_transfer(ut.transfer, dev_handle, buf, transfer_callback,

Loading…
Cancel
Save