Suggestion: Optionally include custom USB Desc. header from user's project

Hi all,

I'm building a project where I want a unique combination of USB endpoints (ones provided with Teensyduino), and going from the helpful instructions in usb_desc.h, I've successfully made my own combination of #defines to get there. However, from a project maintenance standpoint, I would prefer to not have to carry around a personal branch in my fork of the cores repo that has the modified header file, which seems to be the lowest-maintenance option as things currently stand.

Instead, is there any interest in a new feature to allow a user project to extend the definitions by providing a custom header file (usb_user_desc.h?) that gets included if something like INCLUDE_USB_USER_DESC is provided at build time? A sample file could come with Teensyduino, along with updated instructions, and an update to usb_undef.h for undef'ing the new header guard. I've already implemented something like this in a branch, and would be happy to submit a merge request, but wanted to bring it up for discussion first.
 
Back
Top