Skip to content

Commit 3afe3c5

Browse files
committed
enable tinyusb midi
1 parent 1959181 commit 3afe3c5

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

cores/nRF5/Adafruit_TinyUSB_Core/tinyusb/src/class/midi/midi_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static inline bool tud_midi_connected (void);
6969
static inline uint32_t tud_midi_available (void);
7070
static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize);
7171
static inline void tud_midi_read_flush (void);
72-
static inline uint32_t tud_midi_write (uint8_t jack_id, void const* buffer, uint32_t bufsize);
72+
static inline uint32_t tud_midi_write (uint8_t jack_id, uint8_t const* buffer, uint32_t bufsize);
7373
static inline uint32_t tudi_midi_write24 (uint8_t jack_id, uint8_t b1, uint8_t b2, uint8_t b3);
7474
static inline bool tud_midi_write_flush (void);
7575

@@ -108,7 +108,7 @@ static inline void tud_midi_read_flush (void)
108108
tud_midi_n_read_flush(0, 0);
109109
}
110110

111-
static inline uint32_t tud_midi_write (uint8_t jack_id, void const* buffer, uint32_t bufsize)
111+
static inline uint32_t tud_midi_write (uint8_t jack_id, uint8_t const* buffer, uint32_t bufsize)
112112
{
113113
return tud_midi_n_write(0, jack_id, buffer, bufsize);
114114
}

cores/nRF5/Adafruit_TinyUSB_Core/tusb_config.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,22 @@
5555
#define CFG_TUD_MSC 1
5656
#define CFG_TUD_HID 1
5757

58-
#define CFG_TUD_MIDI 0
58+
#define CFG_TUD_MIDI 1
5959
#define CFG_TUD_CUSTOM_CLASS 0
6060

61-
//------------- CDC -------------//
62-
63-
// FIFO size of CDC TX and RX
61+
// CDC FIFO size of TX and RX
6462
#define CFG_TUD_CDC_RX_BUFSIZE 256
6563
#define CFG_TUD_CDC_TX_BUFSIZE 256
6664

67-
//------------- MSC -------------//
68-
69-
// Buffer size of Device Mass storage
65+
// MSC Buffer size of Device Mass storage
7066
#define CFG_TUD_MSC_BUFSIZE 512
7167

72-
//------------- HID -------------//
73-
74-
// Should be sufficient to hold ID (if any) + Data
68+
// HID buffer size Should be sufficient to hold ID (if any) + Data
7569
#define CFG_TUD_HID_BUFSIZE 64
7670

71+
// MIDI FIFO size of TX and RX
72+
#define CFG_TUD_MIDI_RX_BUFSIZE 64
73+
#define CFG_TUD_MIDI_TX_BUFSIZE 64
7774

7875
#ifdef __cplusplus
7976
}

0 commit comments

Comments
 (0)