aboutsummaryrefslogtreecommitdiff
path: root/src/stm32f1.c
diff options
context:
space:
mode:
authorGareth McMullin2015-03-15 14:31:57 -0700
committerGareth McMullin2015-03-15 14:31:57 -0700
commitee3af96a736139b71678a0e590865f9ffafc2f35 (patch)
treec607858419aae08f4946bb2b400e7159e95cb6fe /src/stm32f1.c
parent2e785e56fa4e77549878eac88f2c4891af043e64 (diff)
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.
Diffstat (limited to 'src/stm32f1.c')
-rw-r--r--src/stm32f1.c4
1 files changed, 2 insertions, 2 deletions
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;