fix midi tx fifo overflow cause data corruption

rename
This commit is contained in:
hathach
2021-04-02 13:26:55 +07:00
parent 949ff791e0
commit 080b14b292
6 changed files with 127 additions and 49 deletions

View File

@@ -172,7 +172,7 @@ void midi_task(void)
// regardless of these being used or not. Therefore incoming traffic should be read
// (possibly just discarded) to avoid the sender blocking in IO
uint8_t packet[4];
while(tud_midi_available()) tud_midi_receive(packet);
while( tud_midi_available() ) tud_midi_packet_read(packet);
// send note every 1000 ms
if (board_millis() - start_ms < 286) return; // not enough time