aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authorDongxue Zhang <elta.era@gmail.com>2013-11-15 16:55:34 +0800
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2013-12-01 12:39:36 +0000
commit4516eebabac0df24f00f40ff97ff570fdd39b2db (patch)
tree2a9cca5cf2e4d47d87acccdee4ab2f3c698c68e8 /src/target/target.h
parent3b020c5bb3c332ad7518de388695cc8a98e388f2 (diff)
[PATCH 1/2]support64: Add functions into types and target
Add functions into types.h, target.c, target.h to operate 64bits data. Prepare for 64bits mips target. Change-Id: I668a8a5ac12ba754ae310fa6e92cfc91af850b1c Signed-off-by: Dongxue Zhang <elta.era@gmail.com> Reviewed-on: http://openocd.zylin.com/1700 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index 124dc9b7..21b94eea 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -593,21 +593,27 @@ uint32_t target_get_working_area_avail(struct target *target);
extern struct target *all_targets;
+uint64_t target_buffer_get_u64(struct target *target, const uint8_t *buffer);
uint32_t target_buffer_get_u32(struct target *target, const uint8_t *buffer);
uint32_t target_buffer_get_u24(struct target *target, const uint8_t *buffer);
uint16_t target_buffer_get_u16(struct target *target, const uint8_t *buffer);
+void target_buffer_set_u64(struct target *target, uint8_t *buffer, uint64_t value);
void target_buffer_set_u32(struct target *target, uint8_t *buffer, uint32_t value);
void target_buffer_set_u24(struct target *target, uint8_t *buffer, uint32_t value);
void target_buffer_set_u16(struct target *target, uint8_t *buffer, uint16_t value);
+void target_buffer_get_u64_array(struct target *target, const uint8_t *buffer, uint32_t count, uint64_t *dstbuf);
void target_buffer_get_u32_array(struct target *target, const uint8_t *buffer, uint32_t count, uint32_t *dstbuf);
void target_buffer_get_u16_array(struct target *target, const uint8_t *buffer, uint32_t count, uint16_t *dstbuf);
+void target_buffer_set_u64_array(struct target *target, uint8_t *buffer, uint32_t count, const uint64_t *srcbuf);
void target_buffer_set_u32_array(struct target *target, uint8_t *buffer, uint32_t count, const uint32_t *srcbuf);
void target_buffer_set_u16_array(struct target *target, uint8_t *buffer, uint32_t count, const uint16_t *srcbuf);
+int target_read_u64(struct target *target, uint64_t address, uint64_t *value);
int target_read_u32(struct target *target, uint32_t address, uint32_t *value);
int target_read_u16(struct target *target, uint32_t address, uint16_t *value);
int target_read_u8(struct target *target, uint32_t address, uint8_t *value);
+int target_write_u64(struct target *target, uint64_t address, uint64_t value);
int target_write_u32(struct target *target, uint32_t address, uint32_t value);
int target_write_u16(struct target *target, uint32_t address, uint16_t value);
int target_write_u8(struct target *target, uint32_t address, uint8_t value);