aboutsummaryrefslogtreecommitdiff
path: root/src/samd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/samd.c')
-rw-r--r--src/samd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/samd.c b/src/samd.c
index e12bcc9..a996610 100644
--- a/src/samd.c
+++ b/src/samd.c
@@ -159,9 +159,6 @@ static const char samd_xml_memory_map[] = "<?xml version=\"1.0\"?>"
/* Component ID */
#define SAMD_CID_VALUE 0xB105100D
-/* Utility */
-#define MINIMUM(a,b) ((a < b) ? a : b)
-
/**
* Reads the SAM D20 Peripheral ID
*/
@@ -529,7 +526,7 @@ static int samd_flash_write(struct target_s *target, uint32_t dest,
for (uint32_t page = first_page; page <= last_page; page += SAMD_PAGE_SIZE) {
next_page = page + SAMD_PAGE_SIZE;
- length = MINIMUM(end + 4, next_page) - addr;
+ length = MIN(end + 4, next_page) - addr;
/* Write within a single page. This may be part or all of the page */
target_mem_write(target, addr, &data[i], length);