summaryrefslogtreecommitdiff
path: root/lib/ultralib/src/io/sp.c
blob: 98e7c406ce5f9000d50d92485eb64d78a70a2f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "PR/os_internal.h"
#include "PR/rcp.h"
#include "PR/sptask.h"
#include "PRinternal/osint.h"

// TODO: this comes from a header
#ident "$Revision: 1.17 $"

int __osSpDeviceBusy(void) {
    register u32 stat = IO_READ(SP_STATUS_REG);

    if (stat & (SP_STATUS_DMA_BUSY | SP_STATUS_DMA_FULL | SP_STATUS_IO_FULL)) {
        return TRUE;
    } else {
        return FALSE;
    }
}