diff options
author | Mathias K <kesmtp@freenet.de> | 2011-03-03 11:01:46 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-03-17 14:18:16 +0100 |
commit | 4332bc32e4a65b0b5b169a143febeb02e6517f39 (patch) | |
tree | 18d344b6313555dc93ee12aebc71fc6da9cf7a90 /src/target/target_type.h | |
parent | 9f17b30f8847ba50e7a8ef03ca37cc116e915740 (diff) |
target: allow targets to override memory alignment
Targets can implement read/write_buffer to handle
alignment.
Diffstat (limited to 'src/target/target_type.h')
-rw-r--r-- | src/target/target_type.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/target_type.h b/src/target/target_type.h index bfa7f937..15598b2f 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -119,6 +119,12 @@ struct target_type */ int (*write_memory)(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); + /* Default implementation will do some fancy alignment to improve performance, target can override */ + int (*read_buffer)(struct target *target, uint32_t address, uint32_t size, uint8_t *buffer); + + /* Default implementation will do some fancy alignment to improve performance, target can override */ + int (*write_buffer)(struct target *target, uint32_t address, uint32_t size, uint8_t *buffer); + /** * Write target memory in multiples of 4 bytes, optimized for * writing large quantities of data. Do @b not call this |