From: Xiaofan C. <xia...@gm...> - 2012-04-14 09:46:15
|
On Fri, Apr 13, 2012 at 11:03 PM, bob 295 <ica...@29...> wrote: > I'm still very much a USB/libusb-1.0 newbie. > > I've been trying to teach myself the libusb-1.0 library against a Phidgets SBC > board. This board comes with libusb-0.1 source code, albeit a tad > difficult to follow. The relevant libusb-0.1 call I'm trying to emulate in > async libusb-1.0 is: > > ========= begin Phidget lib snip ============= > BytesWritten = usb_control_msg((usb_dev_handle *)phid->deviceHandle, > USB_ENDPOINT_OUT | USB_TYPE_CLASS | > USB_RECIP_INTERFACE, > USB_REQ_SET_CONFIGURATION, > 0x0200, /* value */ > phid->deviceDef->pdd_iid, /* index*/ > (char *)buffer, > phid->outputReportByteLength, /* size > */ > 500); /* FIXME? timeout */ > =========== end Phidget lib snip =========== In this case, I will suggest you not to jump from synchronous transfer to async transfer in your first trying of libusb-1.0. Try to translate the above sync control transfer to the sync control transfer libusb-1.0 API first. Once that is working, then you can try async API. -- Xiaofan |