diff options
author | Martmists <martmists@gmail.com> | 2020-04-23 14:28:27 +0200 |
---|---|---|
committer | Martmists <martmists@gmail.com> | 2020-04-23 14:28:27 +0200 |
commit | 4e2316c01dea50716173a97f36228d2b9607964f (patch) | |
tree | cca579f8e74b24f1f95ec2dc2e184b156f26be44 /include/nitro/os_system.h | |
parent | 9b3107c478c9f39c17ef4171c9c5330adcb1385a (diff) |
Estimate file boundaries for os_alloc
Diffstat (limited to 'include/nitro/os_system.h')
-rw-r--r-- | include/nitro/os_system.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/nitro/os_system.h b/include/nitro/os_system.h new file mode 100644 index 00000000..0c4e37d8 --- /dev/null +++ b/include/nitro/os_system.h @@ -0,0 +1,39 @@ +// +// Created by mart on 4/23/20. +// + +#ifndef POKEDIAMOND_OS_SYSTEM_H +#define POKEDIAMOND_OS_SYSTEM_H + +#include "consts.h" + +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_IRQ_DISABLE = HW_PSR_IRQ_DISABLE, + OS_INTRMODE_IRQ_ENABLE = 0 +} OSIntrMode_Irq; + +typedef enum { + OS_INTRMODE_FIQ_DISABLE = HW_PSR_FIQ_DISABLE, + OS_INTRMODE_FIQ_ENABLE = 0 +} OSIntrMode_Fiq; + +typedef union { + OSIntrMode_Fiq mode_fiq; + OSIntrMode_Irq mode_irq; +} OSIntrMode; + +OSProcMode OS_GetProcMode(); +OSIntrMode OS_DisableInterrupts(); +OSIntrMode OS_RestoreInterrupts(OSIntrMode state); + +#endif //POKEDIAMOND_OS_SYSTEM_H |