sm64pc/lib/src/__osSpDeviceBusy.c

11 lines
252 B
C
Raw Normal View History

2019-08-25 04:46:40 +00:00
#include "libultra_internal.h"
#include "hardware.h"
s32 __osSpDeviceBusy() {
register u32 status = HW_REG(SP_STATUS_REG, u32);
2019-09-01 19:50:50 +00:00
if (status & (SPSTATUS_IO_FULL | SPSTATUS_DMA_FULL | SPSTATUS_DMA_BUSY)) {
2019-08-25 04:46:40 +00:00
return 1;
2019-09-01 19:50:50 +00:00
}
2019-08-25 04:46:40 +00:00
return 0;
}