Content originally posted in LPCWare by Tsuneo on Thu Jan 17 03:46:29 MST 2013
<i>> Suppose I succeed to merge the descriptors so that enumeration sees HID+MSC devices, is this even reliable?</i>
Descriptor work is not enough.
You have to combine handlers of class-specific requests for these classes.
Also, as you pointed out, current version of NXPUSBlib (v0.98b) supports just single IN and single OUT endpoint, other than the default EP. To support more endpoints, you have to touch to these routines, so that these routines refer to specific buffer for the target endpoint.
usb_data_buffer_IN - Endpoint_Write_8(), Endpoint_ClearIN(), USB_ProcessInterrupt()
usb_data_buffer_OUT - Endpoint_ConfigureEndpoint(), Endpoint_Read_8(), Endpoint_ClearOUT(), etc.
Easiness of making composite device, especially for a composite device of the same class like HID + HID, is one of criteria to estimate maturity of the USB stack. In this aspect, LPC11Uxx USB on-chip drivers goes much more advanced than NXPUSBlib.
Tsuneo