diff options
Diffstat (limited to 'src/jtag/jtag.c')
-rw-r--r-- | src/jtag/jtag.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index ecd4931a..c9167f41 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -227,7 +227,7 @@ jtag_interface_t *jtag_interfaces[] = { NULL, }; -jtag_interface_t *jtag = NULL; +static jtag_interface_t *jtag = NULL; /* configuration */ static jtag_interface_t *jtag_interface = NULL; @@ -2407,6 +2407,20 @@ static int jtag_init_inner(struct command_context_s *cmd_ctx) return ERROR_OK; } +int jtag_interface_quit(void) +{ + if (!jtag || !jtag->quit) + return ERROR_OK; + + // close the JTAG interface + int result = jtag->quit(); + if (ERROR_OK != result) + LOG_ERROR("failed: %d", result); + + return ERROR_OK; +} + + int jtag_init_reset(struct command_context_s *cmd_ctx) { int retval; |