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/sam3x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sam3x.c') 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; } -- cgit v1.2.3