usb_desc.c文件中:
- char code CONFIGDESC[141] =
- {
- // 配置描述符
- 0x09, //bLength(9);
- 0x02, //bDescriptorType(Configuration);
- 0x8d,0x00, //wTotalLength(141);
- 0x04, //bNumInterfaces(4);
- 0x01, //bConfigurationValue(1);
- 0x00, //iConfiguration(0);
- 0x80, //bmAttributes(BUSPower);
- 0x32, //MaxPower(100mA);
- // 串口1 接口关联描述符
- 0x08, //bLength(8);
- 0x0b, //bDescriptorType(IAD);
- 0x00, //bFirstInterface(0);
- 0x02, //bInterfaceCount(2);
- 0x02, //bFunctionClass(Communication Device Class);
- 0x02, //bInterfaceSubClass(Abstract Control Model);
- 0x01, //bInterfaceProtocol(Common AT commands);
- 0x00, //iInterface(0);
复制代码
注释中有误,
bInterfaceSubClass应该是bFunctionSubClass,这一字节是关联接口功能子类描述符
bInterfaceProtocol应该是bFunctionProtocol,这一字节是关联接口功能协议描述符
iInterface应该是iFunction,这一字节是关联接口功能字符串描述符索引 |