diff options
| author | kyleburnette <kyle@kyleburnette.com> | 2021-11-02 14:56:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-02 17:56:47 -0400 |
| commit | 9bae8900f0d8cf097a2d9e4e58e2e507941c4fd6 (patch) | |
| tree | 31dd347aa6537844499cc712b152b58b3b6f6d0f /src | |
| parent | 4841a4a0bf7c2ab92493d64c22442c4e584a7b99 (diff) | |
sp.c OK (#389)
* io/sp OK
* Fixed function prototype
* Made tharo's suggestions
Diffstat (limited to 'src')
| -rw-r--r-- | src/libultra/io/sp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libultra/io/sp.c b/src/libultra/io/sp.c index 6c829b062..db2e5b451 100644 --- a/src/libultra/io/sp.c +++ b/src/libultra/io/sp.c @@ -1,3 +1,10 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/boot/sp/__osSpDeviceBusy.s") +s32 __osSpDeviceBusy(void) { + register u32 status = HW_REG(SP_STATUS_REG, u32); + + if (status & (SP_STATUS_DMA_BUSY | SP_STATUS_DMA_FULL | SP_STATUS_IO_FULL)) { + return true; + } + return false; +} |
