We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 089441f + a02cee9 commit 3b0618eCopy full SHA for 3b0618e
workspace_tools/debugger/pyOCD/interface/pywinusb_backend.py
@@ -57,17 +57,18 @@ def getAllConnectedInterface(vid, pid):
57
"""
58
all_devices = hid.find_all_hid_devices()
59
60
- # keep devices with good vid/pid
+ # find devices with good vid/pid
61
+ all_mbed_devices = []
62
for d in all_devices:
- if (d.vendor_id != vid) or (d.product_id != pid):
63
- all_devices.remove(d)
+ if (d.vendor_id == vid) and (d.product_id == pid):
64
+ all_mbed_devices.append(d)
65
- if not all_devices:
66
+ if not all_mbed_devices:
67
logging.debug("No Mbed device connected")
68
return
69
70
boards = []
- for dev in all_devices:
71
+ for dev in all_mbed_devices:
72
try:
73
dev.open()
74
report = dev.find_output_reports()
0 commit comments