summaryrefslogtreecommitdiff
path: root/src/flash/mflash.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-31 09:37:57 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-31 09:37:57 +0000
commit95e13054cafeeb13163d85822e4202e12007e1a7 (patch)
treee35b5658762512024c7ec750acd75bfae9874905 /src/flash/mflash.c
parentb6db182c0020051e0dc642ca0b1040ea7453dcd0 (diff)
downloadopenocd+libswd-95e13054cafeeb13163d85822e4202e12007e1a7.tar.gz
openocd+libswd-95e13054cafeeb13163d85822e4202e12007e1a7.tar.bz2
openocd+libswd-95e13054cafeeb13163d85822e4202e12007e1a7.tar.xz
openocd+libswd-95e13054cafeeb13163d85822e4202e12007e1a7.zip
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
Diffstat (limited to 'src/flash/mflash.c')
-rw-r--r--src/flash/mflash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index cc1d1ee2..2587b6b5 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -494,7 +494,7 @@ static int mg_mflash_do_write_sects(void *buff, u32 sect_num, u32 sect_cnt,
if (ret != ERROR_OK)
LOG_ERROR("mg_io_wait_drq time out");
- ret = target->type->write_memory(target, address, 2, MG_MFLASH_SECTOR_SIZE / 2, buff_ptr);
+ ret = target_write_memory(target, address, 2, MG_MFLASH_SECTOR_SIZE / 2, buff_ptr);
if (ret != ERROR_OK)
LOG_ERROR("mem write error");
buff_ptr += MG_MFLASH_SECTOR_SIZE;
@@ -927,7 +927,7 @@ static int mg_verify_interface(void)
for (i = 0; i < MG_MFLASH_SECTOR_SIZE >> 1; i++)
buff[i] = i;
- target->type->write_memory(target, address, 2,
+ target_write_memory(target, address, 2,
MG_MFLASH_SECTOR_SIZE / 2, (u8 *)buff);
memset(buff, 0xff, MG_MFLASH_SECTOR_SIZE);