-   Programming (
-   -   libusb: usb_control_msg. (

stf92 02-03-2014 11:35 AM

libusb: usb_control_msg. This is all you find in the net abuot usb_control_msg. First, the number of parameters is two more than in the device request. Example:

int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
int value, int index, char *bytes, int size, int timeout);

If you put timeout=0 then usb_control_msg will wait forever. Does it say so in the libusb documentation. Surely, but where?

gengisdave 02-04-2014 06:52 AM

function returns int number of bytes read or written, there are only two pointer, so *dev should be the device and *bytes the buffer; because you linked the prototype, i think sources haven't more infos

stf92 02-04-2014 08:13 AM

Very little. The parameters


really correspond to


in table 9-2 of the USB 1.1 specification but there is wLength also in the table. Besides, for the rest of the parameters, there is no documentation that I know of, certainly not in the site. So for the designer it's a matter of guessing?

All times are GMT -5. The time now is 08:47 AM.