diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-18 06:24:57 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-18 06:24:57 +0000 |
commit | 679592d42e5db7e8a2485b66aabc4c5ec76307e4 (patch) | |
tree | c51f3dcc50ef6e8b5c6d1b7f16334898cdf4614e /src/flash | |
parent | b504e11abea041f29ee4a11183dc3b93f858c7ee (diff) | |
download | openocd_libswd-679592d42e5db7e8a2485b66aabc4c5ec76307e4.tar.gz openocd_libswd-679592d42e5db7e8a2485b66aabc4c5ec76307e4.tar.bz2 openocd_libswd-679592d42e5db7e8a2485b66aabc4c5ec76307e4.tar.xz openocd_libswd-679592d42e5db7e8a2485b66aabc4c5ec76307e4.zip |
Charles Hardin <ckhardin@gmail.com> move tcl stuff nearer to where it belongs.
git-svn-id: svn://svn.berlios.de/openocd/trunk@824 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/flash.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c index 01bc6e70..16c2633b 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -41,10 +41,6 @@ #include <errno.h> #include <inttypes.h> -#include "jim.h" -extern Jim_Interp *interp; - - /* command handlers */ int handle_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -143,7 +139,7 @@ int flash_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -static int Jim_Command_flash_banks(Jim_Interp *interp, int argc, Jim_Obj *const *argv) +static int jim_flash_banks(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { if (argc != 1) { Jim_WrongNumArgs(interp, 1, argv, "no arguments to flash_banks command"); @@ -174,7 +170,7 @@ static int Jim_Command_flash_banks(Jim_Interp *interp, int argc, Jim_Obj *const Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "chip_width", -1)); Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->chip_width)); - Jim_ListAppendElement(interp, list, elem); + Jim_ListAppendElement(interp, list, elem); } Jim_SetResult(interp, list); @@ -187,7 +183,7 @@ int flash_init_drivers(struct command_context_s *cmd_ctx) { if (flash_banks) { - Jim_CreateCommand(interp, "openocd_flash_banks", Jim_Command_flash_banks, NULL, NULL ); + register_jim(cmd_ctx, "openocd_flash_banks", jim_flash_banks, "return information about the flash banks"); register_command(cmd_ctx, flash_cmd, "info", handle_flash_info_command, COMMAND_EXEC, "print info about flash bank <num>"); |