diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-10-06 23:17:30 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-13 10:47:02 +0000 |
commit | 4cb3c9fae2a6a6cb5cf2c664179edace22abf5f6 (patch) | |
tree | ae9614f5a24943406b69802e0183db378721f978 /src/jtag/drivers/ftdi.c | |
parent | a9d0386411d1e372bf4d2187ff7b843bb5e9bfc6 (diff) | |
download | riscv-openocd-4cb3c9fae2a6a6cb5cf2c664179edace22abf5f6.zip riscv-openocd-4cb3c9fae2a6a6cb5cf2c664179edace22abf5f6.tar.gz riscv-openocd-4cb3c9fae2a6a6cb5cf2c664179edace22abf5f6.tar.bz2 |
jtag/adapter: move 'usb location' code in adapter.c
The configuration code for adapter parameters is spread around.
Add a struct in adapter.c aimed at containing all the adapter's
configuration data.
Move in adapter.c the code related to configuring 'usb location'
and the copyright tag.
Add adapter.h to export the functions.
While there:
- rework the copyright and the SPDX tag;
- rename the 'usb location' functions;
- remove the JTAG_SRC variable in Makefile.am.
Change-Id: I4fe0d32991a8a30e315807180688035ae9ee01ce
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6640
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Diffstat (limited to 'src/jtag/drivers/ftdi.c')
-rw-r--r-- | src/jtag/drivers/ftdi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 82298c2..5e7eae0 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -69,7 +69,7 @@ #endif /* project specific includes */ -#include <jtag/drivers/jtag_usb_common.h> +#include <jtag/adapter.h> #include <jtag/interface.h> #include <jtag/swd.h> #include <transport/transport.h> @@ -672,7 +672,7 @@ static int ftdi_initialize(void) for (int i = 0; ftdi_vid[i] || ftdi_pid[i]; i++) { mpsse_ctx = mpsse_open(&ftdi_vid[i], &ftdi_pid[i], ftdi_device_desc, - ftdi_serial, jtag_usb_get_location(), ftdi_channel); + ftdi_serial, adapter_usb_get_location(), ftdi_channel); if (mpsse_ctx) break; } |