Skip to content

Commit

Permalink
Hack to restart USB midi after failure
Browse files Browse the repository at this point in the history
  • Loading branch information
beserge committed Nov 29, 2023
1 parent b74da96 commit d4610c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hid/usb_midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ void MidiUsbTransport::Impl::Tx(uint8_t* buffer, size_t size)
} while(should_retry);

tx_ptr_ = 0;

if(result == UsbHandle::Result::ERR)
{
Init(config_);
}
}

void MidiUsbTransport::Impl::UsbToMidi(uint8_t* buffer, uint8_t length)
Expand Down

0 comments on commit d4610c0

Please sign in to comment.