This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/7528

-- gerrit

commit b161e3e15254457579f6b476ab820614b9a9c0d6
Author: Tomas Vanek <van...@fbl.cz>
Date:   Mon Mar 6 15:31:08 2023 +0100

    drivers/libusb_helper: allow external use of jtag_libusb_match_ids()
    
    Can be emploeyd by a driver with custom libusb open.
    
    Change-Id: I00c8a01df8780891a8b7c30e2e34ab191acdf9a8
    Signed-off-by: Tomas Vanek <van...@fbl.cz>

diff --git a/src/jtag/drivers/libusb_helper.c b/src/jtag/drivers/libusb_helper.c
index 53dfd502d3..4b098b482f 100644
--- a/src/jtag/drivers/libusb_helper.c
+++ b/src/jtag/drivers/libusb_helper.c
@@ -50,7 +50,7 @@ static int jtag_libusb_error(int err)
        }
 }
 
-static bool jtag_libusb_match_ids(struct libusb_device_descriptor *dev_desc,
+bool jtag_libusb_match_ids(struct libusb_device_descriptor *dev_desc,
                const uint16_t vids[], const uint16_t pids[])
 {
        for (unsigned i = 0; vids[i]; i++) {
diff --git a/src/jtag/drivers/libusb_helper.h b/src/jtag/drivers/libusb_helper.h
index 172c345981..a940945f39 100644
--- a/src/jtag/drivers/libusb_helper.h
+++ b/src/jtag/drivers/libusb_helper.h
@@ -30,6 +30,8 @@
 typedef char * (*adapter_get_alternate_serial_fn)(struct libusb_device_handle 
*device,
                struct libusb_device_descriptor *dev_desc);
 
+bool jtag_libusb_match_ids(struct libusb_device_descriptor *dev_desc,
+        const uint16_t vids[], const uint16_t pids[]);
 int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[],
                struct libusb_device_handle **out,
                adapter_get_alternate_serial_fn adapter_get_alternate_serial);

-- 

Reply via email to