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: usb novice question



At 1:45 PM -0400 5/12/05, Bob Kuehne wrote:

how do i select inteface 0, alternate setting 1?

I think I'm right here, but I'm not confident I'm way off base.

The way I see this, there is only one interface to find, so the interfaces iterator does not find the alts. The alts are mutually exclusive, so the interface can only exist in the state of one of the alts at once. The interface iterator finds interfaces which exist, not interface which could potentially exist (which are just entries in a descriptor).

When the device is configured (SetConfiguration is called for the device) the interfaces are instantiated and can then be found by an iterator. Initially the interface is in the default state, which is as described by alt zero. Once a driver has found the interface, it can then discover what alts are available and configure it to which ever alt it wants using SetAlternateInterface.

So iterate to find an interface which looks interestig, the use SetAlternateInterface.
--
Barry Twycross
email@hidden
---
USB, it's not a Dyslexic BUS. (Thanks to TC.)
_______________________________________________
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 novice question (From: Bob Kuehne <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.