linux - libusb_submit_transfer no callback -


i'm setting first libusb asynchronous transfer never receive callback.

i have connected library , can enumerate , open devices successfully.

the functions being used set transfer (in order) follows:

libusb_alloc_transfer() libusb_fill_bulk_transfer() libusb_submit_transfer() 

libusb_submit_transfer returns successful result expect see receive callback if returns error, none received.

any suggestions wrong?

libusb documentation states:

in interest of being lightweight library, libusb not create threads , can operate when application calling it. application must call libusb it's main loop when events ready handled, or must use other scheme allow libusb undertake whatever work needs done.

two integration levels proposed:

  • simple : use blocking call application's main loop content
  • advanced : can either request libusb descriptors , mix them yours, or register callbacks (libusb_set_pollfd_notifiers()) notified of added/removed descriptors.

an example usage of later can found in libmaru project


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -