SSBM Decomp
Loading...
Searching...
No Matches
OSSerial.c File Reference
#include <dolphin.h>
#include "__os.h"
#include <dolphin/os.h>
#include <dolphin/si.h>

Macros

#define SI_CHAN0_BIT   0x80000000
#define SI_CHAN1_BIT   0x40000000
#define SI_CHAN2_BIT   0x20000000
#define SI_CHAN3_BIT   0x10000000

Functions

static unsigned long CompleteTransfer ()
static void SITransferNext (long chan)
static void SIIntrruptHandler (short unused, struct OSContext *context)
static int __SITransfer (long chan, void *output, unsigned long outputBytes, void *input, unsigned long inputBytes, void(*callback)(long, unsigned long, struct OSContext *))
static void AlarmHandler (struct OSAlarm *alarm, struct OSContext *context)
int SIBusy ()
BOOL SIIsChanBusy (int chan)
static void SIClearTCInterrupt ()
static BOOL SIGetResponseRaw (s32 chan)
static void GetTypeCallback (s32 chan, u32 error, OSContext *context)
static void SIInterruptHandler (__OSInterrupt interrupt, OSContext *context)
static BOOL SIEnablePollingInterrupt (BOOL enable)
BOOL SIRegisterPollingHandler (__OSInterruptHandler handler)
BOOL SIUnregisterPollingHandler (__OSInterruptHandler handler)
void SIInit ()
unsigned long SISync ()
unsigned long SIGetStatus (int chan)
static unsigned long SIGetStatus_dontinline (int chan)
void SISetCommand (long chan, unsigned long command)
unsigned long SIGetCommand (long chan)
void SITransferCommands ()
unsigned long SISetXY (unsigned long x, unsigned long y)
unsigned long SIEnablePolling (unsigned long poll)
unsigned long SIDisablePolling (unsigned long poll)
static int SIGetResponseRaw (long chan)
BOOL SIGetResponse (s32 chan, void *data)
int SITransfer (long chan, void *output, unsigned long outputBytes, void *input, unsigned long inputBytes, void(*callback)(long, unsigned long, struct OSContext *), OSTime delay)
static void CallTypeAndStatusCallback (s32 chan, u32 type)
u32 SIGetType (s32 chan)
u32 SIGetTypeAsync (s32 chan, SITypeAndStatusCallback callback)
static void dummy ()

Variables

static struct SIControl Si
u32 __PADFixBits
static struct SIPacket Packet [4]
static struct OSAlarm Alarm [4]
static u64 TypeTime [4]
static OSTime XferTime [SI_MAX_CHAN]
static SITypeAndStatusCallback TypeCallback [SI_MAX_CHAN][4]
static __OSInterruptHandler RDSTHandler [4]
static BOOL InputBufferValid [SI_MAX_CHAN]
static u32 InputBuffer [SI_MAX_CHAN][2]
static volatile u32 InputBufferVcount [SI_MAX_CHAN]
static u32 cmdFixDevice [SI_MAX_CHAN]
static u32 Type [SI_MAX_CHAN]

Macro Definition Documentation

◆ SI_CHAN0_BIT

#define SI_CHAN0_BIT   0x80000000

◆ SI_CHAN1_BIT

#define SI_CHAN1_BIT   0x40000000

◆ SI_CHAN2_BIT

#define SI_CHAN2_BIT   0x20000000

◆ SI_CHAN3_BIT

#define SI_CHAN3_BIT   0x10000000

Function Documentation

◆ CompleteTransfer()

unsigned long CompleteTransfer ( )
static

◆ SITransferNext()

void SITransferNext ( long chan)
static

◆ SIIntrruptHandler()

void SIIntrruptHandler ( short unused,
struct OSContext * context )
static

◆ __SITransfer()

int __SITransfer ( long chan,
void * output,
unsigned long outputBytes,
void * input,
unsigned long inputBytes,
void(* callback )(long, unsigned long, struct OSContext *) )
static

◆ AlarmHandler()

void AlarmHandler ( struct OSAlarm * alarm,
struct OSContext * context )
static

◆ SIBusy()

int SIBusy ( void )

◆ SIIsChanBusy()

BOOL SIIsChanBusy ( int chan)

◆ SIClearTCInterrupt()

void SIClearTCInterrupt ( )
static

◆ SIGetResponseRaw() [1/2]

BOOL SIGetResponseRaw ( s32 chan)
static

◆ GetTypeCallback()

void GetTypeCallback ( s32 chan,
u32 error,
OSContext * context )
static

◆ SIInterruptHandler()

void SIInterruptHandler ( __OSInterrupt interrupt,
OSContext * context )
static

◆ SIEnablePollingInterrupt()

BOOL SIEnablePollingInterrupt ( BOOL enable)
static

◆ SIRegisterPollingHandler()

BOOL SIRegisterPollingHandler ( __OSInterruptHandler handler)

◆ SIUnregisterPollingHandler()

BOOL SIUnregisterPollingHandler ( __OSInterruptHandler handler)

◆ SIInit()

void SIInit ( )

◆ SISync()

unsigned long SISync ( )

◆ SIGetStatus()

unsigned long SIGetStatus ( int chan)

◆ SIGetStatus_dontinline()

unsigned long SIGetStatus_dontinline ( int chan)
static

◆ SISetCommand()

void SISetCommand ( long chan,
unsigned long command )

◆ SIGetCommand()

unsigned long SIGetCommand ( long chan)

◆ SITransferCommands()

void SITransferCommands ( void )

◆ SISetXY()

unsigned long SISetXY ( unsigned long x,
unsigned long y )

◆ SIEnablePolling()

unsigned long SIEnablePolling ( unsigned long poll)

◆ SIDisablePolling()

unsigned long SIDisablePolling ( unsigned long poll)

◆ SIGetResponseRaw() [2/2]

int SIGetResponseRaw ( long chan)
static

◆ SIGetResponse()

BOOL SIGetResponse ( s32 chan,
void * data )

◆ SITransfer()

int SITransfer ( long chan,
void * output,
unsigned long outputBytes,
void * input,
unsigned long inputBytes,
void(* callback )(long, unsigned long, struct OSContext *),
OSTime delay )

◆ CallTypeAndStatusCallback()

void CallTypeAndStatusCallback ( s32 chan,
u32 type )
static

◆ SIGetType()

u32 SIGetType ( s32 chan)

◆ SIGetTypeAsync()

u32 SIGetTypeAsync ( s32 chan,
SITypeAndStatusCallback callback )

◆ dummy()

void dummy ( )
static

Variable Documentation

◆ Si

struct SIControl Si
static
Initial value:
= {
-1,
0,
0,
}
#define NULL
Definition stddef.h:19

◆ __PADFixBits

u32 __PADFixBits

◆ Packet

struct SIPacket Packet[4]
static

◆ Alarm

struct OSAlarm Alarm[4]
static

◆ TypeTime

u64 TypeTime[4]
static

◆ XferTime

OSTime XferTime[SI_MAX_CHAN]
static

◆ TypeCallback

SITypeAndStatusCallback TypeCallback[SI_MAX_CHAN][4]
static

◆ RDSTHandler

__OSInterruptHandler RDSTHandler[4]
static

◆ InputBufferValid

BOOL InputBufferValid[SI_MAX_CHAN]
static

◆ InputBuffer

u32 InputBuffer[SI_MAX_CHAN][2]
static

◆ InputBufferVcount

volatile u32 InputBufferVcount[SI_MAX_CHAN]
static

◆ cmdFixDevice

u32 cmdFixDevice[SI_MAX_CHAN]
static

◆ Type

u32 Type[SI_MAX_CHAN]
static
Initial value: