Hi,

> Sorry ... I has poor English...:)
> I have some questions for usb device driver programming ...

For most of this, see the "Programming Guide for Linux USB
Device Drivers" at http://usb.in.tum.de/usbdoc/ .

> When should I use URB functions...??
> Why there is not Macro for FILL_ISOC_USB...??
> How can I get data from an isoc. endpoint ...??

See all of the drivers that do isoc transfers:  dabusb,
cpia, ibmcam, ov511, audio.

> There are usb_control_msg & usb_bulk_msg...
> Why there are not usb_isoc_msg & usb_int_msg...??

usb_control_msg() is primarily for device configuration.
It's speed and system/bus impact is not critical.
For transfers where performance is important (like
bulk and isoc), we don't support a synchronous
I/O function [except for usb_bulk_msg(), which should
go away in 2.5].  It wouldn't make sense to request
isoc transfers in a synchronous API, and the way that
we support async isoc transfer requests is thru
usb_submit_urb().

It also doesn't make sense to have a synchronous
interrupt transfer API.  The USB device driver just
requests that an interrupt transfer be started and
then is called back when it is complete.

usb_bulk_msg() is part of the early USB driver API.
It really shouldn't be used by any new drivers.
They should instead allocate an URB, FILL it (with
or without using a FILL macro), and call
usb_submit_urb() to initiate a USB transfer request.
USB transfer requests that are initiated thru
usb_submit_urb() are asynchronous.  They begin the
transfer and then return to the driver before completing
the transfer.  When the transfer is complete (successfully
or with errors or timeout), the USB device driver is
called back with an I/O completion notice.

All 4 USB transfer types (control, bulk, isoc, and int)
are now handled thru the usb_submit_urb() interface.
The URB interface simplifies the USB driver API and
makes it similar for all transfer types, instead of
having a separate function for each transfer type
request.

> Thanks for your answers...^_^

~Randy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to