Simplify MIDI interrupts. #25
Merged
Conversation
Interrupts to call MIDI functions were doing a lot of work, especially MIDI write. Rather than doing the heavy lifting in the interrupt, the interrupt just sets a flag that a MIDI write or read should be done, and the main loop will do that at next possible opportunity and cancel the flag.
|
Cool. I'll give this a test today. :) |
|
Code looks good. Built it and everything tested out positively on my pre-MUX 16n. Banged the hell out of it with the latest TT beta (A235649) and saw no problems. USB MIDI also working and responsive. I don't have a MUX 16n to test on right now. Nor did I hook any Serial MIDI devices up. |
Because our interrupt code is now only setting one thing - the "shouldDoMidi" booleans - we don't need to disable it inside the I2C functionality, I don't think. So let's tear it out here.
|
hey - just saw you posted this. tested the exact same change at home the other day and it looked good on my pre-mux 16n. |
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.
Interrupts to call MIDI functions were doing a lot of work, especially MIDI write. Rather than doing the heavy lifting in the interrupt, the interrupt just sets a flag that a MIDI write or read should be done, and the main loop will do that at next possible opportunity and cancel the flag.
This seeks to resolve some issues reported by @altitude909 amongst others.