diff options
author | red031000 <rubenru09@aol.com> | 2020-05-26 01:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 01:54:32 +0100 |
commit | 227da51c377f621f542ffdb52ef56bfb807f29ab (patch) | |
tree | 31ec68ffd57f0d43df60f6885636cc12de782306 /arm9/lib/src/OS_protectionUnit.c | |
parent | 895b0ad8b9c09a0b6b1de59de76ed4a258076f87 (diff) | |
parent | 0985659425ab1a9035d85512e330cdc247b24e6b (diff) |
Merge pull request #109 from red031000/master
OS_protectionUnit.c + warning fixes
Diffstat (limited to 'arm9/lib/src/OS_protectionUnit.c')
-rw-r--r-- | arm9/lib/src/OS_protectionUnit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arm9/lib/src/OS_protectionUnit.c b/arm9/lib/src/OS_protectionUnit.c new file mode 100644 index 00000000..6d3b7952 --- /dev/null +++ b/arm9/lib/src/OS_protectionUnit.c @@ -0,0 +1,22 @@ +// +// Created by red031000 on 2020-05-24. +// + +#include "function_target.h" +#include "OS_protectionUnit.h" + +ARM_FUNC asm void OS_EnableProtectionUnit(void) +{ + mrc p15, 0x0, r0, c1, c0, 0x0 + orr r0, r0, #0x1 + mcr p15, 0x0, r0, c1, c0, 0x0 + bx lr +} + +ARM_FUNC asm void OS_DisableProtectionUnit(void) +{ + mrc p15, 0x0, r0, c1, c0, 0x0 + bic r0, r0, #0x1 + mcr p15, 0x0, r0, c1, c0, 0x0 + bx lr +} |