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: matching against composite/HID device



On Mar 18, 2005, at 10:22 AM, Andy Peters wrote:

Rhoads Hollowell wrote:

On Mar 18, 2005, at 10:12 AM, Andy Peters wrote:
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

This email sent to email@hidden
References: 
 >matching against composite/HID device (From: Shaun Wexler <email@hidden>)
 >Re: matching against composite/HID device (From: Fernando Urbina <email@hidden>)
 >Re: matching against composite/HID device (From: Shaun Wexler <email@hidden>)
 >Re: matching against composite/HID device (From: Andy Peters <email@hidden>)
 >Re: matching against composite/HID device (From: Rhoads Hollowell <email@hidden>)
 >Re: matching against composite/HID device (From: Andy Peters <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.