Reputation: 940
I'm setting up my first libusb asynchronous transfer but never receive a callback.
I have connected to the library and can enumerate and open devices successfully.
The functions that are being used to set up the transfer (in this order) are as follows:
libusb_alloc_transfer()
libusb_fill_bulk_transfer()
libusb_submit_transfer()
libusb_submit_transfer
returns a successful result so I would expect to see receive a callback even if it returns an error, but none is received.
Any suggestions as to what could be wrong?
Upvotes: 4
Views: 2141
Reputation:
libusb documentation states:
In the interest of being a lightweight library, libusb does not create threads and can only operate when your application is calling into it. Your application must call into libusb from it's main loop when events are ready to be handled, or you must use some other scheme to allow libusb to undertake whatever work needs to be done.
Two integration levels are proposed:
An example usage of the later can be found in the libmaru project
Upvotes: 4