
Originally Posted by
high_flyer
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:
static void libusb_fill_interrupt_transfer ( struct libusb_transfer * transfer,
libusb_device_handle * dev_handle,
unsigned char endpoint,
unsigned char * buffer,
int length,
libusb_transfer_cb_fn callback,
void * user_data,
unsigned int timeout
) [inline, static]
Helper function to populate the required libusb_transfer fields for an interrupt transfer.
Parameters:
transfer the transfer to populate
dev_handle handle of the device that will handle the transfer
endpoint address of the endpoint where this transfer will be sent
buffer data buffer
length length of data buffer
callback callback function to be invoked on transfer completion
user_data user data to pass to callback function
timeout timeout for the transfer in milliseconds
static void libusb_fill_interrupt_transfer ( struct libusb_transfer * transfer,
libusb_device_handle * dev_handle,
unsigned char endpoint,
unsigned char * buffer,
int length,
libusb_transfer_cb_fn callback,
void * user_data,
unsigned int timeout
) [inline, static]
Helper function to populate the required libusb_transfer fields for an interrupt transfer.
Parameters:
transfer the transfer to populate
dev_handle handle of the device that will handle the transfer
endpoint address of the endpoint where this transfer will be sent
buffer data buffer
length length of data buffer
callback callback function to be invoked on transfer completion
user_data user data to pass to callback function
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.
Bookmarks