X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Ftarget_type.h;h=bfa7f9379fb35714aaa0a529a5243feed3b9383b;hb=b7163f534a4bb753b768398af11055cd3a9718cc;hp=d3db8b55decc7aa8ce82eb031d78a0e90527b0bc;hpb=88fcb5a9ef971e54166de7cd16a3b0be20113b82;p=openocd.git diff --git a/src/target/target_type.h b/src/target/target_type.h index d3db8b55de..bfa7f9379f 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -2,7 +2,7 @@ * Copyright (C) 2005 by Dominic Rath * * Dominic.Rath@gmx.de * * * - * Copyright (C) 2007,2008,2009 Øyvind Harboe * + * Copyright (C) 2007-2010 Øyvind Harboe * * oyvind.harboe@zylin.com * * * * Copyright (C) 2008 by Spencer Oliver * @@ -27,6 +27,7 @@ #define TARGET_TYPE_H #include +#include struct target; @@ -41,7 +42,7 @@ struct target_type * Name of this type of target. Do @b not access this * field directly, use target_type_name() instead. */ - char *name; + const char *name; /* poll current target status */ int (*poll)(struct target *target); @@ -73,6 +74,17 @@ struct target_type * */ int (*assert_reset)(struct target *target); + /** + * The implementation is responsible for polling the + * target such that target->state reflects the + * state correctly. + * + * Otherwise the following would fail, as there will not + * be any "poll" invoked inbetween the "reset run" and + * "halt". + * + * reset run; halt + */ int (*deassert_reset)(struct target *target); int (*soft_reset_halt_imp)(struct target *target); int (*soft_reset_halt)(struct target *target);