Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: USB polling



At 11:01 AM +0530 10/25/06, Arvind Dalvi wrote:
a quick read on endpoints and transfer types mention "interrupt" transfer.

now wondering, if such kind of transfer is available, is it upto the
driver to call read again-n-again (as per the interrupt frequency) ?

The standard technique for this if for the driver to leave an asynchronous read (or pool of reads) outstanding -- this causes the host controller to poll the device at the frequency specified in the device's descriptors and, whenever it send a packet, one of the async reads completes.


The calling of the completion proc is the "interrupt" as far as the software layers above are concerned.

or will the host controller driver understand that a device down below
has interrupt data, and would call my driver's completion routine ?

USB is a purely a master/slave polled bus. No device talks unless polled by the host controller.


The host controller only polls devices/endpoints if there's a read outstanding for them.

The only type of I/O supported by the is hardware is asynchronous -- synchronous reads are faked in the host software by issuing an asynchronous read and blocking until a library-supplied completion routine is called.

Libraries like libusb attempt to hide the way USB really works in an attempt to make it look like unix file I/O and cause inefficency and confusion as a result.

(A related issue is hiding the packet-oriented nature of bulk transfers)

i think i need to read the USB specs carefully, before i jump the gun....

Read the archives of this list as well -- this (and related topics) come up every 3-6 months.


That's not to say it isn't worth discussing -- it's non-trivial and in many cases non-obvious.

If you're working on libusb you should understand it because, having looked at it, libusb has exposes a bunch of stuff it shouldn't (busses, device numbers) and hides stuff that should be exposed (packet nature of bulk).

HTH,

-Steve

--
_________________________________________________________________________
Steve Sisak, CTO                                 email@hidden
IOXperts, Inc.                                            +1 617 876-2572
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >USB polling (From: "Arvind Dalvi" <email@hidden>)
 >Re: USB polling (From: David Ferguson <email@hidden>)
 >Re: Re: USB polling (From: "Arvind Dalvi" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.