]> git.sur5r.net Git - openocd/blobdiff - src/flash/flash.h
Overhaul time support API
[openocd] / src / flash / flash.h
index a41586f78f55f60c0720f0d3615fb122d81c769c..05c4b2c48f70b81c2b4d862e0b3982c348131dd8 100644 (file)
@@ -2,7 +2,7 @@
  *   Copyright (C) 2005 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
- *   Copyright (C) 2007,2008 Øyvind Harboe                                 *
+ *   Copyright (C) 2007,2008 Øyvind Harboe                                 *
  *   oyvind.harboe@zylin.com                                               *
  *                                                                         *
  *   Copyright (C) 2008 by Spencer Oliver                                  *
@@ -76,7 +76,7 @@ struct flash_bank_s;
  * that matches @c DRIVERNAME.
  *
  * The flash subsystem calls some of the other drivers routines a using
- * corresponding static <code > flash_driver_ < i>callback</i > ()</code>
+ * corresponding static <code>flash_driver_<i>callback</i>()</code>
  * routine in flash.c.
  */
 typedef struct flash_driver_s
@@ -313,6 +313,16 @@ extern int default_flash_mem_blank_check(struct flash_bank_s *bank);
  * @returns A flash_bank_t for flash bank @a num, or NULL
  */
 extern flash_bank_t *get_flash_bank_by_num(int num);
+/**
+ * Retreives @a bank from a command argument, reporting errors parsing
+ * the bank identifier or retreiving the specified bank.
+ * @param cmd_ctx The command context for reporting errors.
+ * @param str The string containing the bank identifier.
+ * @param bank On output, contians a pointer to the bank or NULL.
+ * @returns ERROR_OK on success, or an error indicating the problem.
+ */
+int flash_command_get_bank_by_num(
+       struct command_context_s *cmd_ctx, char *str, flash_bank_t **bank);
 /**
  * Returns the flash bank like get_flash_bank_by_num(), without probing.
  * @param num The flash bank number.