summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorDuddie <[email protected]>2021-02-28 22:18:35 +0800
committerDuddie <[email protected]>2021-02-28 22:18:35 +0800
commit72c1066ed152916cb99dee5e5749b78916d4ba76 (patch)
tree9f3b126e22808d1cad73539202568bf74695d825 /src/device
parentc61464ebaaebaf7571e07e7e59d2645967d8d7c2 (diff)
Fix Endpoint descriptor for MIDI Device
Endpoint descriptor should be 9 bytes in length (not 7) and have two extra bytes at the end: bRefresh and bSynchAddress According to MIDI USB specification 1.0 (6.2.1 Standard MS Bulk Data Endpoint Descriptor)
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index b5f7dceba..8aeb6aff8 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -289,10 +289,10 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
/* MS Out Jack (External), connected to In Jack Embedded */\
9, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_OUT_JACK, MIDI_JACK_EXTERNAL, TUD_MIDI_JACKID_OUT_EXT(_cablenum), 1, TUD_MIDI_JACKID_IN_EMB(_cablenum), 1, 0
-#define TUD_MIDI_DESC_EP_LEN(_numcables) (7 + 4 + (_numcables))
+#define TUD_MIDI_DESC_EP_LEN(_numcables) (9 + 4 + (_numcables))
#define TUD_MIDI_DESC_EP(_epout, _epsize, _numcables) \
/* Endpoint */\
- 7, TUSB_DESC_ENDPOINT, _epout, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\
+ 9, TUSB_DESC_ENDPOINT, _epout, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0, 0, 0, \
/* MS Endpoint (connected to embedded jack) */\
(uint8_t)(4 + (_numcables)), TUSB_DESC_CS_ENDPOINT, MIDI_CS_ENDPOINT_GENERAL, _numcables