3.4.2.3.1 TPL Table Configuration for CDC Devices

The Host Layer attaches the CDC Host Client Driver to a device when the device class, subclass, protocol in the device descriptor or when the class, subclass and protocol fields in the Interface Association Descriptor (IAD) or Interface descriptor matches the entry in the TPL table. When specifying the entry for the CDC device, the entry for the CDC device, the driver interface must be set to USB_HOST_CDC_INTERFACE. This will attach the CDC Host Client Driver to the device when the USB Host matches the TPL entry to the device. The following code shows possible TPL table options for matching CDC Devices.

Example:

/* This code shows an example of TPL table entries for supporting CDC
 * devices. Note the driver interface is set to USB_HOST_CDC_INTERFACE. This
 * will load the CDC Host Client Driver when there is TPL match */
const USB_HOST_TPL_ENTRY USBTPList[1] =
{
    /* This entry looks for any CDC device. The CDC Host Client Driver will
     * check if this is an ACM device and will then load itself */
    TPL_INTERFACE_CLASS_SUBCLASS_PROTOCOL(USB_CDC_CLASS_CODE, USB_CDC_SUBCLASS_CODE, 0x0 , NULL,  USB_HOST_CDC_INTERFACE),

    /* This entry looks specifically for the communications class protocol.
     * This entry should be used if the host application is expected to support
     * CDC as a part of an composite device */
    TPL_INTERFACE_CLASS_SUBCLASS_PROTOCOLUSB_CDC_COMMUNICATIONS_INTERFACE_CLASS_CODE,  USB_CDC_SUBCLASS_ABSTRACT_CONTROL_MODEL, USB_CDC_PROTOCOL_AT_V250 , NULL,  USB_HOST_CDC_INTERFACE),

};