File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,9 @@ size_t getArduinoLoopTaskStackSize(void);
222222 return sz; \
223223 }
224224
225+ #if CONFIG_TINYUSB_MIDI_ENABLE
226+ // Forward declaration of USBMIDI class for the SET_USB_MIDI_DEVICE_NAME macro
227+ #include " USB/USBMIDI.h"
225228#define SET_USB_MIDI_DEVICE_NAME (name ) \
226229 namespace { \
227230 static const char * _usb_midi_default_name = name; \
@@ -231,7 +234,17 @@ size_t getArduinoLoopTaskStackSize(void);
231234 } \
232235 } _usb_midi_name_setter; \
233236 }
234-
237+ #else
238+ #define SET_USB_MIDI_DEVICE_NAME (name ) \
239+ namespace { \
240+ static struct _USBMIDINameSetter { \
241+ _USBMIDINameSetter () { \
242+ log_e (" USB MIDI is not enabled. Enable it in menuconfig under Component Config -> TinyUSB -> CDC Enable" ); \
243+ } \
244+ } _usb_midi_name_setter; \
245+ }
246+ #endif
247+
235248bool shouldPrintChipDebugReport (void );
236249#define ENABLE_CHIP_DEBUG_REPORT \
237250 bool shouldPrintChipDebugReport (void ) { \
You can’t perform that action at this time.
0 commit comments