From 95e13054cafeeb13163d85822e4202e12007e1a7 Mon Sep 17 00:00:00 2001 From: zwelch Date: Sun, 31 May 2009 09:37:57 +0000 Subject: 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 --- src/flash/mflash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/flash/mflash.c') 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); -- cgit v1.2.3