Results 1 to 7 of 7

Thread: Problem getting libusb datarecieved event to send signal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Problem getting libusb datarecieved event to send signal

    what is the protype of libusb_fill_interrupt_transfer()?
    Usually call back set functions take also a 'user param' to allow access to a user class.
    What is the 'NULL' parameter?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. The following user says thank you to high_flyer for this useful post:

    sisco (3rd December 2009)

  3. #2
    Join Date
    Oct 2009
    Posts
    31
    Thanks
    4

    Default Re: Problem getting libusb datarecieved event to send signal

    Quote Originally Posted by high_flyer View Post
    what is the protype of libusb_fill_interrupt_transfer()?
    Usually call back set functions take also a 'user param' to allow access to a user class.
    What is the 'NULL' parameter?
    from libusb documentation:

    Qt Code:
    1. static void libusb_fill_interrupt_transfer ( struct libusb_transfer * transfer,
    2. libusb_device_handle * dev_handle,
    3. unsigned char endpoint,
    4. unsigned char * buffer,
    5. int length,
    6. libusb_transfer_cb_fn callback,
    7. void * user_data,
    8. unsigned int timeout
    9. ) [inline, static]
    10.  
    11. Helper function to populate the required libusb_transfer fields for an interrupt transfer.
    12.  
    13. Parameters:
    14. transfer the transfer to populate
    15. dev_handle handle of the device that will handle the transfer
    16. endpoint address of the endpoint where this transfer will be sent
    17. buffer data buffer
    18. length length of data buffer
    19. callback callback function to be invoked on transfer completion
    20. user_data user data to pass to callback function
    21. timeout timeout for the transfer in milliseconds
    To copy to clipboard, switch view to plain text mode 

    the NULL parameter is the user_data param i thougnt since i didnt have anything i wanted to send with it i just used NULL.

Similar Threads

  1. send mail from qt app problem
    By cutie.monkey in forum Qt Programming
    Replies: 12
    Last Post: 30th September 2010, 19:31
  2. problem with emiting a signal
    By msmihai in forum Newbie
    Replies: 2
    Last Post: 3rd January 2009, 14:32
  3. Possible signal mapper problem
    By MarkoSan in forum Qt Programming
    Replies: 13
    Last Post: 25th January 2008, 13:11
  4. Replies: 1
    Last Post: 16th October 2007, 22:41
  5. Replies: 3
    Last Post: 15th April 2007, 19:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.