Вопрос

I'm developing an embedded USB device which needs to be available to two different hosts. The first is a normal PC, where it will be used as a MSC (mass storage) device, and the second is a specific hardware which the USB device needs to comunicate with a CDC profile.

during the enumeration, the USB device send descriptor table where it declares its capabilities.

Is there a way in the enumeration process to know to which host the device was connected to ?

Это было полезно?

Решение

The simplest solution perhaps would be to implement a "USB Composite Device", where the single device presented both the MSC and CDC class interfaces simultaneously. The host PC would see both interfaces, but you could simply leave one unused. The "specific hardware" would probably simply ignore the MSC class if it had no support for it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top