USB stack configurations
Class configuration:
This section describes a use case where two or more of the same classes are used in the composite device.
To reduce the footprint, the released USB stack does not support multiple instances of the same class in the default configuration. If two or more same classes are used in the composite device, the user needs to configure the class.
For HID class, USB_DEVICE_CONFIG_HID must be configured in the usb_device_config.h.
For CDC class, USB_DEVICE_CONFIG_CDC_ACM must be configured in the usb_device_config.h.
For MSD class, USB_DEVICE_CONFIG_MSC must be configured in the usb_device_config.h.
For AUDIO class, USB_DEVICE_CONFIG_AUDIO must be configured in the usb_device_config.h.
For PHDC class, USB_DEVICE_CONFIG_PHDC must be configured in the usb_device_config.h.
For VIDEO class, USB_DEVICE_CONFIG_VIDEO must be configured in the usb_device_config.h.
For CCID class, USB_DEVICE_CONFIG_CCID must be configured in the usb_device_config.h.
The value of the configuration depends on use cases and user requirements. For example, for the composite device HID+HID, the USB_DEVICE_CONFIG_HID must be set to 2.
Note: USBCFG_DEV_MAX_ENDPOINTS must not be less than “max used endpoint number + 1”. “max used endpoint number” indicates the maximum endpoint number that the example uses.