I have a MIDI device made with an Atmega 32u4. I've removed the CDC class in a crude way by modifying the USBCore.cpp file (attached). This works to remove the CDC and have only the MIDI class, but the USB interface numbers now start at 2 instead of 0. This causes problems with some MIDI host hardware.
I'm having trouble finding where the interface numbers are defined. Presumably there's something after line 488 of the attached file (where it says: // Count and measure interfaces) that calculates the interface number, but with my basic understanding I don't follow what it does.
My question: Is there somewhere I could hard-code the interface numbers to start with 0 instead if 2? I could change it back if/when I need to turn the CDC class back on for debugging.
Thanks for your help!
USBCore.cpp (20.6 KB)