USBAlternateInterface - Web APIs 编辑

Draft

This page is not complete.

Secure context

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The USBAlternateInterface interface of the WebUSB API provides information about a particular configuration of an interface provided by the USB device. An interface includes one or more alternate settings which can configure a set of endpoints based on the operating mode of the device.

Constructor

USBAlternateInterface.USBAlternateInterface
Creates a new USBAlternateInterface object which will be populated with information about the alternate interface of the provided USBInterface with the given alternate setting number.

Properties

USBAlternateInterface.alternateSettingRead only
Returns the alternate setting number of this interface. This is equal to the bAlternateSetting field of the interface descriptor defining this interface.
USBAlternateInterface.interfaceClassRead only
Returns the class of this interface. This is equal to the bInterfaceClass field of the interface descriptor defining this interface. Standardized values for this field are defined by the USB Implementers Forum. A value of 0xFF indicates a vendor-defined interface.
USBAlternateInterface.interfaceSubclassRead only
Returns the subclass of this interface. This is equal to the bInterfaceSubClass field of the interface descriptor defining this interface. The meaning of this value depends on the interfaceClass field.
USBAlternateInterface.interfaceProtocolRead only
Returns the protocol supported by this interface. This is equal to the bInterfaceProtocol field of the interface descriptor defining this interface. The meaning of this value depends on the interfaceClass and interfaceSubclass fields.
USBAlternateInterface.interfaceNameRead only
Returns the name of the interface, if one is provided by the device. This is the value of the string descriptor with the index specified by the iInterface field of the interface descriptor defining this interface.
USBAlternateInterface.endpointsRead only
Returns an array containing instances of the USBEndpoint interface describing each of the endpoints that are part of this interface.

Specifications

SpecificationStatusComment
WebUSB
The definition of 'USBAlternateInterface' in that specification.
DraftInitial definition.

Browser compatibility

BCD tables only load in the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:109 次

字数:5128

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文