Skip to content

Commit c930bc1

Browse files
authored
feat(usb_midi): demonstrate the use of macro to change the device name
Updated MIDI device initialization to use default constructor.
1 parent b3fbce7 commit c930bc1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/USB/examples/MIDI/MidiInterface/MidiInterface.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ void setup() {}
2424
void loop() {}
2525
#else
2626

27+
// define a new USB MIDI device name using a macro
28+
SET_USB_MIDI_DEVICE_NAME("ESP MIDI Device")
29+
2730
#include "USB.h"
2831
#include "USBMIDI.h"
2932
// Creates the MIDI device with specific descriptor
30-
USBMIDI MIDI("ESP MIDI Device");
33+
USBMIDI MIDI();
3134

3235

3336
#define MIDI_RX 39

0 commit comments

Comments
 (0)