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

Function SIGetStatus

src/dolphin/src/si/SIBios.c:404–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404u32 SIGetStatus(s32 chan)
405{
406 BOOL enabled;
407 u32 sr;
408 int chanShift;
409
410 enabled = OSDisableInterrupts();
411 sr = __SIRegs[14];
412 chanShift = 8 * (SI_MAX_CHAN - 1 - chan);
413 sr >>= chanShift;
414 if (sr & SI_ERROR_NO_RESPONSE)
415 {
416 if (!(Type[chan] & SI_ERROR_BUSY))
417 {
418 Type[chan] = SI_ERROR_NO_RESPONSE;
419 }
420 }
421 OSRestoreInterrupts(enabled);
422 return sr;
423}
424
425void SISetCommand(s32 chan, u32 command)
426{

Callers 2

SIGetResponseRawFunction · 0.85
PADReadFunction · 0.85

Calls 1

OSDisableInterruptsFunction · 0.85

Tested by

no test coverage detected