本帖最后由 hsrzq 于 2024-6-26 18:47 编辑
可以修改接口关联描述符(IAD)的字符串描述符索引来修改友好名称
- 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, //bFunctionSubClass(Abstract Control Model);
- 0x01, //bFunctionProtocol(Common AT commands);
- 0x00, //iFunction(0);
复制代码
就是第20行的那个iFunction,换成一个字符串描述符索引就行了 |