mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 22:27:51 -05:00
move first file to src in NitroSDK
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
#define NITRO_H_
|
||||
|
||||
#include <nitro/types.h>
|
||||
#include <nitro/os.h>
|
||||
|
||||
#endif //NITRO_H_
|
||||
|
||||
47
lib/include/nitro/os.h
Normal file
47
lib/include/nitro/os.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef NITRO_OS_H_
|
||||
#define NITRO_OS_H_
|
||||
|
||||
//#include <nitro/os/context.h>
|
||||
#include <nitro/os/system.h>
|
||||
//#include <nitro/os/systemWork.h>
|
||||
//#include <nitro/os/thread.h>
|
||||
//#include <nitro/os/mutex.h>
|
||||
//#include <nitro/os/interrupt.h>
|
||||
//#include <nitro/os/systemCall.h>
|
||||
//#include <nitro/os/spinLock.h>
|
||||
//#include <nitro/os/printf.h>
|
||||
//#include <nitro/os/init.h>
|
||||
//#include <nitro/os/exception.h>
|
||||
//#include <nitro/os/valarm.h>
|
||||
//#include <nitro/os/emulator.h>
|
||||
//#include <nitro/os/tick.h>
|
||||
//#include <nitro/os/alarm.h>
|
||||
//#include <nitro/os/ownerInfo.h>
|
||||
//#include <nitro/os/context.h>
|
||||
//#include <nitro/os/system.h>
|
||||
//#include <nitro/os/systemWork.h>
|
||||
//#include <nitro/os/thread.h>
|
||||
//#include <nitro/os/mutex.h>
|
||||
//#include <nitro/os/interrupt.h>
|
||||
//#include <nitro/os/systemCall.h>
|
||||
//#include <nitro/os/spinLock.h>
|
||||
//#include <nitro/os/printf.h>
|
||||
//#include <nitro/os/init.h>
|
||||
//#include <nitro/os/exception.h>
|
||||
//#include <nitro/os/valarm.h>
|
||||
//#include <nitro/os/emulator.h>
|
||||
//#include <nitro/os/tick.h>
|
||||
//#include <nitro/os/alarm.h>
|
||||
//#include <nitro/os/common/entropy.h>
|
||||
//#include <nitro/os/irqHandler.h>
|
||||
|
||||
//#ifdef SDK_ARM9
|
||||
//#include <nitro/os/cache.h>
|
||||
//#include <nitro/os/protectionRegion.h>
|
||||
//#include <nitro/os/protectionUnit.h>
|
||||
//#include <nitro/os/tcm.h>
|
||||
//#include <nitro/os/ARM9/vramExclusive.h>
|
||||
//#endif //SDK_ARM9
|
||||
|
||||
#endif //NITRO_OS_H_
|
||||
|
||||
29
lib/include/nitro/os/system.h
Normal file
29
lib/include/nitro/os/system.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef NITRO_OS_SYSTEM_H_
|
||||
#define NITRO_OS_SYSTEM_H_
|
||||
|
||||
// Enables processor interrupts by clearing the i flag in the program status register (cpsr).
|
||||
// return: Old value of cpsr & 0x80 (0x80 if interrupts were disabled, 0x0 if they were already enabled)
|
||||
u8 ClearIrqFlag();
|
||||
// Disables processor interrupts by setting the i flag in the program status register (cpsr).
|
||||
// return: Old value of cpsr & 0x80 (0x80 if interrupts were already disabled, 0x0 if they were enabled)
|
||||
u8 EnableIrqFlag();
|
||||
// Sets the value of the processor's interrupt flag according to the specified parameter.
|
||||
// flag: Value to set the flag to (0x80 to set it, which disables interrupts; 0x0 to unset it, which enables interrupts)
|
||||
// return: Old value of cpsr & 0x80 (0x80 if interrupts were disabled, 0x0 if they were enabled)
|
||||
u8 SetIrqFlag(u8 flag);
|
||||
// Disables processor all interrupts (both standard and fast) by setting the i and f flags in the program status register (cpsr).
|
||||
// return: Old value of cpsr & 0xC0 (contains the previous values of the i and f flags)
|
||||
u8 EnableIrqFiqFlags(void);
|
||||
// Sets the value of the processor's interrupt flags (i and f) according to the specified parameter.
|
||||
// flags: Value to set the flags to (0xC0 to set both flags, 0x80 to set the i flag and clear the f flag, 0x40 to set the f flag and clear the i flag and 0x0 to clear both flags)
|
||||
// return: Old value of cpsr & 0xC0 (contains the previous values of the i and f flags)
|
||||
u8 SetIrqFiqFlags(u8 flags);
|
||||
// Gets the current value of the processor's interrupt request (i) flag
|
||||
// return: cpsr & 0x80 (0x80 if interrupts are disabled, 0x0 if they are enabled)
|
||||
u8 GetIrqFlag();
|
||||
// Gets the processor's current operating mode.
|
||||
// See https://problemkaputt.de/gbatek.htm#armcpuflagsconditionfieldcond
|
||||
// return: cpsr & 0x1f (the cpsr mode bits M4-M0)
|
||||
u8 GetProcessorMode();
|
||||
|
||||
#endif //NITRO_OS_SYSTEM_H_
|
||||
Reference in New Issue
Block a user