diff options
author | YamaArashi <shadow962@live.com> | 2016-05-15 16:43:56 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-05-15 16:43:56 -0700 |
commit | 147c8672c3be861fa9229c775c37933a39900b9c (patch) | |
tree | 9b99fe61d63633717fb2682bcf3eb81442824bad /include/gba/macro.h | |
parent | 91b1aab02668e4671a01854db28e093d9cacc1c8 (diff) |
new macros for declaring uninitialized IWRAM data
Diffstat (limited to 'include/gba/macro.h')
-rw-r--r-- | include/gba/macro.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gba/macro.h b/include/gba/macro.h index 1a778ef84..a886d12d4 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -49,4 +49,12 @@ #define DmaCopy16(dmaNum, src, dest, size) DMA_COPY(dmaNum, src, dest, size, 16) #define DmaCopy32(dmaNum, src, dest, size) DMA_COPY(dmaNum, src, dest, size, 32) +#define DmaStop(dmaNum) \ +{ \ + vu16 *dmaRegs = (vu16 *)REG_ADDR_DMA##dmaNum; \ + dmaRegs[5] &= ~(DMA_START_MASK | DMA_DREQ_ON | DMA_REPEAT); \ + dmaRegs[5] &= ~DMA_ENABLE; \ + dmaRegs[5]; \ +} + #endif // GUARD_GBA_MACRO_H |