drivers/libusb_helper: allow external use of jtag_libusb_match_ids() 28/7528/4
authorTomas Vanek <vanekt@fbl.cz>
Mon, 6 Mar 2023 14:31:08 +0000 (15:31 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Sat, 18 Mar 2023 17:33:28 +0000 (17:33 +0000)
Can be employed by a driver with custom libusb open.

Change-Id: I00c8a01df8780891a8b7c30e2e34ab191acdf9a8
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7528
Tested-by: jenkins
Reviewed-by: Wolfram Sang <wsa@kernel.org>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/jtag/drivers/libusb_helper.c
src/jtag/drivers/libusb_helper.h

index 53dfd502d3f235007bca63d7dd6994a008797630..4b098b482f02815dfa02d1d26720d264b113ef7a 100644 (file)
@@ -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++) {
index 172c345981f1b8ee06dfd37916e20cb10f08bda4..799e3e6a913c5c43f0bfecb5320c58a442f9c1e9 100644 (file)
@@ -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);

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)