Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify MIDI interrupts. #25

Merged
merged 3 commits into from Mar 17, 2019
Merged

Simplify MIDI interrupts. #25

merged 3 commits into from Mar 17, 2019

Conversation

@infovore
Copy link
Collaborator

@infovore infovore commented Feb 21, 2019

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.

@infovore infovore requested a review from bpcmusic Feb 21, 2019
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.
@infovore infovore force-pushed the simplify_midi_interrupts branch from d7c5d43 to 1eb60e8 Feb 21, 2019
@bpcmusic
Copy link
Contributor

@bpcmusic bpcmusic commented Feb 22, 2019

Cool. I'll give this a test today. :)

Copy link
Contributor

@bpcmusic bpcmusic left a comment

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.
@infovore
Copy link
Collaborator Author

@infovore infovore commented Mar 5, 2019

Hi @bpcmusic - I've just added ca33eda, which stops disabling interrupts inside the i2c code. @okyeron has tested this successfully - it stopped a crash he had - but putting it up here for review.

@bpcmusic
Copy link
Contributor

@bpcmusic bpcmusic commented Mar 8, 2019

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.

@infovore infovore merged commit b93a3e0 into master Mar 17, 2019
@infovore infovore deleted the simplify_midi_interrupts branch Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants