aboutsummaryrefslogtreecommitdiff
path: root/src/include/target.h
diff options
context:
space:
mode:
authorGareth McMullin2012-06-24 21:37:10 +1200
committerGareth McMullin2012-06-24 21:41:32 +1200
commit03fdd23e9cd72c4793fc9107da8b0a08a5793a4f (patch)
tree471cdc739875887952044c05274ffdc47701a3bf /src/include/target.h
parenta16123997b77a5d3a137fcd80e6bf4134b7a4a23 (diff)
Added mechanism for target driver to add new monitor commands.
Diffstat (limited to 'src/include/target.h')
-rw-r--r--src/include/target.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/target.h b/src/include/target.h
index 5f3a5ab..dc602aa 100644
--- a/src/include/target.h
+++ b/src/include/target.h
@@ -27,9 +27,6 @@
typedef struct target_s target;
-target *target_new(unsigned size);
-void target_list_free(void);
-
/* Halt/resume functions */
#define target_attach(target) \
(target)->attach(target)
@@ -164,13 +161,25 @@ struct target_s {
const uint8_t *src, int len);
const char *driver;
+ struct target_command_s *commands;
int size;
struct target_s *next;
+
+};
+
+struct target_command_s {
+ const char *specific_name;
+ const struct command_s *cmds;
+ struct target_command_s *next;
};
extern target *target_list, *cur_target, *last_target;
+target *target_new(unsigned size);
+void target_list_free(void);
+void target_add_commands(target *t, const struct command_s *cmds, const char *name);
+
/* Probe for various targets.
* Actual functions implemented in their respective drivers.
*/