One question: if your device has one interface, why is it a
composite device?
Actually, making a device with a single interface a composite device
is a very good idea, because it allows the AppleUSBComposite driver
to configure it and handle things like hub resets gracefully.
Can you elaborate on this?
Sure.
First of all, there are very few defined bDeviceClass values, and the
composite class (0) makes the most sense for the vast majority of
devices which encapsulate their functionality in the interfaces,
irrespective of how many of those interfaces there are.
Secondly, almost every IOUSBDevice object in Mac OS X (and IO Kit)
needs to have a SetConfiguration call made on it to cause IOKit and the
IOUSBFamily to instantiate the IOUSBInterface object(s), and there is
an Apple delivered driver which does just that - the AppleUSBComposite
driver. Now, if the device happens to be connected via a hub, and for
some reason that hub needs to be reset, the physical device is going to
get reset, and the AppleUSBComposite handles that situation very well
as well.
So unless there is some other functionality which needs to be part of
the driver for an IOUSBDevice object, we recommend that the
AppleUSBComposite driver be allowed to "take care" of the IOUSBDevice
object, and we recommend that developers who need to write KEXT drivers
have those drivers be IOUSBInterface drivers.
Rhoads Hollowell
USB Software Team
Apple Computer, Inc.
_______________________________________________
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