diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:45:02 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:50:25 -0400 |
commit | 9fa0a7f1da1b70bee995f53c6c96c43189018772 (patch) | |
tree | 114548896790eaff23cdca84a025281de86bbb51 /include/dolphin/arq.h | |
parent | 2ba3289286bbfcf9fcc13fd135d976058d8b6c2e (diff) |
global: Import Dolphin SDK
This version comes from the Metroid Prime decompilation project.
https://github.com/PrimeDecomp/prime
Diffstat (limited to 'include/dolphin/arq.h')
-rw-r--r-- | include/dolphin/arq.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/dolphin/arq.h b/include/dolphin/arq.h new file mode 100644 index 0000000..c897454 --- /dev/null +++ b/include/dolphin/arq.h @@ -0,0 +1,48 @@ +#ifndef _DOLPHIN_ARQ +#define _DOLPHIN_ARQ + +#include "types.h" + +#include "dolphin/ar.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#include "dolphin/ar.h" + +#define ARQ_DMA_ALIGNMENT 32 +#define ARQ_CHUNK_SIZE_DEFAULT 4096 + +#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 + +typedef void (*ARQCallback)(u32 pointerToARQRequest); + +typedef struct ARQRequest { + + struct ARQRequest* next; + u32 owner; + u32 type; + u32 priority; + u32 source; + u32 dest; + u32 length; + ARQCallback callback; + +} ARQRequest; + +void ARQInit(void); +void ARQReset(void); +void ARQPostRequest(ARQRequest* task, u32 owner, u32 type, u32 priority, u32 source, u32 dest, + u32 length, ARQCallback callback); +u32 ARQGetChunkSize(void); + +#ifdef __cplusplus +} +#endif + +#endif // _DOLPHIN_ARQ |