Skip to content

Commit c689aa8

Browse files
committed
support daplink having HID and winusb simultaneously
1 parent 5759d58 commit c689aa8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pyocd/probe/pydapaccess/interface/pyusb_v2_backend.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,8 @@ def __call__(self, dev):
322322
return False
323323

324324
try:
325-
def match_cmsis_dap_interface_name(desc):
326-
interface_name = usb.util.get_string(desc.device, desc.iInterface)
327-
return (interface_name is not None) and ("CMSIS-DAP" in interface_name)
328-
329325
config = dev.get_active_configuration()
330-
cmsis_dap_interface = usb.util.find_descriptor(config, custom_match=match_cmsis_dap_interface_name)
326+
cmsis_dap_interface = usb.util.find_descriptor(config, custom_match=_match_cmsis_dap_v2_interface)
331327
except usb.core.USBError as error:
332328
# Produce a more helpful error message if we get a permissions error on Linux.
333329
if error.errno == errno.EACCES and platform.system() == "Linux":

0 commit comments

Comments
 (0)