X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Ftarget.h;h=91dd1b15422f4a7dfe1ca9ba8838147bfeb6fb03;hb=0de78ed02c7e2caaf96eafb814c6059ceb9582b2;hp=3d9d8e9f90c348afcd0efde88b4788026be0c0b3;hpb=17fa4de8541ac12fad2ce836aa61d22dbf1642c8;p=fw%2Fopenocd diff --git a/src/target/target.h b/src/target/target.h index 3d9d8e9f9..91dd1b154 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -107,6 +107,10 @@ typedef struct working_area_s typedef struct target_type_s { + /** + * Name of the target. Do @b not access this field directly, use + * target_get_name() instead. + */ char *name; /** @@ -395,6 +399,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); +/** + * Get the target name. + * + * This routine is a wrapper for the target->type->name field. + */ +extern const char *target_get_name(struct target_s *target); + /// @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.