X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Ftarget.h;h=662c95b943ccb14884af3a0b3deb88ce64ce4902;hp=c319a25b2ea728a3656378918af7cba28be82e32;hb=9cb3af610a1d7cc2d8c1433f54077938d0268a8f;hpb=fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65 diff --git a/src/target/target.h b/src/target/target.h index c319a25b2e..662c95b943 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -109,6 +109,12 @@ typedef struct target_type_s { char *name; + /** + * Indicates whether this target has been examined. + * + * Do @b not access this field directly, use target_was_examined() + * target_set_examined(), and target_reset_examined(). + */ int examined; /* poll current target status */ @@ -383,6 +389,13 @@ extern target_t* get_current_target(struct command_context_s *cmd_ctx); extern int get_num_by_target(target_t *query_target); extern target_t *get_target(const char *id); +/// @returns @c true if the target has been examined. +extern bool target_was_examined(struct target_s *target); +/// Sets the @c examined flag for the given target. +extern void target_set_examined(struct target_s *target); +/// Reset the @c examined flag for the given target. +extern void target_reset_examined(struct target_s *target); + /** * Run an algorithm on the @a target given. *