Merge pull request #349 from adafruit/develop
sync with tinyusb core from samd with folowing PRs
This commit is contained in:
4 files changed
+205
-71
No files matched your search
@@ -34,6 +34,14 @@
|
||||
#define USB_PRODUCT "Unknown"
|
||||
#endif
|
||||
|
||||
#ifndef USB_LANGUAGE
|
||||
#define USB_LANGUAGE 0x0409 // default is English
|
||||
#endif
|
||||
|
||||
#ifndef USB_CONFIG_POWER
|
||||
#define USB_CONFIG_POWER 100
|
||||
#endif
|
||||
|
||||
extern uint8_t load_serial_number(uint16_t* serial_str);
|
||||
|
||||
Adafruit_USBD_Device USBDevice;
|
||||
@@ -76,14 +84,20 @@ Adafruit_USBD_Device::Adafruit_USBD_Device(void)
|
||||
.bConfigurationValue = 1,
|
||||
.iConfiguration = 0x00,
|
||||
.bmAttributes = TU_BIT(7) | TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP,
|
||||
.bMaxPower = TUSB_DESC_CONFIG_POWER_MA(100)
|
||||
.bMaxPower = TUSB_DESC_CONFIG_POWER_MA(USB_CONFIG_POWER)
|
||||
};
|
||||
|
||||
memcpy(_desc_cfg, &dev_cfg, sizeof(tusb_desc_configuration_t));
|
||||
memcpy(_desc_cfg_buffer, &dev_cfg, sizeof(tusb_desc_configuration_t));
|
||||
_desc_cfg = _desc_cfg_buffer;
|
||||
_desc_cfg_maxlen = sizeof(_desc_cfg_buffer);
|
||||
_desc_cfg_len = sizeof(tusb_desc_configuration_t);
|
||||
|
||||
_desc_cfglen = sizeof(tusb_desc_configuration_t);
|
||||
_itf_count = 0;
|
||||
_epin_count = _epout_count = 1;
|
||||
_itf_count = 0;
|
||||
_epin_count = _epout_count = 1;
|
||||
|
||||
_language_id = USB_LANGUAGE;
|
||||
_manufacturer = USB_MANUFACTURER;
|
||||
_product = USB_PRODUCT;
|
||||
}
|
||||
|
||||
// Add interface descriptor
|
||||
@@ -91,8 +105,8 @@ Adafruit_USBD_Device::Adafruit_USBD_Device(void)
|
||||
// - Endpoint number is updated to be unique
|
||||
bool Adafruit_USBD_Device::addInterface(Adafruit_USBD_Interface& itf)
|
||||
{
|
||||
uint8_t* desc = _desc_cfg+_desc_cfglen;
|
||||
uint16_t const len = itf.getDescriptor(_itf_count, desc, sizeof(_desc_cfg)-_desc_cfglen);
|
||||
uint8_t* desc = _desc_cfg+_desc_cfg_len;
|
||||
uint16_t const len = itf.getDescriptor(_itf_count, desc, _desc_cfg_maxlen-_desc_cfg_len);
|
||||
uint8_t* desc_end = desc+len;
|
||||
|
||||
if ( !len ) return false;
|
||||
@@ -113,19 +127,29 @@ bool Adafruit_USBD_Device::addInterface(Adafruit_USBD_Interface& itf)
|
||||
desc += desc[0]; // next
|
||||
}
|
||||
|
||||
_desc_cfglen += len;
|
||||
_desc_cfg_len += len;
|
||||
|
||||
// Update configuration descriptor
|
||||
tusb_desc_configuration_t* config = (tusb_desc_configuration_t*)_desc_cfg;
|
||||
config->wTotalLength = _desc_cfglen;
|
||||
config->wTotalLength = _desc_cfg_len;
|
||||
config->bNumInterfaces = _itf_count;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Adafruit_USBD_Device::setDescriptorBuffer(uint8_t* buf, uint32_t buflen)
|
||||
{
|
||||
if (buflen < _desc_cfg_maxlen)
|
||||
return;
|
||||
|
||||
memcpy(buf, _desc_cfg, _desc_cfg_len);
|
||||
_desc_cfg = buf;
|
||||
_desc_cfg_maxlen = buflen;
|
||||
}
|
||||
|
||||
void Adafruit_USBD_Device::setID(uint16_t vid, uint16_t pid)
|
||||
{
|
||||
_desc_device.idVendor = vid;
|
||||
_desc_device.idVendor = vid;
|
||||
_desc_device.idProduct = pid;
|
||||
}
|
||||
|
||||
@@ -134,6 +158,22 @@ void Adafruit_USBD_Device::setVersion(uint16_t bcd)
|
||||
_desc_device.bcdUSB = bcd;
|
||||
}
|
||||
|
||||
|
||||
void Adafruit_USBD_Device::setLanguageDescriptor (uint16_t language_id)
|
||||
{
|
||||
_language_id = language_id;
|
||||
}
|
||||
|
||||
void Adafruit_USBD_Device::setManufacturerDescriptor(const char *s)
|
||||
{
|
||||
_manufacturer = s;
|
||||
}
|
||||
|
||||
void Adafruit_USBD_Device::setProductDescriptor(const char *s)
|
||||
{
|
||||
_product = s;
|
||||
}
|
||||
|
||||
bool Adafruit_USBD_Device::begin(void)
|
||||
{
|
||||
return true;
|
||||
@@ -157,6 +197,84 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
|
||||
return USBDevice._desc_cfg;
|
||||
}
|
||||
|
||||
static int utf8_to_unichar(const char *str8, int *unicharp)
|
||||
{
|
||||
int unichar;
|
||||
int len;
|
||||
|
||||
if (str8[0] < 0x80)
|
||||
len = 1;
|
||||
else if ((str8[0] & 0xe0) == 0xc0)
|
||||
len = 2;
|
||||
else if ((str8[0] & 0xf0) == 0xe0)
|
||||
len = 3;
|
||||
else if ((str8[0] & 0xf8) == 0xf0)
|
||||
len = 4;
|
||||
else if ((str8[0] & 0xfc) == 0xf8)
|
||||
len = 5;
|
||||
else if ((str8[0] & 0xfe) == 0xfc)
|
||||
len = 6;
|
||||
else
|
||||
return -1;
|
||||
|
||||
switch (len) {
|
||||
case 1:
|
||||
unichar = str8[0];
|
||||
break;
|
||||
case 2:
|
||||
unichar = str8[0] & 0x1f;
|
||||
break;
|
||||
case 3:
|
||||
unichar = str8[0] & 0x0f;
|
||||
break;
|
||||
case 4:
|
||||
unichar = str8[0] & 0x07;
|
||||
break;
|
||||
case 5:
|
||||
unichar = str8[0] & 0x03;
|
||||
break;
|
||||
case 6:
|
||||
unichar = str8[0] & 0x01;
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 1; i < len; i++) {
|
||||
if ((str8[i] & 0xc0) != 0x80)
|
||||
return -1;
|
||||
unichar <<= 6;
|
||||
unichar |= str8[i] & 0x3f;
|
||||
}
|
||||
|
||||
*unicharp = unichar;
|
||||
return len;
|
||||
}
|
||||
|
||||
// Simple UCS-2/16-bit coversion, which handles the Basic Multilingual Plane
|
||||
static int strcpy_uni16(const char *s, uint16_t *buf, int bufsize) {
|
||||
int i = 0;
|
||||
int buflen = 0;
|
||||
|
||||
while (i < bufsize) {
|
||||
int unichar;
|
||||
int utf8len = utf8_to_unichar(s + i, &unichar);
|
||||
|
||||
if (utf8len < 0) {
|
||||
// Invalid utf8 sequence, skip it
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
i += utf8len;
|
||||
|
||||
// If the codepoint is larger than 16 bit, skip it
|
||||
if (unichar <= 0xffff)
|
||||
buf[buflen++] = unichar;
|
||||
}
|
||||
|
||||
buf[buflen] = '\0';
|
||||
return buflen;
|
||||
}
|
||||
|
||||
// up to 32 unicode characters (header make it 33)
|
||||
static uint16_t _desc_str[33];
|
||||
|
||||
@@ -169,25 +287,16 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
// language = English
|
||||
_desc_str[1] = 0x0409;
|
||||
_desc_str[1] = USBDevice.getLanguageDescriptor();
|
||||
chr_count = 1;
|
||||
break;
|
||||
|
||||
case 1: // Manufacturer
|
||||
case 2: // Product
|
||||
{
|
||||
char const * str = (index == 1) ? USB_MANUFACTURER : USB_PRODUCT;
|
||||
case 1:
|
||||
chr_count = strcpy_uni16(USBDevice.getManufacturerDescriptor(), _desc_str + 1, 32);
|
||||
break;
|
||||
|
||||
// cap at max char
|
||||
chr_count = strlen(str);
|
||||
if ( chr_count > 32 ) chr_count = 32;
|
||||
|
||||
for(uint8_t i=0; i<chr_count; i++)
|
||||
{
|
||||
_desc_str[1+i] = str[i];
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
chr_count = strcpy_uni16(USBDevice.getProductDescriptor(), _desc_str + 1, 32);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@@ -198,8 +307,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
default: return NULL;
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
||||
@@ -38,21 +38,37 @@ class Adafruit_USBD_Device
|
||||
private:
|
||||
tusb_desc_device_t _desc_device;
|
||||
|
||||
uint8_t _desc_cfg[256];
|
||||
uint16_t _desc_cfglen;
|
||||
uint8_t *_desc_cfg;
|
||||
uint16_t _desc_cfg_maxlen;
|
||||
uint16_t _desc_cfg_len;
|
||||
uint8_t _desc_cfg_buffer[256];
|
||||
|
||||
uint8_t _itf_count;
|
||||
|
||||
uint8_t _epin_count;
|
||||
uint8_t _epout_count;
|
||||
|
||||
uint16_t _language_id;
|
||||
const char *_manufacturer;
|
||||
const char *_product;
|
||||
|
||||
public:
|
||||
Adafruit_USBD_Device(void);
|
||||
|
||||
bool addInterface(Adafruit_USBD_Interface& itf);
|
||||
void setDescriptorBuffer(uint8_t* buf, uint32_t buflen);
|
||||
|
||||
void setID(uint16_t vid, uint16_t pid);
|
||||
void setVersion(uint16_t bcd);
|
||||
|
||||
void setLanguageDescriptor(uint16_t language_id);
|
||||
void setManufacturerDescriptor(const char *s);
|
||||
void setProductDescriptor(const char *s);
|
||||
|
||||
uint16_t getLanguageDescriptor (void) { return _language_id; }
|
||||
const char *getManufacturerDescriptor (void) { return _manufacturer; }
|
||||
const char *getProductDescriptor (void) { return _product; }
|
||||
|
||||
bool begin(void);
|
||||
|
||||
bool mounted (void) { return tud_mounted(); }
|
||||
|
||||
@@ -469,15 +469,6 @@ static inline uint8_t tu_desc_len(void const* desc)
|
||||
return ((uint8_t const*) desc)[DESC_OFFSET_LEN];
|
||||
}
|
||||
|
||||
// Length of the string descriptors in bytes with slen characters
|
||||
#define TUD_DESC_STRLEN(_chr_count) (2*(_chr_count) + 2)
|
||||
|
||||
// Header of string descriptors with len + string type
|
||||
#define TUD_DESC_STR_HEADER(_chr_count) ( (uint16_t) ( (TUSB_DESC_STRING << 8 ) | TUD_DESC_STRLEN(_chr_count)) )
|
||||
|
||||
// Convert comma-separated string to descriptor unicode format
|
||||
#define TUD_DESC_STRCONV( ... ) (const uint16_t[]) { TUD_DESC_STR_HEADER(TU_ARGS_NUM(__VA_ARGS__)), __VA_ARGS__ }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -143,11 +143,6 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
|
||||
0xDF, 0x60, 0xDD, 0xD8, 0x89, 0x45, 0xC7, 0x4C, \
|
||||
0x9C, 0xD2, 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F
|
||||
|
||||
//------------- WebUSB URL -------------//
|
||||
// used to init tusb_desc_webusb_url_t
|
||||
#define TUD_WEBUSB_URL_DESCRIPTOR(_scheme, _url) \
|
||||
{ 3 + sizeof(_url) - 1, 3, _scheme, _url }
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Configuration & Interface Descriptor Templates
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -211,7 +206,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
|
||||
// Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
|
||||
#define TUD_HID_DESCRIPTOR(_itfnum, _stridx, _boot_protocol, _report_desc_len, _epin, _epsize, _ep_interval) \
|
||||
/* Interface */\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 1, TUSB_CLASS_HID, (_boot_protocol) ? HID_SUBCLASS_BOOT : 0, _boot_protocol, _stridx,\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 1, TUSB_CLASS_HID, (uint8_t)((_boot_protocol) ? HID_SUBCLASS_BOOT : 0), _boot_protocol, _stridx,\
|
||||
/* HID descriptor */\
|
||||
9, HID_DESC_TYPE_HID, U16_TO_U8S_LE(0x0111), 0, 1, HID_DESC_TYPE_REPORT, U16_TO_U8S_LE(_report_desc_len),\
|
||||
/* Endpoint In */\
|
||||
@@ -224,7 +219,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
|
||||
// Interface number, string index, protocol, report descriptor len, EP OUT & IN address, size & polling interval
|
||||
#define TUD_HID_INOUT_DESCRIPTOR(_itfnum, _stridx, _boot_protocol, _report_desc_len, _epout, _epin, _epsize, _ep_interval) \
|
||||
/* Interface */\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 2, TUSB_CLASS_HID, (_boot_protocol) ? HID_SUBCLASS_BOOT : 0, _boot_protocol, _stridx,\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 2, TUSB_CLASS_HID, (uint8_t)((_boot_protocol) ? HID_SUBCLASS_BOOT : 0), _boot_protocol, _stridx,\
|
||||
/* HID descriptor */\
|
||||
9, HID_DESC_TYPE_HID, U16_TO_U8S_LE(0x0111), 0, 1, HID_DESC_TYPE_REPORT, U16_TO_U8S_LE(_report_desc_len),\
|
||||
/* Endpoint Out */\
|
||||
@@ -234,37 +229,60 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
|
||||
|
||||
//------------- MIDI -------------//
|
||||
|
||||
// Length of template descriptor (96 bytes)
|
||||
#define TUD_MIDI_DESC_LEN (9 + 9 + 9 + 7 + 6 + 6 + 9 + 9 + 7 + 5 + 7 + 5)
|
||||
#define TUD_MIDI_DESC_HEAD_LEN (9 + 9 + 9 + 7)
|
||||
#define TUD_MIDI_DESC_HEAD(_itfnum, _stridx, _numcables) \
|
||||
/* Audio Control (AC) Interface */\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\
|
||||
/* AC Header */\
|
||||
9, TUSB_DESC_CS_INTERFACE, AUDIO_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(0x0009), 1, (uint8_t)((_itfnum) + 1),\
|
||||
/* MIDI Streaming (MS) Interface */\
|
||||
9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum) + 1), 0, 2, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_MIDI_STREAMING, AUDIO_PROTOCOL_V1, 0,\
|
||||
/* MS Header */\
|
||||
7, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(7 + (_numcables) * TUD_MIDI_DESC_JACK_LEN)
|
||||
|
||||
#define TUD_MIDI_JACKID_IN_EMB(_cablenum) \
|
||||
(uint8_t)(((_cablenum) - 1) * 4 + 1)
|
||||
|
||||
#define TUD_MIDI_JACKID_IN_EXT(_cablenum) \
|
||||
(uint8_t)(((_cablenum) - 1) * 4 + 2)
|
||||
|
||||
#define TUD_MIDI_JACKID_OUT_EMB(_cablenum) \
|
||||
(uint8_t)(((_cablenum) - 1) * 4 + 3)
|
||||
|
||||
#define TUD_MIDI_JACKID_OUT_EXT(_cablenum) \
|
||||
(uint8_t)(((_cablenum) - 1) * 4 + 4)
|
||||
|
||||
#define TUD_MIDI_DESC_JACK_LEN (6 + 6 + 9 + 9)
|
||||
#define TUD_MIDI_DESC_JACK(_cablenum) \
|
||||
/* MS In Jack (Embedded) */\
|
||||
6, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_IN_JACK, MIDI_JACK_EMBEDDED, TUD_MIDI_JACKID_IN_EMB(_cablenum), 0,\
|
||||
/* MS In Jack (External) */\
|
||||
6, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_IN_JACK, MIDI_JACK_EXTERNAL, TUD_MIDI_JACKID_IN_EXT(_cablenum), 0,\
|
||||
/* MS Out Jack (Embedded), connected to In Jack External */\
|
||||
9, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_OUT_JACK, MIDI_JACK_EMBEDDED, TUD_MIDI_JACKID_OUT_EMB(_cablenum), 1, TUD_MIDI_JACKID_IN_EXT(_cablenum), 1, 0,\
|
||||
/* MS Out Jack (External), connected to In Jack Embedded */\
|
||||
9, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_OUT_JACK, MIDI_JACK_EXTERNAL, TUD_MIDI_JACKID_OUT_EXT(_cablenum), 1, TUD_MIDI_JACKID_IN_EMB(_cablenum), 1, 0
|
||||
|
||||
#define TUD_MIDI_DESC_EP_LEN(_numcables) (7 + 4 + (_numcables))
|
||||
#define TUD_MIDI_DESC_EP(_epout, _epsize, _numcables) \
|
||||
/* Endpoint */\
|
||||
7, TUSB_DESC_ENDPOINT, _epout, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\
|
||||
/* MS Endpoint (connected to embedded jack) */\
|
||||
(uint8_t)(4 + (_numcables)), TUSB_DESC_CS_ENDPOINT, MIDI_CS_ENDPOINT_GENERAL, _numcables
|
||||
|
||||
// Length of template descriptor (88 bytes)
|
||||
#define TUD_MIDI_DESC_LEN (TUD_MIDI_DESC_HEAD_LEN + TUD_MIDI_DESC_JACK_LEN + TUD_MIDI_DESC_EP_LEN(1) * 2)
|
||||
|
||||
// MIDI simple descriptor
|
||||
// - 1 Embedded Jack In connected to 1 External Jack Out
|
||||
// - 1 Embedded Jack out connected to 1 External Jack In
|
||||
#define TUD_MIDI_DESCRIPTOR(_itfnum, _stridx, _epout, _epin, _epsize) \
|
||||
/* Audio Control (AC) Interface */\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\
|
||||
/* AC Header */\
|
||||
9, TUSB_DESC_CS_INTERFACE, AUDIO_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(0x0009), 1, (uint8_t)((_itfnum)+1),\
|
||||
/* MIDI Streaming (MS) Interface */\
|
||||
9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum)+1), 0, 2, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_MIDI_STREAMING, AUDIO_PROTOCOL_V1, 0,\
|
||||
/* MS Header */\
|
||||
7, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(0x0025),\
|
||||
/* MS In Jack (Embedded) */\
|
||||
6, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_IN_JACK, MIDI_JACK_EMBEDDED, 1, 0,\
|
||||
/* MS In Jack (External) */\
|
||||
6, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_IN_JACK, MIDI_JACK_EXTERNAL, 2, 0,\
|
||||
/* MS Out Jack (Embedded), connected to In Jack External */\
|
||||
9, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_OUT_JACK, MIDI_JACK_EMBEDDED, 3, 1, 2, 1, 0,\
|
||||
/* MS Out Jack (External), connected to In Jack Embedded */\
|
||||
9, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_OUT_JACK, MIDI_JACK_EXTERNAL, 4, 1, 1, 1, 0,\
|
||||
/* Endpoint Out */\
|
||||
7, TUSB_DESC_ENDPOINT, _epout, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\
|
||||
/* MS Endpoint (connected to embedded jack in) */\
|
||||
5, TUSB_DESC_CS_ENDPOINT, MIDI_CS_ENDPOINT_GENERAL, 1, 1,\
|
||||
/* Endpoint In */\
|
||||
7, TUSB_DESC_ENDPOINT, _epin, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\
|
||||
/* MS Endpoint (connected to embedded jack out) */\
|
||||
5, TUSB_DESC_CS_ENDPOINT, MIDI_CS_ENDPOINT_GENERAL, 1, 3
|
||||
TUD_MIDI_DESC_HEAD(_itfnum, _stridx, 1),\
|
||||
TUD_MIDI_DESC_JACK(1),\
|
||||
TUD_MIDI_DESC_EP(_epout, _epsize, 1),\
|
||||
TUD_MIDI_JACKID_IN_EMB(1),\
|
||||
TUD_MIDI_DESC_EP(_epin, _epsize, 1),\
|
||||
TUD_MIDI_JACKID_OUT_EMB(1)
|
||||
|
||||
//------------- Vendor -------------//
|
||||
#define TUD_VENDOR_DESC_LEN (9+7+7)
|
||||
|
||||
Reference in new issue
Block a user