|
|
@@ -24,7 +24,6 @@
|
|
|
*/
|
|
|
|
|
|
#include "tusb.h"
|
|
|
-#include "usb_descriptors.h"
|
|
|
|
|
|
/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
|
|
|
* Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC.
|
|
|
@@ -77,10 +76,8 @@ enum
|
|
|
{
|
|
|
ITF_NUM_CDC1 = 0,
|
|
|
ITF_NUM_CDC_DATA1,
|
|
|
-#if (CFG_TUD_CDC > 1)
|
|
|
ITF_NUM_CDC2,
|
|
|
ITF_NUM_CDC_DATA2,
|
|
|
-#endif
|
|
|
ITF_NUM_TOTAL
|
|
|
};
|
|
|
|
|
|
@@ -99,11 +96,11 @@ uint8_t const desc_configuration[] =
|
|
|
// Interface count, string index, total length, attribute, power in mA
|
|
|
TUD_CONFIG_DESCRIPTOR(ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
|
|
|
|
|
|
- // Interface number, string index, EP notification address and size, EP data address (out, in) and size.
|
|
|
+ // 1st CDC: Interface number, string index, EP notification address and size, EP data address (out, in) and size.
|
|
|
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC1, 4, 0x81, 8, EPNUM_CDC, 0x80 | EPNUM_CDC, 64),
|
|
|
-#if (CFG_TUD_CDC > 1)
|
|
|
+
|
|
|
+ // 2nd CDC: Interface number, string index, EP notification address and size, EP data address (out, in) and size.
|
|
|
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC2, 4, 0x83, 8, EPNUM_CDC + 2, 0x80 | (EPNUM_CDC + 2), 64),
|
|
|
-#endif
|
|
|
};
|
|
|
|
|
|
// Invoked when received GET CONFIGURATION DESCRIPTOR
|