关于 Compound Device 和 Composite Device

关于 Compound Device 和 Composite Device

A host includes an embedded hub called the root hub. The host provides one or more attachment points via the root hub.

USB devices that provide additional functionality to the host are known as functions.

To prevent circular attachments, a tiered ordering is imposed on the star topology of the USB.

为了防止循环连接,对 USB 的星形拓扑施加了分层排序。

Root Hub:根集线器,提供 attachment points

functions:为主机提供附加功能的USB 设备

Compound Device

Multiple functions may be packaged together in what appears to be a single physical device. For example, a keyboard and a trackball might be combined in a single package. Inside the package, the individual functions are permanently attached to a hub and it is the internal hub that is connected to the USB. When multiple functions are combined with a hub in a single package, they are referred to as a compound device. The hub and each function attached to the hub within the compound device is assigned its own device address. A device that has multiple interfaces controlled independently of each other is referred to as a composite device. A composite device has only a single device address. From the host’s perspective, a compound device is the same as a separate hub with multiple functions attached. Figure 5-5 also illustrates a compound device.

compound 特指两种或多种元素构成的化合物。
composite 通常可与compound换用,但倾向于指人为的或偶然的结合或凑合。

Compound Device 内嵌Hub和多个 Function,每个Function都相当于一个独立的USB外设,有自己的PID/VID/DID。
Composite Device 内只有一个 Function,只有一套PID/VID/DID,通过将不同的 interface 定义为不同的类来实现多个功能的组合。

posted on 2022-07-27 10:41  SangFun  阅读(463)  评论(0)    收藏  举报