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

Enhance midi #766

Merged
merged 11 commits into from
Apr 2, 2021
Merged

Enhance midi #766

merged 11 commits into from
Apr 2, 2021

Conversation

hathach
Copy link
Owner

@hathach hathach commented Apr 2, 2021

Describe the PR
Fix #735. should also fix root cause of #377 . should also fix issue with adafruit/circuitpython#4190
Root cause of the issue is TX fifo is overflow, though it is not handled safely by driver, which cause the data corruption to the usbd device control and cause the system to crash/hardfault. While fixing the issue, I have go through the whole improvement, including

  • Adding MIDI_CIN_ and MIDI_STATUS_ instead of using magic number in stream API
  • Rename read(), write() to stream_read(), stream_write() with deprecated warning
  • Rename receive(), send() to packet_read(), packet_write() with deprecated warning
  • Refactor stream read/write buffering to stream read/write struct
  • Correct stream read() behavior to read until either user buffer is full or there is no more data from fifo
  • remove write24()

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.

midi: bad things happen if device doesn't read midi from host
1 participant