summaryrefslogtreecommitdiff
path: root/include/gba/macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gba/macro.h')
-rw-r--r--include/gba/macro.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gba/macro.h b/include/gba/macro.h
index 1e0254806..a0edf2a49 100644
--- a/include/gba/macro.h
+++ b/include/gba/macro.h
@@ -103,6 +103,22 @@
} \
}
+#define DmaClearLarge(dmaNum, dest, size, block, bit) \
+{ \
+ u32 _size = size; \
+ while (1) \
+ { \
+ DmaFill##bit(dmaNum, 0, dest, (block)); \
+ dest += (block); \
+ _size -= (block); \
+ if (_size <= (block)) \
+ { \
+ DmaFill##bit(dmaNum, 0, dest, _size); \
+ break; \
+ } \
+ } \
+}
+
#define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16)
#define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32)