* Copyright (C) 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
+ * Copyright (C) 2007,2008 Øyvind Harboe *
+ * oyvind.harboe@zylin.com *
+ * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
static int jim_flash_banks(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
+ flash_bank_t *p;
+
if (argc != 1) {
Jim_WrongNumArgs(interp, 1, argv, "no arguments to flash_banks command");
return JIM_ERR;
}
- flash_bank_t *p;
- int i = 0;
if (!flash_banks)
{
{
Jim_Obj *elem=Jim_NewListObj(interp, NULL, 0);
-
Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "name", -1));
Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, p->driver->name, -1));
Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "base", -1));
return JIM_OK;
}
-
int flash_init_drivers(struct command_context_s *cmd_ctx)
{
if (flash_banks)
{
- register_jim(cmd_ctx, "openocd_flash_banks", jim_flash_banks, "return information about the flash banks");
+ register_jim(cmd_ctx, "ocd_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>");
return NULL;
}
-int flash_get_bank_count()
+int flash_get_bank_count(void)
{
flash_bank_t *p;
int i = 0;