jtag/adapter: move 'usb location' code in adapter.c
[fw/openocd] / src / jtag / adapter.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2018 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
4  */
5
6 #ifndef OPENOCD_JTAG_ADAPTER_H
7 #define OPENOCD_JTAG_ADAPTER_H
8
9 #include <stdbool.h>
10 #include <stddef.h>
11 #include <stdint.h>
12
13 /** @returns USB location string set with command 'adapter usb location' */
14 const char *adapter_usb_get_location(void);
15
16 /** @returns true if USB location string is "<dev_bus>-<port_path[0]>[.<port_path[1]>[...]]" */
17 bool adapter_usb_location_equal(uint8_t dev_bus, uint8_t *port_path, size_t path_len);
18
19 #endif /* OPENOCD_JTAG_ADAPTER_H */