Add target_write_memory wrapper:
- replaces all calls to target->type->write_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user