aboutsummaryrefslogtreecommitdiff
path: root/src/samd.c
diff options
context:
space:
mode:
authorGareth McMullin2015-03-14 18:03:04 -0700
committerGareth McMullin2015-03-14 18:03:04 -0700
commit2e785e56fa4e77549878eac88f2c4891af043e64 (patch)
tree3edffa5f46f577d440f8a10fe989db1bd2537a6b /src/samd.c
parent6f5b1873d7b986fe7b3bc1f267bae9f7649630a5 (diff)
adiv5: Encode APnDP into register definition.
Clean up magic numbers in adiv5 calls. Removed old adiv5_dp_write_ap and adiv5_dp_read_ap.
Diffstat (limited to 'src/samd.c')
-rw-r--r--src/samd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/samd.c b/src/samd.c
index 6f73956..2719763 100644
--- a/src/samd.c
+++ b/src/samd.c
@@ -553,7 +553,7 @@ static int samd_flash_write(struct target_s *target, uint32_t dest,
/* Partial, manual page write */
for (; addr <= MINIMUM(end, end_of_this_page); addr += 4, i++) {
- adiv5_dp_write_ap(ap->dp, ADIV5_AP_DRW, data[i]);
+ adiv5_dp_write(ap->dp, ADIV5_AP_DRW, data[i]);
}
/* Unlock */
@@ -578,7 +578,7 @@ static int samd_flash_write(struct target_s *target, uint32_t dest,
/* Full, automatic page write */
for (; addr < page + SAMD_PAGE_SIZE; addr += 4, i++) {
- adiv5_dp_write_ap(ap->dp, ADIV5_AP_DRW, data[i]);
+ adiv5_dp_write(ap->dp, ADIV5_AP_DRW, data[i]);
}
}