2022-10-07 19:08:55 +00:00
|
|
|
#ifndef __SIPRIV_H__
|
|
|
|
#define __SIPRIV_H__
|
|
|
|
#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);
|
|
|
|
|
2022-10-08 05:53:41 +00:00
|
|
|
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);
|
|
|
|
|
2022-10-07 19:08:55 +00:00
|
|
|
BOOL SITransfer(s32 chan, void* output, u32 outputBytes, void* input, u32 inputBytes,
|
|
|
|
SICallback callback, OSTime delay);
|
2022-10-08 05:53:41 +00:00
|
|
|
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);
|
2022-10-07 19:08:55 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // __SIPRIV_H__
|