MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / SIInit

Function SIInit

src/dolphin/src/si/SIBios.c:334–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void SIInit(void)
335{
336 OSRegisterVersion(__SIVersion);
337
338 Packet[0].chan = Packet[1].chan = Packet[2].chan = Packet[3].chan = -1;
339
340 Si.poll = 0;
341 SISetSamplingRate(0);
342
343 while (__SIRegs[13] & 1)
344 ;
345
346 __SIRegs[13] = 0x80000000;
347
348 __OSSetInterruptHandler(__OS_INTERRUPT_PI_SI, SIInterruptHandler);
349 __OSUnmaskInterrupts(OS_INTERRUPTMASK_PI_SI);
350
351 SIGetType(0);
352 SIGetType(1);
353 SIGetType(2);
354 SIGetType(3);
355}
356
357#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
358

Callers 1

OSInitFunction · 0.85

Calls 4

OSRegisterVersionFunction · 0.85
SISetSamplingRateFunction · 0.85
__OSUnmaskInterruptsFunction · 0.85
SIGetTypeFunction · 0.85

Tested by

no test coverage detected