aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/irq.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpu/irq.h b/src/cpu/irq.h
index 0403038..971d0b9 100644
--- a/src/cpu/irq.h
+++ b/src/cpu/irq.h
@@ -1,6 +1,19 @@
#ifndef CPU_IRQ_H
#define CPU_IRQ_H
+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");
+}
+
void c_irq_handler(void);
#endif