From 46fd32da5c75f7d9f9a384bb90a82c28c5e7ad0e Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Mon, 1 Aug 2022 22:42:06 +0100 Subject: [PATCH] hosted/jlink: fix vid-pid transposition error --- src/platforms/hosted/jlink.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/platforms/hosted/jlink.c b/src/platforms/hosted/jlink.c index 27f7e1c..2ae139d 100644 --- a/src/platforms/hosted/jlink.c +++ b/src/platforms/hosted/jlink.c @@ -33,12 +33,12 @@ #include "cli.h" #include "jlink.h" -#define USB_PID_SEGGER 0x1366 +#define USB_VID_SEGGER 0x1366 /* Only two devices PIDS tested so long */ -#define USB_VID_SEGGER_0101 0x0101 -#define USB_VID_SEGGER_0105 0x0105 -#define USB_VID_SEGGER_1020 0x1020 +#define USB_PID_SEGGER_0101 0x0101 +#define USB_PID_SEGGER_0105 0x0105 +#define USB_PID_SEGGER_1020 0x1020 static uint32_t emu_caps; static uint32_t emu_speed_kHz; @@ -180,11 +180,11 @@ int jlink_init(bmp_info_t *info) DEBUG_WARN( "libusb_get_device_descriptor() failed"); goto error;; } - if (desc.idVendor != USB_PID_SEGGER) + if (desc.idVendor != USB_VID_SEGGER) continue; - if ((desc.idProduct != USB_VID_SEGGER_0101) && - (desc.idProduct != USB_VID_SEGGER_0105) && - (desc.idProduct != USB_VID_SEGGER_1020)) + if ((desc.idProduct != USB_PID_SEGGER_0101) && + (desc.idProduct != USB_PID_SEGGER_0105) && + (desc.idProduct != USB_PID_SEGGER_1020)) continue; int res = libusb_open(dev, &jl->ul_libusb_device_handle); if (res != LIBUSB_SUCCESS)