aboutsummaryrefslogtreecommitdiff
path: root/src/sam3x.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/sam3x.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/sam3x.c')
-rw-r--r--src/sam3x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sam3x.c b/src/sam3x.c
index 7141cb5..211fc92 100644
--- a/src/sam3x.c
+++ b/src/sam3x.c
@@ -326,7 +326,7 @@ static int sam3x_flash_erase(struct target_s *target, uint32_t addr, size_t len)
memset(buf, 0xff, sizeof(buf));
/* Only do this once, since it doesn't change. */
- target_mem_write_words(target, addr, (void*)buf, SAM3_PAGE_SIZE);
+ target_mem_write(target, addr, buf, SAM3_PAGE_SIZE);
while (len) {
if(sam3x_flash_cmd(target, base, EEFC_FCR_FCMD_EWP, chunk))
@@ -384,7 +384,7 @@ static int sam3x_flash_write(struct target_s *target, uint32_t dest,
src += page_size;
}
- target_mem_write_words(target, dest, (void*)buf, page_size);
+ target_mem_write(target, dest, buf, page_size);
if(sam3x_flash_cmd(target, base, EEFC_FCR_FCMD_WP, chunk))
return -1;
}