aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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