aboutsummaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-18 23:21:19 -0800
committerChristian Cunningham <cc@localhost>2021-12-18 23:21:19 -0800
commit5ee60a8f9010d3a5545d140192b630ae7e75d6ce (patch)
treeee3059d0d5f38250e064ebb832def20373e2b902 /src/sys
parente7668e69d43afd7d25a7a8da1eac894d3f4ff677 (diff)
Inline en/disable irq/fiq
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/core.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sys/core.h b/src/sys/core.h
index d720e17..3727a2b 100644
--- a/src/sys/core.h
+++ b/src/sys/core.h
@@ -16,6 +16,19 @@ static inline void delay(unsigned long cycles) {
: "=r"(cycles): [cycles]"0"(cycles) : "cc");
}
+static inline void enableirq() {
+ asm volatile("cpsie i");
+}
+static inline void disableirq() {
+ asm volatile("cpsid i");
+}
+static inline void enablefiq() {
+ asm volatile("cpsie f");
+}
+static inline void disablefiq() {
+ asm volatile("cpsid f");
+}
+
enum
{
// The offset for the MMIO area