aboutsummaryrefslogtreecommitdiff
path: root/src/lpc11xx.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/lpc11xx.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/lpc11xx.c')
-rw-r--r--src/lpc11xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpc11xx.c b/src/lpc11xx.c
index b6309c2..eca3daf 100644
--- a/src/lpc11xx.c
+++ b/src/lpc11xx.c
@@ -170,7 +170,7 @@ lpc11x_iap_call(struct target_s *target, struct flash_param *param, unsigned par
/* fill out the remainder of the parameters and copy the structure to RAM */
param->opcodes[0] = 0xbe00;
param->opcodes[1] = 0x0000;
- target_mem_write_words(target, IAP_RAM_BASE, (void *)param, param_len);
+ target_mem_write(target, IAP_RAM_BASE, param, param_len);
/* set up for the call to the IAP ROM */
target_regs_read(target, regs);
@@ -191,7 +191,7 @@ lpc11x_iap_call(struct target_s *target, struct flash_param *param, unsigned par
while (!target_halt_wait(target));
/* copy back just the parameters structure */
- target_mem_read_words(target, (void *)param, IAP_RAM_BASE, sizeof(struct flash_param));
+ target_mem_read(target, param, IAP_RAM_BASE, sizeof(struct flash_param));
}
static int flash_page_size(struct target_s *target)