Re: [Fx2lib-devel] Isochronous Streaming Using LibUSB from FPGA
Status: Beta
Brought to you by:
mulicheng
From: Xiaofan C. <xia...@gm...> - 2011-07-08 06:35:46
|
On Fri, Jul 8, 2011 at 1:58 PM, Phil Behnke <phi...@gm...> wrote: > I think the sleep code is one of the problems, but if I lower or get rid of > it, libUSB starts to fail (in both python and C) with a LIBUSB_ERROR_IO > error. You might want to use multi-thread approach. But I do not know much about this. libusb-1.0's async APIs are quite complicated when used in a multithread application. http://www.libusb.org/wiki/libusb-1.0 http://libusb.sourceforge.net/api-1.0/io.html http://libusb.sourceforge.net/api-1.0/group__asyncio.html You might try this simple option. "2) Repeatedly call libusb_handle_events() in blocking mode from a dedicated thread." Or if you want to have some challenges, try the following which is quite POSIX centric and not that good for Windows. http://libusb.sourceforge.net/api-1.0/mtasync.html -- Xiaofan |