From 4332bc32e4a65b0b5b169a143febeb02e6517f39 Mon Sep 17 00:00:00 2001 From: Mathias K Date: Thu, 3 Mar 2011 11:01:46 +0100 Subject: target: allow targets to override memory alignment Targets can implement read/write_buffer to handle alignment. --- src/target/target_type.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/target/target_type.h') 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 -- cgit v1.2.3