A USB Composite Device is a USB Device which uses more than one USB class.
In this use case, the "USB HID gamepad (Composite Device)" module is used to create a USB composite device. Thus, this USB module can be associated with another "Composite Device" module, like "USB MSC (Composite Device)".
Also, you can refer to application note AVR4902 ASF - USB Composite Device.
Setup steps
For the setup code of this use case to work, the basic use case must be followed.
Usage steps
Example code
Content of conf_usb.h:
*
* #define UDI_HID_gpd_IFACE_NUMBER X
*
* #define UDI_COMPOSITE_DESC_T \
* ...
* #define UDI_COMPOSITE_DESC_FS \
* .udi_hid_gpd = UDI_HID_gpd_DESC, \
* ...
* #define UDI_COMPOSITE_DESC_HS \
* .udi_hid_gpd = UDI_HID_gpd_DESC, \
* ...
* #define UDI_COMPOSITE_API \
* ...
*
Workflow
- Ensure that conf_usb.h is available and contains the following parameters required for a USB composite device configuration:
- Ensure that conf_usb.h contains the description of composite device:
*
*
* #define UDI_HID_gpd_IFACE_NUMBER X
- Ensure that conf_usb.h contains the following parameters required for a USB composite device configuration:
* #define UDI_COMPOSITE_DESC_T \
* ...
* ...
*
* #define UDI_COMPOSITE_DESC_FS \
* ...
* .udi_hid_gpd = UDI_HID_gpd_DESC, \
* ...
*
* #define UDI_COMPOSITE_DESC_HS \
* ...
* .udi_hid_gpd = UDI_HID_gpd_DESC, \
* ...
*
* #define UDI_COMPOSITE_API \
* ...
* ...
- Note
- The descriptors order given in the four lists above must be the same as the order defined by all interface indexes. The interface index orders are defined through UDI_X_IFACE_NUMBER defines.