- tusb_desc_device_t const desc_device =
- {
- .bLength = sizeof(tusb_desc_device_t),
- .bDescriptorType = TUSB_DESC_DEVICE,
- .bcdUSB = 0x0110,
- .bDeviceClass = 0x00,
- .bDeviceSubClass = 0x00,
- .bDeviceProtocol = 0x00,
- .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
- .idVendor = 0xCafe,
- .idProduct = USB_PID,
- .bcdDevice = 0x0100,
- .iManufacturer = 0x01,
- .iProduct = 0x02,
- .iSerialNumber = 0x03,
- .bNumConfigurations = 0x01
- };
- char const* string_desc_arr [] =
- {
- (const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409)
- "TinyUSB", // 1: Manufacturer
- "TinyUSB Device", // 2: Product
- "123456", // 3: Serials, should use chip ID
- };
我还是想重点吐槽一下,这次提供的例程和SDK是两个工作组写的吗?对于同一款单片机最基本的规范都不统一吗?我很费解,想要移植需要修改大量的宏定义,要搞统一是不是先把自己的对外代码先统一。