- Notifications
You must be signed in to change notification settings - Fork7.8k
feat(usb): allow the MIDI constructor to define a device name#11720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
+119 −2
Merged
Changes fromall commits
Commits
Show all changes
31 commits Select commitHold shift + click to select a range
87819f6 feat(usb): allow the MIDI constructor to define a device name
SuGlidere8d506c feat(usb): changes the MIDI device descriptor in the example
SuGlider36ac341 feat(usb): changes the MIDI device descriptor in the example
SuGlider74fa530 fix(usb): typo in commentary - start CI again
SuGlider5af16d1 feat(usb): allow the MIDI constructor to define a device name
SuGlider8bb446b fix(usb): correct constructor declaration
SuGliderfdd6ccd fix(usb): typo in commentary - start CI again
SuGlider473a4c6 feat(usb_midi): Enhance USBMIDI with device name
SuGlider75d04db feat(usb_midi): Refactor USBMIDI with device name handling
SuGliderb3fbce7 feat(usb_midi): Add macro to set USB MIDI device name
SuGliderc930bc1 feat(usb_midi): demonstrate the use of macro to change the device name
SuGlider40fbd4f fix(usb_midi): reduce changes to the code
SuGlider059a037 Merge branch 'master' into feature/device_name_usb_midi
SuGliderfb36be8 fix(usb_midi): Add macro guards
SuGlider2f4667a Merge branch 'master' into feature/device_name_usb_midi
SuGliderb7b61c3 feat(midi): add midi dev name from macro
SuGlider1b4aea2 feat(midi): Enhance USBMIDI device name handling
SuGlider60e4a0b feat(midi): USBMIDI class for device name
SuGlider219f838 fix(midi): comment typo
SuGlider10e1948 fix(rmt): fixes bad commentary formating
SuGlider62659c9 feat(rmt): more commentaries
SuGlider0d4dce2 fix(midi): move commentaries
SuGliderf3bd145 fix(midi): move commentaries
SuGliderc5cb5f0 feat(midi): add more commentaries
SuGliderfa7d041 fix(midi): fixes constructor commentary
SuGliderce55c99 fix(midi): safeguard for memory leak
SuGliderc14e769 fix(midi): removes debug logging
SuGlider861abb9 feat(midi): explicit safer test and return
SuGlider3f59ac6 feat(midi): avoids possible strlen(NULL)
SuGliderd9f89b8 Merge branch 'master' into feature/device_name_usb_midi
SuGlider4bca706 ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot]File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -222,6 +222,22 @@ size_t getArduinoLoopTaskStackSize(void); | ||
| return sz; \ | ||
| } | ||
| #define ESP32_USB_MIDI_DEFAULT_NAME "TinyUSB MIDI" | ||
| /** | ||
| * @brief Set the current device name | ||
| * 1. Name set via constructor (if any) | ||
| * 2. Name set via SET_USB_MIDI_DEVICE_NAME() macro (if defined) | ||
| * 3. Default name "TinyUSB MIDI" | ||
| * If device name is set as "", it will be ignored | ||
| */ | ||
| #define SET_USB_MIDI_DEVICE_NAME(name) \ | ||
SuGlider marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| const char *getUSBMIDIDefaultDeviceName() { \ | ||
| if (!name || strlen(name) == 0) { \ | ||
| return ESP32_USB_MIDI_DEFAULT_NAME; \ | ||
| } \ | ||
| return name; \ | ||
| } | ||
| bool shouldPrintChipDebugReport(void); | ||
| #define ENABLE_CHIP_DEBUG_REPORT \ | ||
| bool shouldPrintChipDebugReport(void) { \ | ||
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
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
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.