#ifndef _REVOLUTION_ARALT_H_ #define _REVOLUTION_ARALT_H_ #include #ifdef __cplusplus extern "C" { #endif typedef void (*ARQCallback)(u32 pointerToARQRequest); struct ARQRequest { /* 0x00 */ struct ARQRequest *next; /* 0x04 */ u32 owner; /* 0x08 */ u32 type; /* 0x0C */ u32 priority; /* 0x10 */ u32 source; /* 0x14 */ u32 dest; /* 0x18 */ u32 length; /* 0x1C */ ARQCallback callback; }; #define ARQ_DMA_ALIGNMENT 32 #define ARAM_DIR_MRAM_TO_ARAM 0x00 #define ARAM_DIR_ARAM_TO_MRAM 0x01 #define ARStartDMARead(mmem, aram, len) \ ARStartDMA(ARAM_DIR_ARAM_TO_MRAM, mmem, aram, len) #define ARStartDMAWrite(mmem, aram, len) \ ARStartDMA(ARAM_DIR_MRAM_TO_ARAM, mmem, aram, len) typedef struct ARQRequest ARQRequest; #define ARQ_TYPE_MRAM_TO_ARAM ARAM_DIR_MRAM_TO_ARAM #define ARQ_TYPE_ARAM_TO_MRAM ARAM_DIR_ARAM_TO_MRAM #define ARQ_PRIORITY_LOW 0 #define ARQ_PRIORITY_HIGH 1 // AR ARQCallback ARRegisterDMACallback(ARQCallback callback); void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length); u32 ARAlloc(u32 length); u32 ARInit(u32* stack_index_addr, u32 num_entries); u32 ARGetBaseAddress(void); u32 ARGetSize(void); // ARQ void ARQInit(void); #ifdef __cplusplus } #endif #endif