From 1f9c3382c451382756934e0eaf7d35b51ce3b1d4 Mon Sep 17 00:00:00 2001 From: red031000 Date: Tue, 30 Jun 2020 14:10:53 +0100 Subject: arm9 MI_dma_gxcommand, remove arm9_itcm.s --- arm9/lib/include/MI_dma_gxcommand.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 arm9/lib/include/MI_dma_gxcommand.h (limited to 'arm9/lib/include/MI_dma_gxcommand.h') diff --git a/arm9/lib/include/MI_dma_gxcommand.h b/arm9/lib/include/MI_dma_gxcommand.h new file mode 100644 index 00000000..29aa9c72 --- /dev/null +++ b/arm9/lib/include/MI_dma_gxcommand.h @@ -0,0 +1,37 @@ +#ifndef POKEDIAMOND_MI_DMA_GXCOMMAND_H +#define POKEDIAMOND_MI_DMA_GXCOMMAND_H + +#include "consts.h" +#include "MI_dma.h" +#include "GX_g3x.h" + +#define MIi_GX_LENGTH_ONCE (118 * sizeof(u32)) +#define REG_GXFIFO_ADDR 0x4000400 +#define MI_CNT_SEND32(size) (0x84400000 | (size/4)) +#define MI_CNT_SEND32_IF(size) (0xc4400000 | (size/4)) +#define MI_CNT_GXCOPY_IF(size) (0xfc400000 | (size/4)) + +#define OS_IE_GXFIFO 0x200000 + +typedef struct +{ + volatile BOOL isBusy; + + u32 dmaNo; + u32 src; + u32 length; + MIDmaCallback callback; + void *arg; + + GXFifoIntrCond fifoCond; + void (*fifoFunc) (void); +} MIiGXDmaParams; + +void MI_SendGXCommand(u32 dmaNo, const void *src, u32 commandLength); +void MI_SendGXCommandAsync(u32 dmaNo, const void *src, u32 commandLength, MIDmaCallback callback, void *arg); +static void MIi_FIFOCallback(void); +static void MIi_DMACallback(void *); +void MI_SendGXCommandAsyncFast(u32 dmaNo, const void *src, u32 commandLength, MIDmaCallback callback, void *arg); +static void MIi_DMAFastCallback(void *); + +#endif //POKEDIAMOND_MI_DMA_GXCOMMAND_H -- cgit v1.2.3