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);
222
222
return sz; \
223
223
}
224
224
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"
225
228
#define SET_USB_MIDI_DEVICE_NAME (name ) \
226
229
namespace { \
227
230
static const char * _usb_midi_default_name = name; \
@@ -231,7 +234,17 @@ size_t getArduinoLoopTaskStackSize(void);
231
234
} \
232
235
} _usb_midi_name_setter; \
233
236
}
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
+
235
248
bool shouldPrintChipDebugReport (void );
236
249
#define ENABLE_CHIP_DEBUG_REPORT \
237
250
bool shouldPrintChipDebugReport (void ) { \
You can’t perform that action at this time.
0 commit comments