diff options
| author | hathach <[email protected]> | 2020-05-28 13:48:02 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-05-28 13:48:02 +0700 |
| commit | 10cd3f24bf0af9b7a1f357505ebbb5ef2132e34b (patch) | |
| tree | 36c1c14d5d53651ab32bdc0b08e15278da92ed57 /src/class/midi | |
| parent | c1db36a15c1e38adc142ec74fd5f3b0320053cc9 (diff) | |
initial transfer failed in open() shouldn't cause the driver open to fail.
Diffstat (limited to 'src/class/midi')
| -rw-r--r-- | src/class/midi/midi_device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 69dafe0a0..14fb3e50d 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -359,7 +359,11 @@ uint16_t midid_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint } // Prepare for incoming data - TU_ASSERT( usbd_edpt_xfer(rhport, p_midi->ep_out, p_midi->epout_buf, CFG_TUD_MIDI_EPSIZE), 0 ); + if ( !usbd_edpt_xfer(rhport, p_midi->ep_out, p_midi->epout_buf, CFG_TUD_MIDI_EPSIZE) ) + { + TU_LOG1_FAILED(); + TU_BREAKPOINT(); + } return drv_len; } |
