projects
/
fw
/
stlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f143231
)
fixed USB VID/PID detection bug
author
JohannesTaelman
<johannes.taelman@gmail.com>
Tue, 13 Aug 2013 13:37:44 +0000
(15:37 +0200)
committer
JohannesTaelman
<johannes.taelman@gmail.com>
Tue, 13 Aug 2013 13:37:44 +0000
(15:37 +0200)
When a USB device with same VID but different PID is found, it got
selected as STLINK device.
src/stlink-usb.c
patch
|
blob
|
history
diff --git
a/src/stlink-usb.c
b/src/stlink-usb.c
index d574584281e3f5668c532b84a75aba33cd81edc1..9895da85573c166209767513ae97ae8d300cfb7a 100644
(file)
--- a/
src/stlink-usb.c
+++ b/
src/stlink-usb.c
@@
-754,7
+754,10
@@
stlink_t* stlink_open_usb(const int verbose) {
if (devBus && devAddr)
if ((libusb_get_bus_number(list[cnt])!=devBus) || (libusb_get_device_address(list[cnt])!=devAddr)) continue;
if (desc.idProduct == USB_STLINK_32L_PID) break;
- if (desc.idProduct == USB_STLINK_PID) slu->protocoll = 1; break;
+ if (desc.idProduct == USB_STLINK_PID) {
+ slu->protocoll = 1;
+ break;
+ }
}
if (cnt < 0) {