jtag: move adapter init/quit and speed to adapter.c

The configuration code for adapter parameters is spread around.

Move in adapter.c the code that handles the configuration of
adapter speed.
For convenience, move also the functions adapter_init() and
adapter_quit(), that anyway have no reason to be in file core.c

To simplify the review, the code moved is not modified. It will be
cleaned and adapted in the following changes.

Change-Id: I2b38975a0cd2e74d3d2de6c56ea17818ff225fd8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6641
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
This commit is contained in:
Antonio Borneo
2021-10-07 12:13:28 +02:00
parent 4cb3c9fae2
commit b8ec1d4e7d
3 changed files with 186 additions and 182 deletions

View File

@@ -10,6 +10,9 @@
#include <stddef.h>
#include <stdint.h>
/** @returns true if adapter has been initialized */
bool is_adapter_initialized(void);
/** @returns USB location string set with command 'adapter usb location' */
const char *adapter_usb_get_location(void);