diff options
author | Christian Cunningham <cc@localhost> | 2021-12-18 23:21:19 -0800 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2021-12-18 23:21:19 -0800 |
commit | 5ee60a8f9010d3a5545d140192b630ae7e75d6ce (patch) | |
tree | ee3059d0d5f38250e064ebb832def20373e2b902 /src/sys | |
parent | e7668e69d43afd7d25a7a8da1eac894d3f4ff677 (diff) |
Inline en/disable irq/fiq
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/core.h | 13 |
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 |