USB设备的多个驱动程序

发布于 2024-08-24 10:20:06 字数 139 浏览 8 评论 0原文

一个USB设备是否可以支持多个驱动程序?我想支持我自己的专有驱动程序,但也支持 CCID 作为第二选择。当设备插入时,用户可以选择使用哪一个。使用的驱动程序由 USB 描述符决定,对吧?如果是这样,是否可以表明这两个驱动程序都受支持?支持两个驱动程序的想法可行吗?

Is it possible for a USB device to support multiple drivers? I'd like to support my own proprietary driver but also CCID as a second choice. When the device is plugged in, the user can select which one to use. The driver to use is determined by what the USB descriptor says, right? If that is so, is it possible to indicate that both drivers are supported? Is the idea of supporting two drivers doable?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苍景流年 2024-08-31 10:20:06

在 Windows 上,可以有两个受支持的驱动程序。事实上,要获得 Microsoft 徽标认证,USB 设备必须支持此功能。 (要求 CONNECT-0123

但是,UI Microsoft 不提供您所描述的行为。驱动程序选择是自动的。

您的 USB 设备可能表明它支持两个接口。在这种情况下,两个驱动程序都会被加载。

On Windows, having two supported drivers is possible. In fact, to get Microsoft Logo certification, it is mandatory that the USB device supports this functionality. (Requirement CONNECT-0123)

However, the UI behavior you describe isn't offered by Microsoft. Driver selection is automatic.

Your USB device can indicate it supports two interfaces. In that case, both drivers will be loaded.

留蓝 2024-08-31 10:20:06

我确信设备不可能同时使用两个驱动程序,但设备可以使用一种类类型和驱动程序进行枚举,然后在其操作期间响应 USB 上的某些命令或设备的操作,使其断开连接,然后使用第二个驱动程序重新枚举为不同类型的设备。

例如,我正在开发的产品通常枚举为 CDC(串行端口仿真),但当我需要重新加载代码时,它会重新枚举为不同的设备类型,并使用芯片供应商提供的驱动程序来执行代码下载。一旦完成,设备将再次将自身重新枚举为 CDC 设备类型,并恢复其串行端口模拟。

因此,您需要提供一个“命令”接口来触发两种操作模式之间的转换,并确保主机上安装了两个驱动程序以准备进行模式切换。

I am sure that it is not possible for a device to use two drivers at the same time but what is possible is for the device to enumerate using one class type and driver and then during its operation, in response to some command over the USB or operation of the device, for it to disconnect and then re-enumerate as a different type of device using the second driver.

As an example the product that I am developing normally enumerates as a CDC (serial port emulation) but when I need to reload the code it re-enumerates as a different device type and uses the chip vendor supplied driver to perform the code download. Once this completes then the device re-enumerates itself again as a CDC device type and resumes its serial port emulation.

You therefore need to provide a "command" interface that will trigger the transition between the two operating modes and to ensure that the two drivers are installed on the host computer ready for the mode switch.

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