From 562f435116748b259ef5cd97d36e6049c1d9fbc7 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 11 Jun 2021 17:12:13 +0200 Subject: Add memcpy32 inline function --- src/gba/gba.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gba') diff --git a/src/gba/gba.h b/src/gba/gba.h index 797c71e..3a84b89 100644 --- a/src/gba/gba.h +++ b/src/gba/gba.h @@ -660,4 +660,12 @@ wait_vsync(void) { #define EWRAM_CODE __attribute__((section(".ewram"), long_call)) #define EWRAM_BSS __attribute__((section(".sbss"))) +static inline +void +memcpy32(u32 *dst, const u32 *src, u32 size) { + for (size_t i = 0; i < size / 4; i++) { + dst[i] = src[i]; + } +} + #endif // GBA_H -- cgit v1.2.1