struct target_event_action *event_action;
- int reset_halt; /* attempt resetting the CPU into the halted mode? */
+ bool reset_halt; /* attempt resetting the CPU into the halted mode? */
target_addr_t working_area; /* working area (initialised RAM). Evaluated
* upon first allocation from virtual/physical address. */
bool working_area_virt_spec; /* virtual address specified? */
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);
*/
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 */