What is an Alternate Setting? Example of device that needs them?
The USB spec has a lot of talk about them, but never tells what one is and - most importantly - why I would use one. I never saw a USB device that uses alternate settings.
What is an Alternate Setting? Example of device that needs them?
The USB spec has a lot of talk about them, but never tells what one is and - most importantly - why I would use one. I never saw a USB device that uses alternate settings.
Alternate setting
is used to provide the advantage of having two configurations on the fly even though the device has only one configuration.
The alternate setting of a USB
interface is define by the bAlternateSetting
attribute in the Standard Interface Descriptor. A USB
interface with an alternate settings can be used in two mode. For example a USB
interface endpoints may act as INTERRUPT
pipes in normal settings, but might act as BULK
pipe in alternate settings providing you the facility of two different mode on the same interface. You just have to send a SetInterface
request to activate a settings. I myself didn't have to use it much though. And I think normally device drivers don't tend to use it as I couldn't find out any example driver.
You can look at this link for more details.
As far as I understood the specs, a given USB host expects to install ONLY ONE specific driver for a given VID/PID identifier. Now, some devices provide different interfaces, which would require a completely different driver. For example a USB modem that also implements a usb storage to provide installation software. One mechanism that allows the host to select either the MSC interface (storage) or the SSP interface (modem) is the alternate setting configuration.
© 2022 - 2024 — McMap. All rights reserved.