mirror of
https://github.com/sonicdcer/sf64.git
synced 2024-11-23 21:09:56 +00:00
move to header
This commit is contained in:
parent
4e1b602d1e
commit
02784c1865
@ -59,6 +59,8 @@ typedef double f64; /* double prec floating point */
|
||||
|
||||
typedef u32 size_t;
|
||||
|
||||
typedef unsigned long int uintptr_t;
|
||||
|
||||
typedef float Matrix[4][4];
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
9
include/hardware.h
Normal file
9
include/hardware.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef _HARDWARE_H_
|
||||
#define _HARDWARE_H_
|
||||
|
||||
#define HW_REG(reg, type) *(volatile type *)(uintptr_t)((reg) | 0xa0000000)
|
||||
|
||||
#define AI_STATUS_REG 0x0450000C
|
||||
#define AI_STATUS_AI_FULL (1 << 31)
|
||||
|
||||
#endif
|
@ -1,12 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "PR/rcp.h"
|
||||
|
||||
// TODO: Put in proper header:
|
||||
typedef unsigned long int uintptr_t;
|
||||
|
||||
#define HW_REG(reg, type) *(volatile type*)(uintptr_t)((reg) | 0xa0000000)
|
||||
#define AI_STATUS_REG 0x0450000C
|
||||
#define AI_STATUS_AI_FULL (1 << 31)
|
||||
#include "hardware.h"
|
||||
|
||||
s32 __osAiDeviceBusy(void) {
|
||||
register s32 status = HW_REG(AI_STATUS_REG, u32);
|
||||
|
Loading…
Reference in New Issue
Block a user