unsigned int time_ms;
enum target_timer_type type;
bool removed;
- struct timeval when;
+ int64_t when; /* output of timeval_ms() */
void *priv;
struct target_timer_callback *next;
};
* a synchronous command completes.
*/
int target_call_timer_callbacks_now(void);
+/**
+ * Returns when the next registered event will take place. Callers can use this
+ * to go to sleep until that time occurs.
+ */
+int64_t target_timer_next_event(void);
struct target *get_target_by_num(int num);
struct target *get_current_target(struct command_context *cmd_ctx);
int target_run_algorithm(struct target *target,
int num_mem_params, struct mem_param *mem_params,
int num_reg_params, struct reg_param *reg_param,
- uint32_t entry_point, uint32_t exit_point,
+ target_addr_t entry_point, target_addr_t exit_point,
int timeout_ms, void *arch_info);
/**
int target_start_algorithm(struct target *target,
int num_mem_params, struct mem_param *mem_params,
int num_reg_params, struct reg_param *reg_params,
- uint32_t entry_point, uint32_t exit_point,
+ target_addr_t entry_point, target_addr_t exit_point,
void *arch_info);
/**
int target_wait_algorithm(struct target *target,
int num_mem_params, struct mem_param *mem_params,
int num_reg_params, struct reg_param *reg_params,
- uint32_t exit_point, int timeout_ms,
+ target_addr_t exit_point, int timeout_ms,
void *arch_info);
/**
*/
unsigned target_address_bits(struct target *target);
+/**
+ * Return the number of data bits this target supports.
+ *
+ * This routine is a wrapper for target->type->data_bits.
+ */
+unsigned int target_data_bits(struct target *target);
+
/** Return the *name* of this targets current state */
const char *target_state_name(struct target *target);
extern bool get_target_reset_nag(void);
+#define TARGET_DEFAULT_POLLING_INTERVAL 100
+
#endif /* OPENOCD_TARGET_TARGET_H */