[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [PATCH]: 2942720c86 drivers/cmsis_dap_usb_bulk: allow specifying adapter by port
From: gerrit () openocd ! org
Date: 2023-03-21 23:08:11
Message-ID: 20230321230811.864CD34 () openocd ! org
[Download RAW message or body]
This is an automated email from Gerrit.
"Anders Montonen <anders.montonen@iki.fi>" just uploaded a new patch set to Gerrit, \
which you can find at https://review.openocd.org/c/openocd/+/7548
-- gerrit
commit 2942720c8640544b5463164685b67dfe15ad6b09
Author: Anders Montonen <Anders.Montonen@iki.fi>
Date: Tue Mar 21 22:51:38 2023 +0200
drivers/cmsis_dap_usb_bulk: allow specifying adapter by port
Make the "adapter usb location" command work as expected.
Signed-off-by: Anders Montonen <Anders.Montonen@iki.fi>
Change-Id: I0bdb56d29a57a6a1ee22ab6dcd7d248c771b1a82
diff --git a/src/jtag/drivers/cmsis_dap_usb_bulk.c \
b/src/jtag/drivers/cmsis_dap_usb_bulk.c index 6599c414ce..20ba42a0e9 100644
--- a/src/jtag/drivers/cmsis_dap_usb_bulk.c
+++ b/src/jtag/drivers/cmsis_dap_usb_bulk.c
@@ -25,11 +25,13 @@
#endif
#include <helper/system.h>
+#include <jtag/adapter.h>
#include <libusb.h>
#include <helper/log.h>
#include <helper/replacements.h>
#include "cmsis_dap.h"
+#include "libusb_helper.h"
struct cmsis_dap_backend_data {
struct libusb_context *usb_ctx;
@@ -88,6 +90,9 @@ static int cmsis_dap_usb_open(struct cmsis_dap *dap, uint16_t \
vids[], uint16_t p if (id_filter && !id_match)
continue;
+ if (adapter_usb_get_location() && !jtag_libusb_location_equal(dev))
+ continue;
+
/* Don't continue if we asked for a serial number and the device doesn't have one \
*/ if (dev_desc.iSerialNumber == 0 && serial && serial[0])
continue;
--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic