diff options
Diffstat (limited to 'arm7/lib')
-rw-r--r-- | arm7/lib/include/OS_init.h | 2 | ||||
-rw-r--r-- | arm7/lib/include/OS_system.h | 31 | ||||
-rw-r--r-- | arm7/lib/include/consts.h | 6 | ||||
-rw-r--r-- | arm7/lib/include/types.h | 50 |
4 files changed, 12 insertions, 77 deletions
diff --git a/arm7/lib/include/OS_init.h b/arm7/lib/include/OS_init.h index 1416fe8c..50d5e3c4 100644 --- a/arm7/lib/include/OS_init.h +++ b/arm7/lib/include/OS_init.h @@ -1,7 +1,7 @@ #ifndef POKEDIAMOND_ARM7_OS_INIT_H #define POKEDIAMOND_ARM7_OS_INIT_H -#include "types.h" +#include "nitro/types.h" #include "OS_system.h" void OS_Init(void); diff --git a/arm7/lib/include/OS_system.h b/arm7/lib/include/OS_system.h index b6c81ab4..85e607ea 100644 --- a/arm7/lib/include/OS_system.h +++ b/arm7/lib/include/OS_system.h @@ -1,36 +1,15 @@ #ifndef POKEDIAMOND_ARM7_OS_SYSTEM_H #define POKEDIAMOND_ARM7_OS_SYSTEM_H -#include "types.h" - -//todo consts.h -#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode - -#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ -#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ -#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ - -typedef enum { - OS_PROCMODE_USER=16, - OS_PROCMODE_FIQ=17, - OS_PROCMODE_IRQ=18, - OS_PROCMODE_SVC=19, - OS_PROCMODE_ABORT=23, - OS_PROCMODE_UNDEF=27, - OS_PROCMODE_SYS=31 -} OSProcMode; - -typedef enum { - OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ, - OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ, - OS_INTRMODE_ENABLE = 0 -} OSIntrMode; +#include "nitro/types.h" +#include "consts.h" +#include "nitro/OS_system_shared.h" OSIntrMode OS_EnableInterrupts(void); OSIntrMode OS_DisableInterrupts(void); -OSIntrMode OS_RestoreInterrupts(register OSIntrMode state); +OSIntrMode OS_RestoreInterrupts(OSIntrMode state); OSIntrMode OS_DisableInterrupts_IrqAndFiq(void); -OSIntrMode OS_RestoreInterrupts_IrqAndFiq(register OSIntrMode state); +OSIntrMode OS_RestoreInterrupts_IrqAndFiq(OSIntrMode state); OSProcMode OS_GetProcMode(void); void OS_SpinWait(u32 cycle); diff --git a/arm7/lib/include/consts.h b/arm7/lib/include/consts.h new file mode 100644 index 00000000..aaf8e429 --- /dev/null +++ b/arm7/lib/include/consts.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_ARM7_CONSTS_H +#define POKEDIAMOND_ARM7_CONSTS_H + +#include "nitro/consts_shared.h" + +#endif //POKEDIAMOND_ARM7_CONSTS_H diff --git a/arm7/lib/include/types.h b/arm7/lib/include/types.h deleted file mode 100644 index 3a497c56..00000000 --- a/arm7/lib/include/types.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef POKEDIAMOND_ARM7_TYPES_H -#define POKEDIAMOND_ARM7_TYPES_H - -typedef unsigned char u8; -typedef unsigned short int u16; -typedef unsigned long u32; - -typedef signed char s8; -typedef signed short int s16; -typedef signed long s32; - -typedef unsigned long long int u64; -typedef signed long long int s64; - -typedef volatile u8 vu8; -typedef volatile u16 vu16; -typedef volatile u32 vu32; -typedef volatile u64 vu64; - -typedef volatile s8 vs8; -typedef volatile s16 vs16; -typedef volatile s32 vs32; -typedef volatile s64 vs64; - -typedef float f32; -typedef volatile f32 vf32; - -typedef u8 REGType8; -typedef u16 REGType16; -typedef u32 REGType32; -typedef u64 REGType64; - -typedef vu8 REGType8v; -typedef vu16 REGType16v; -typedef vu32 REGType32v; -typedef vu64 REGType64v; - -typedef int BOOL; -#define TRUE 1 -#define FALSE 0 - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else // __cplusplus -#define NULL ((void *)0) -#endif // __cplusplus -#endif - -#endif //POKEDIAMOND_NITRO_TYPES_H |