Skip to content

Commit 1aaa72b

Browse files
committed
Wrapped tinyusb_interface_names in #if
1 parent a642825 commit 1aaa72b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/esp32/esp32-hal-tinyusb.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -646,11 +646,13 @@ static void usb_device_task(void *param) {
646646
/*
647647
* PUBLIC API
648648
* */
649+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
650+
const char *tinyusb_interface_names[USB_INTERFACE_MAX] = {"MSC", "DFU", "HID", "VENDOR", "CDC", "MIDI", "CUSTOM"};
651+
#endif
649652
static bool tinyusb_is_initialized = false;
650653

651654
esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb)
652655
{
653-
const char *tinyusb_interface_names[USB_INTERFACE_MAX] = {"MSC", "DFU", "HID", "VENDOR", "CDC", "MIDI", "CUSTOM"};
654656
if(tinyusb_is_initialized){
655657
log_e("TinyUSB has already started! Interface %s not enabled", (interface >= USB_INTERFACE_MAX)?"":tinyusb_interface_names[interface]);
656658
return ESP_FAIL;

0 commit comments

Comments
 (0)