From ee3af96a736139b71678a0e590865f9ffafc2f35 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 15 Mar 2015 14:31:57 -0700 Subject: Consolidate target_mem_read* and target_mem_write* methods. There are now only mem_read and mem_write, that must handle all alignments. These methods return void, errors must be checked with target_check_error.--- src/stm32f1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stm32f1.c') diff --git a/src/stm32f1.c b/src/stm32f1.c index 405bc1a..ca55fad 100644 --- a/src/stm32f1.c +++ b/src/stm32f1.c @@ -293,8 +293,8 @@ static int stm32f1_flash_write(struct target_s *target, uint32_t dest, memcpy((uint8_t *)&data[2] + offset, src, len); /* Write stub and data to target ram and set PC */ - target_mem_write_words(target, 0x20000000, (void*)stm32f1_flash_write_stub, 0x2C); - target_mem_write_words(target, 0x2000002C, data, sizeof(data)); + target_mem_write(target, 0x20000000, stm32f1_flash_write_stub, 0x2C); + target_mem_write(target, 0x2000002C, data, sizeof(data)); target_pc_write(target, 0x20000000); if(target_check_error(target)) return -1; -- cgit v1.2.3