jtag: rewrite jim_jtag_tap_enabler() as COMMAND_HANDLER

The function is used for commands:
- jtag tapisenabled
- jtag tapenable
- jtag tapdisable

While there, add the missing .help and .usage fields and fix the
incorrect check in jtag_tap_enable() and jtag_tap_disable().

Change-Id: I0e1c9f0b8d9fbad19d09610a97498bec8003c27e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7554
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2023-01-02 17:12:04 +01:00
parent 5dd047fbbe
commit 8297836170
4 changed files with 44 additions and 37 deletions

View File

@@ -18,9 +18,10 @@
#ifndef OPENOCD_JTAG_TCL_H
#define OPENOCD_JTAG_TCL_H
#include <helper/command.h>
int jim_jtag_configure(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
int jim_jtag_tap_enabler(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
__COMMAND_HANDLER(handle_jtag_tap_enabler);
#endif /* OPENOCD_JTAG_TCL_H */