summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-10-02 14:24:34 -0700
committerYamaArashi <shadow962@live.com>2016-10-02 14:24:34 -0700
commitf522ceb65e5206134e64e36e52eb866adcc9f543 (patch)
tree21ef4eed3181d38f1f0bbc9ac6db1de1c25cf17c
parent43f374e64e6c0ee10bc38af9c064a3411ba88c85 (diff)
add comment for DMA clear macros
-rw-r--r--include/gba/macro.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gba/macro.h b/include/gba/macro.h
index c8139eb97..62d3e73fa 100644
--- a/include/gba/macro.h
+++ b/include/gba/macro.h
@@ -49,6 +49,11 @@
#define DmaFill16(dmaNum, value, dest, size) DMA_FILL(dmaNum, value, dest, size, 16)
#define DmaFill32(dmaNum, value, dest, size) DMA_FILL(dmaNum, value, dest, size, 32)
+// Note that the DMA clear macros cause the DMA control value to be calculated
+// at runtime rather than compile time. The size is divided by the DMA transfer
+// unit size (2 or 4 bytes) and then combined with the DMA control flags using a
+// bitwise OR operation.
+
#define DMA_CLEAR(dmaNum, dest, size, bit) \
{ \
vu##bit *_dest = (vu##bit *)(dest); \