From f522ceb65e5206134e64e36e52eb866adcc9f543 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 2 Oct 2016 14:24:34 -0700 Subject: add comment for DMA clear macros --- include/gba/macro.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/gba/macro.h') 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); \ -- cgit v1.2.3