Simplify ability to create custom USB devices including MTP#790
Open
h4yn0nnym0u5e wants to merge 5 commits intoPaulStoffregen:masterfrom
Open
Simplify ability to create custom USB devices including MTP#790h4yn0nnym0u5e wants to merge 5 commits intoPaulStoffregen:masterfrom
h4yn0nnym0u5e wants to merge 5 commits intoPaulStoffregen:masterfrom
Conversation
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.
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. |
Contributor
Author
|
Commit 4591d5c covers some of this, but not all of it... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.