My USB handler thread(s) listen on other synchronization handles for
clean shutdown etc. Once I have opened a device using LibUsbX, is there
a synchronization handle I can pend on whilst waiting for the peripheral
device to write back to the host?
i.e.
// open device etc.
libusb_open_device_with_vid_pid(NULL,m_args.VID,m_args.PID);
while (!done)
{
DWORD dw = WaitForMultipleObjects(handles.size(),&handles[0],FALSE,10);
// data waiting to be read from device
if (dw == WAIT_OBJECT_0 + 0)
{
// do the read ...
result = libusb_bulk_transfer(m_pDevice,m_epIn,...);
}
// ....
}
Many thanks,
Jerry.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusbx-devel