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: What are multiple configurations for? How are they typically used?



These are great questions, and a good topic for discussion.

I would always at least find the first configuration and set that. A simple model that will work even if you change the configuration value.

Multiple Configurations can be used for several purposes, but often it is used for different functionality available with different amounts of power. Each configuration has a bMaxPower field that tells how much bus power this configuration requires. Separate configuration may be used to provide different functionality - say with more power you can provide an audio interface with a small bus-powered amp, etc. Or perhaps the device want's to know how much power can be used for charging it's battery -- iPods do that - they only draw 100mA when pluggged into a bus powered hub, and charge at 500mA when attached to a self-powered hub. The IOUSBComposite driver will pick the configuration that has the highest amount of power available for the port the device is attached to.

If your device can have multiple mutually exclusive functions, you might want to have multiple configurations, and provide a preferences panel to allows the user to select how the device behaves. Let's say you had an audio device with 6 I/O's - 2 are inputs, 2 are outputs, and two can be configured as either inputs or outputs. You could have multiple configurations to describe the different usages.

Hope this helps.

David Ferguson
USB Software Team





At 4:03 PM -0500 2/16/06, Dan Smith wrote:
We have some version 0.001 firmware running on a Cypress EZ-USB FX2LP
prototyping system. I'm trying to write Mac OS X code to talk to it. I'm
following the sample code in USB Device Interface Guide, 2005-11-09, fairly
slavishly.

I was encountering some very weird semi-reproducible problems. What I
eventually found was that these problems were associated with my attempts to
configure the device, a la Listing 2-5. If I simply omitted this step,
everything works perfectly.

So, our firmware engineer is saying, "I haven't paid much attention to that.
I've assumed that the Cypress-provided code was taking care of it automatically
but now I'm not so sure."


The question I have is this. Our device is only going to have one
configuration, and it's going to be vendor-specific. As a matter of good
practice, if you know that a device with device ID so-and-so, product ID
so-and-so has only one configuration, would you bother to go through the
configuration steps anyway, or would you skip them?

Second, neither the Cypress book nor "USB Complete" explains very clearly just
what would be some real-world examples of multiple configurations, or how they
would be used. What are some real-world examples? Do end user typically select
a configuration in some utility? Does a system typically configure the USB
device as soon as it's connected, or does it get switched from one to another
while it's running, or what? What are they for, and how are they typically used?




 _______________________________________________
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

_______________________________________________ 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: 
 >What are multiple configurations for? How are they typically used? (From: "Dan Smith" <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.