On Wed, 21 Dec 2005, Joe Culler wrote: > Hello there, > > I want to get a data from my usb device using libusb. > I think I should use usb_control_msg to get data from usb device, > Should I use: > > 1. usb_control_msg(my_dev, 0xC1, 0x00, 0x0000, 0x0521, buffer, 0x0001, 5000) > or > 2. usb_control_msg(my_dev, 0xC1, 0x00, 0x0000, 0x0521, NULL, 0x0001, 5000) ? > > I guess I should use 1, since data from usb will be stored in buffer, > am I right?
Yes, of course. You might also consider using symbolic constants instead of incomprehensible numbers like 0xC1 and 0x0521. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
