Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/lib/src/__osEPiRawReadIo.c
7857 views
1
#include "libultra_internal.h"
2
#include "hardware.h"
3
4
s32 __osEPiRawReadIo(OSPiHandle *arg0, u32 devAddr, u32 *data) {
5
register s32 stat;
6
while (stat = HW_REG(PI_STATUS_REG, s32), stat & (PI_STATUS_BUSY | PI_STATUS_IOBUSY | PI_STATUS_ERROR)) {
7
;
8
}
9
*data = HW_REG(arg0->baseAddress | devAddr, s32);
10
return 0;
11
}
12
13