moves handling of problems with resetting into the halted state

into the target implementation.

Also target_process_reset() is now simpler and has error handling,
e.g. if assert reset fails, then target_process_reset() will propagate
that error.

cmd_ctx was passed in to examine(), which is wrong - removed that.

git-svn-id: svn://svn.berlios.de/openocd/trunk@887 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-08-05 06:18:26 +00:00
parent e4729b3b7a
commit 3a48961820
12 changed files with 54 additions and 48 deletions

View File

@@ -182,7 +182,7 @@ typedef struct target_type_s
*
* invoked every time after the jtag chain has been validated/examined
*/
int (*examine)(struct command_context_s *cmd_ctx, struct target_s *target);
int (*examine)(struct target_s *target);
/* Set up structures for target.
*
* It is illegal to talk to the target at this stage as this fn is invoked
@@ -250,7 +250,7 @@ typedef struct target_timer_callback_s
extern int target_register_commands(struct command_context_s *cmd_ctx);
extern int target_register_user_commands(struct command_context_s *cmd_ctx);
extern int target_init(struct command_context_s *cmd_ctx);
extern int target_examine(struct command_context_s *cmd_ctx);
extern int target_examine();
extern int handle_target(void *priv);
extern int target_process_reset(struct command_context_s *cmd_ctx, enum target_reset_mode reset_mode);