X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Ftarget_type.h;h=2473c62cbeee8e88479576ba14e037edeaba389c;hb=b10037a0b784cab94e21b37c976ad2b5174d52ae;hp=21439b656aa396dff6db63ba18e207dfd6dc2c57;hpb=0a4c8990c29e61fd0c2796486519cdb256b8da3b;p=fw%2Fopenocd
diff --git a/src/target/target_type.h b/src/target/target_type.h
index 21439b656..2473c62cb 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -19,13 +19,11 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ * along with this program. If not, see . *
***************************************************************************/
-#ifndef TARGET_TYPE_H
-#define TARGET_TYPE_H
+#ifndef OPENOCD_TARGET_TARGET_TYPE_H
+#define OPENOCD_TARGET_TARGET_TYPE_H
#include
@@ -130,18 +128,10 @@ struct target_type {
int (*write_buffer)(struct target *target, uint32_t address,
uint32_t size, const uint8_t *buffer);
- /**
- * Write target memory in multiples of 4 bytes, optimized for
- * writing large quantities of data. Do @b not call this
- * function directly, use target_bulk_write_memory() instead.
- */
- int (*bulk_write_memory)(struct target *target, uint32_t address,
- uint32_t count, const uint8_t *buffer);
-
int (*checksum_memory)(struct target *target, uint32_t address,
uint32_t count, uint32_t *checksum);
int (*blank_check_memory)(struct target *target, uint32_t address,
- uint32_t count, uint32_t *blank);
+ uint32_t count, uint32_t *blank, uint8_t erased_value);
/*
* target break-/watchpoint control
@@ -233,6 +223,13 @@ struct target_type {
* */
int (*init_target)(struct command_context *cmd_ctx, struct target *target);
+ /**
+ * Free all the resources allocated by the target.
+ *
+ * @param target The target to deinit
+ */
+ void (*deinit_target)(struct target *target);
+
/* translate from virtual to physical address. Default implementation is successful
* no-op(i.e. virtual==physical).
*/
@@ -273,6 +270,10 @@ struct target_type {
*/
int (*gdb_fileio_end)(struct target *target, int retcode, int fileio_errno, bool ctrl_c);
+ /* do target profiling
+ */
+ int (*profiling)(struct target *target, uint32_t *samples,
+ uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds);
};
-#endif /* TARGET_TYPE_H */
+#endif /* OPENOCD_TARGET_TARGET_TYPE_H */