« Return to Thread: libusb future

Re: libusb future

by Tim Roberts :: Rate this Message:

Reply to Author | View in Thread

Xiaofan Chen wrote:

>
> libusb-win32 0.1 has already implemented isochronous transfer and asynchronous
>  I/O support.
>
> http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb1/src/dll/usb.h?view=markup
>
> int usb_isochronous_setup_async(usb_dev_handle *dev, void **context,
>                                    unsigned char ep, int pktsize);
> int usb_bulk_setup_async(usb_dev_handle *dev, void **context,
>                            unsigned char ep);
> int usb_interrupt_setup_async(usb_dev_handle *dev, void **context,
>                                 unsigned char ep);
>
> int usb_submit_async(void *context, char *bytes, int size);
> int usb_reap_async(void *context, int timeout);
> int usb_reap_async_nocancel(void *context, int timeout);
> int usb_cancel_async(void *context);
> int usb_free_async(void **context);
>  

That's an interesting approach.  The first three routines essentially
create "pipe handles", so that a single routine can do all of the URB
submission.

Because of that, I think I would have used names more like
"usb_create_pipe_handle".  After all, the "usb_xxx_setup_async" routines
aren't really setting up a request.  And, of course, the last 5 APIs
don't have any nouns, so it isn't clear what is being reaped, canceled,
or freed.

--
Tim Roberts, timr@...
Providenza & Boekelheide, Inc.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libusb-devel mailing list
Libusb-devel@...
https://lists.sourceforge.net/lists/listinfo/libusb-devel

 « Return to Thread: libusb future