From acfd967106995133e9a3e62b5efa152272e14e94 Mon Sep 17 00:00:00 2001 From: windowsair Date: Sun, 28 Jan 2024 21:17:39 +0800 Subject: [PATCH] feat(usb): change usb interface name to "Wireless ESP CMSIS-DAP" pyOCD identifies the debugger by USB interface name, which include substring "CMSIS-DAP". Let's change USB interface name to adapt pyOCD. --- components/USBIP/usb_descriptor.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/USBIP/usb_descriptor.c b/components/USBIP/usb_descriptor.c index 12752c4..13dd078 100644 --- a/components/USBIP/usb_descriptor.c +++ b/components/USBIP/usb_descriptor.c @@ -84,10 +84,12 @@ const uint8_t kUSBd0InterfaceDescriptor[]= USBD_CUSTOM_CLASS0_IF0_CLASS, // bInterfaceClass USBD_CUSTOM_CLASS0_IF0_SUBCLASS, // bInterfaceSubClass USBD_CUSTOM_CLASS0_IF0_PROTOCOL, // bInterfaceProtocol - 0x00, // iInterface + /** + * pyOCD identifies the debugger by USB interface name, which include substring "CMSIS-DAP". + * See `strings_list` in `usb_handle.c` + */ + 0x02, // iInterface // Index of string descriptor describing this interface - ////TODO: fix this 0x04 ? - // Standard Endpoint Descriptor