summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/atsam/utils/iocopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/arm/atsam/utils/iocopy.c')
-rw-r--r--c/src/lib/libbsp/arm/atsam/utils/iocopy.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/c/src/lib/libbsp/arm/atsam/utils/iocopy.c b/c/src/lib/libbsp/arm/atsam/utils/iocopy.c
deleted file mode 100644
index b91282dac6..0000000000
--- a/c/src/lib/libbsp/arm/atsam/utils/iocopy.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <bsp/iocopy.h>
-
-static void atsam_do_copy(
- uint8_t *dst,
- const uint8_t *src,
- size_t n,
- bool aligned
-)
-{
- if (aligned) {
- while (n > 3) {
- *(uint32_t *)dst = *(uint32_t *)src;
- dst += 4;
- src += 4;
- n -= 4;
- }
- }
-
- while (n > 0) {
- *dst = *src;
- ++dst;
- ++src;
- --n;
- }
-}
-
-void atsam_copy_to_io(void *dst, const void *src, size_t n)
-{
- atsam_do_copy(dst, src, n, ((uintptr_t)dst) % 4 == 0);
-}
-
-void atsam_copy_from_io(void *dst, const void *src, size_t n)
-{
- atsam_do_copy(dst, src, n, ((uintptr_t)src) % 4 == 0);
-}