diff --git a/src/stlink-common.h b/src/stlink-common.h index 3e5d461..d1ad32d 100644 --- a/src/stlink-common.h +++ b/src/stlink-common.h @@ -23,6 +23,7 @@ extern "C" { // st-link vendor cmd's #define USB_ST_VID 0x0483 #define USB_STLINK_PID 0x3744 +#define USB_STLINK_32L_PID 0x3748 // STLINK_DEBUG_RESETSYS, etc: #define STLINK_OK 0x80 diff --git a/src/stlink-usb.c b/src/stlink-usb.c index 50a7d58..e30a980 100644 --- a/src/stlink-usb.c +++ b/src/stlink-usb.c @@ -136,10 +136,10 @@ static int is_stlink_device(libusb_device * dev) { printf("device: 0x%04x, 0x%04x\n", desc.idVendor, desc.idProduct); - if (desc.idVendor != 0x0483) + if (desc.idVendor != USB_ST_VID) return 0; - if (desc.idProduct != 0x3748) + if (desc.idProduct != USB_STLINK_32L_PID) return 0; return 1;