aboutsummaryrefslogtreecommitdiffstats
path: root/src/gba
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-06-11 17:12:13 +0200
committerBad Diode <bd@badd10de.dev>2021-06-11 17:12:13 +0200
commit562f435116748b259ef5cd97d36e6049c1d9fbc7 (patch)
tree66277341c5ebbe68fc6f15291788485a62561efe /src/gba
parent5cd6fa9ce339189d5e4e57d78206254f687507fa (diff)
downloadstepper-562f435116748b259ef5cd97d36e6049c1d9fbc7.tar.gz
stepper-562f435116748b259ef5cd97d36e6049c1d9fbc7.zip
Add memcpy32 inline function
Diffstat (limited to 'src/gba')
-rw-r--r--src/gba/gba.h8
1 files changed, 8 insertions, 0 deletions
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) {
660#define EWRAM_CODE __attribute__((section(".ewram"), long_call)) 660#define EWRAM_CODE __attribute__((section(".ewram"), long_call))
661#define EWRAM_BSS __attribute__((section(".sbss"))) 661#define EWRAM_BSS __attribute__((section(".sbss")))
662 662
663static inline
664void
665memcpy32(u32 *dst, const u32 *src, u32 size) {
666 for (size_t i = 0; i < size / 4; i++) {
667 dst[i] = src[i];
668 }
669}
670
663#endif // GBA_H 671#endif // GBA_H