__osDpDeviceBusy from libreultra

This commit is contained in:
Ryan Myers
2021-10-21 08:56:10 -04:00
parent 4c5c7cb4f2
commit 24c78c8919
2 changed files with 15 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D6080 */
#include "libultra_internal.h"
#include "viint.h"
__OSViContext *__osViGetCurrentContext(void){
return __osViCurr;
}
+6 -5
View File
@@ -3,10 +3,11 @@
#include "macros.h"
#include "libultra_internal.h"
#include "viint.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDpDeviceBusy.s")
__OSViContext *__osViGetCurrentContext(void){
return __osViCurr;
int __osDpDeviceBusy(void) {
register u32 stat;
stat = IO_READ(DPC_STATUS_REG);
if (stat & DPC_STATUS_DMA_BUSY)
return 1;
return 0;
}