6#if ARDUINO_USB_CDC_ON_BOOT
7#error USB Audio is only available in OTG mode, not CDC-on-boot mode
17#include "esp32-hal-tinyusb.h"
21class Emulated_TinyUSB;
75 if (itf) dev.config_.itf_num_ac = *itf;
76 uint16_t len = dev.getDescriptor(dst);
77 if (itf) *itf += dev.numInterfaces();
94 USB.usbClass(TUSB_CLASS_MISC);
95 USB.usbSubClass(MISC_SUBCLASS_COMMON);
96 USB.usbProtocol(MISC_PROTOCOL_IAD);
104 tinyusb_enable_interface(USB_INTERFACE_AUDIO, audio_len,
156 uint8_t n = tinyusb_get_free_in_endpoint();
158 LOGE(
"No free USB IN endpoint available");
161 return (int16_t)(0x80u | n);
165 uint8_t n = tinyusb_get_free_out_endpoint();
167 LOGE(
"No free USB OUT endpoint available");
228 if (!
device().begin_called)
return true;
229 return tud_mounted();
232 bool ready(
void) {
return tud_ready(); }
235 if (!
device().begin_called)
return true;
236 return tud_disconnect();
239 if (!
device().begin_called) {
244 return tud_connect();
If you want to use the framework w/o Arduino you need to provide the implementation of a couple of cl...
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define USB_DESCR_MAX_LEN
Definition USBAudioDeviceBase.h:47
#define assert(T)
Definition avr.h:10