summaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index b11e2b6b..2214c06e 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -167,6 +167,10 @@ typedef struct target_type_s
*/
int (*read_memory)(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
int (*write_memory_imp)(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
+ /**
+ * Target memory write callback. Do @b not call this function
+ * directly, use target_write_memory() instead.
+ */
int (*write_memory)(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
/* write target memory in multiples of 4 byte, optimized for writing large quantities of data */
@@ -383,6 +387,14 @@ extern target_t *get_target(const char *id);
*/
extern int target_read_memory(struct target_s *target,
u32 address, u32 size, u32 count, u8 *buffer);
+/**
+ * Write @count items of @a size bytes to the memory of @a target at
+ * the @a address given.
+ *
+ * This routine is wrapper for target->type->write_memory.
+ */
+extern int target_write_memory(struct target_s *target,
+ u32 address, u32 size, u32 count, u8 *buffer);
extern int target_write_buffer(struct target_s *target, u32 address, u32 size, u8 *buffer);
extern int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffer);