usb_control_msg() prototype:
|int *usb_control_msg *|(struct usb_device * dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void * data, __u16 size, int timeout);
My question is this: How are the /request, //requesttype, value, /and/ index/ values figured out for a particular USB device?
I've looked at chapter 9.3 in the "Universal Serial Bus Specification" (www.scaramanga.co.uk/stuff/qemu-usb/usb11.pdf) document which specifies some standard device requests in table 9-3, but neither requesttypes in the examples below (0xc8 or 0x48) are listed in table 9-3.
usb_control_msg() examples -
usbled.c:
retval = usb_control_msg(led->udev,
usb_sndctrlpipe(led->udev, 0),
0x12,
0xc8,
(0x02 * 0x100) + 0x0a,
(0x00 * 0x100) + color,
buffer,
8,
2 * HZ);delcom_device_driver.c
retval = usb_control_msg(pck->udev,
usb_sndctrlpipe(pck->udev, 0),
0x12,
0x48, // this has to be 0x48 to send data in the buffer
(pck->minor * 0x100) + 0x0a,
(pck->msb * 0x100) + pck->lsb,
buffer,
pck->length,
1 * HZ);Any help in figuring out how these paramater values are found out is appreciated.
Thanks, Tim
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users
