summaryrefslogtreecommitdiff
path: root/include/dolphin/sipriv.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-02-01 18:45:02 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-02-01 18:50:25 -0400
commit9fa0a7f1da1b70bee995f53c6c96c43189018772 (patch)
tree114548896790eaff23cdca84a025281de86bbb51 /include/dolphin/sipriv.h
parent2ba3289286bbfcf9fcc13fd135d976058d8b6c2e (diff)
global: Import Dolphin SDK
This version comes from the Metroid Prime decompilation project. https://github.com/PrimeDecomp/prime
Diffstat (limited to 'include/dolphin/sipriv.h')
-rw-r--r--include/dolphin/sipriv.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/dolphin/sipriv.h b/include/dolphin/sipriv.h
new file mode 100644
index 0000000..8c8508c
--- /dev/null
+++ b/include/dolphin/sipriv.h
@@ -0,0 +1,52 @@
+#ifndef _DOLPHIN_SIPRIV
+#define _DOLPHIN_SIPRIV
+
+#include "dolphin/os.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*SICallback)(s32 chan, u32 sr, OSContext* context);
+typedef void (*SITypeAndStatusCallback)(s32 chan, u32 type);
+
+typedef struct SIPacket {
+ s32 chan;
+ void* output;
+ u32 outputBytes;
+ void* input;
+ u32 inputBytes;
+ SICallback callback;
+ OSTime fire;
+} SIPacket;
+
+void SIInit(void);
+u32 SIGetStatus(s32 chan);
+
+BOOL SIBusy(void);
+BOOL SIIsChanBusy(s32 chan);
+
+BOOL SITransfer(s32 chan, void* output, u32 outputBytes, void* input, u32 inputBytes,
+ SICallback callback, OSTime delay);
+u32 SISync(void);
+
+void SISetCommand(s32 chan, u32 command);
+u32 SIGetCommand(s32 chan);
+void SITransferCommands(void);
+u32 SISetXY(u32 x, u32 y);
+u32 SIEnablePolling(u32 poll);
+u32 SIDisablePolling(u32 poll);
+BOOL SIGetResponse(s32 chan, void* data);
+
+BOOL SIRegisterPollingHandler(__OSInterruptHandler handler);
+BOOL SIUnregisterPollingHandler(__OSInterruptHandler handler);
+
+u32 SIGetType(s32 chan);
+u32 SIGetTypeAsync(s32 chan, SITypeAndStatusCallback callback);
+u32 SIDecodeType(u32 type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _DOLPHIN_SIPRIV