Duane Ellis: fix warnings
[fw/openocd] / src / target / target.h
index f1c61e3bf33ea0c628f58ed4528e6d197846d1be..2551ede7ba07cfaeb896d070495cd8d397a63fcf 100644 (file)
@@ -2,6 +2,9 @@
  *   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     *
@@ -59,8 +62,6 @@ enum target_reset_mode
        RESET_RUN = 0,          /* reset and let target run */
        RESET_HALT = 1,         /* reset and halt target out of reset */
        RESET_INIT = 2,         /* reset and halt target out of reset, then run init script */
-       RESET_RUN_AND_HALT = 3, /* reset and let target run, halt after n milliseconds */
-       RESET_RUN_AND_INIT = 4, /* reset and let target run, halt after n milliseconds, then run init script */
 };
 
 enum target_debug_reason
@@ -181,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
@@ -199,7 +200,6 @@ typedef struct target_s
 {
        target_type_t *type;                            /* target type definition (name, access functions) */
        int reset_halt;                                         /* attempt resetting the CPU into the halted mode? */
-       int run_and_halt_time;                          /* how long the target should run after a run_and_halt reset */
        u32 working_area;                                       /* working area (initialized RAM). Evaluated 
                                                                                   upon first allocation from virtual/physical address. */
        u32 working_area_virt;                          /* virtual address */
@@ -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);
 
@@ -266,11 +266,11 @@ extern int target_call_event_callbacks(target_t *target, enum target_event event
  */
 extern int target_register_timer_callback(int (*callback)(void *priv), int time_ms, int periodic, void *priv);
 extern int target_unregister_timer_callback(int (*callback)(void *priv), void *priv);
-extern int target_call_timer_callbacks();
+extern int target_call_timer_callbacks(void);
 /* invoke this to ensure that e.g. polling timer callbacks happen before
  * a syncrhonous command completes.
  */
-extern int target_call_timer_callbacks_now();
+extern int target_call_timer_callbacks_now(void);
 
 extern target_t* get_current_target(struct command_context_s *cmd_ctx);
 extern int get_num_by_target(target_t *query_target);
@@ -280,6 +280,7 @@ extern int target_write_buffer(struct target_s *target, u32 address, u32 size, u
 extern int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffer);
 extern int target_checksum_memory(struct target_s *target, u32 address, u32 size, u32* crc);
 extern int target_blank_check_memory(struct target_s *target, u32 address, u32 size, u32* blank);
+extern int target_wait_state(target_t *target, enum target_state state, int ms);
 
 /* DANGER!!!!!
  *