Skip to content

Simplify ability to create custom USB devices including MTP#790

Open
h4yn0nnym0u5e wants to merge 5 commits intoPaulStoffregen:masterfrom
h4yn0nnym0u5e:feature/MTP-mix
Open

Simplify ability to create custom USB devices including MTP#790
h4yn0nnym0u5e wants to merge 5 commits intoPaulStoffregen:masterfrom
h4yn0nnym0u5e:feature/MTP-mix

Conversation

@h4yn0nnym0u5e
Copy link
Contributor

Choices made in this commit relate to specific choices on the Arduino IDE Tools menu, rather than whether the MTP interface has been included as a consequence of the choice. This is inconsistent with other interfaces, e.g. MIDI, keyboard, Serial (CDC) etc. As a result, a custom mix of interfaces required edits to be made to the MTP sources as well (see this forum post).

This PR adopts the system used for other interfaces. It has been briefly tested, and appears to work OK.

Other interfaces which appear in the Tools/USB type
under multiple options were detected by the
existence of the <whatever>_INTERFACE macro in
usb_desc.h, allowing easy(-ish) generation of custom
USB mixes solely by editing usb_desc.h.

As noted in https://forum.pjrc.com/index.php?threads/how-to-teensy-as-all-in-one-serial-midi-keyboard-mouse-audio-mtp.77430/post-362830
this was broken for MTP, requiring editing of other
cores files. This commit aims to fix this issue.
Mixes including MIDI or extra serial ports wouldn't work properly.
@h4yn0nnym0u5e
Copy link
Contributor Author

Did a check over cores for other places where a specific Tools menu selection was checked, rather than the availability of a USB interface, and found a couple relating to MIDI and Serial.

@h4yn0nnym0u5e
Copy link
Contributor Author

Commit 4591d5c covers some of this, but not all of it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant