X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Fasm.h;h=fc1075dc6924ec17cb259d793c1d9184fbf67f09;hp=61d29ac7117bad1ccc8f58b0b4890ae67cc4d03a;hb=574147e84aafb61db3cf8b595d2a12ce5ba160de;hpb=36f1048dfeec94c6f305b76082fecec93347b2ec diff --git a/src/asm.h b/src/asm.h index 61d29ac..fc1075d 100644 --- a/src/asm.h +++ b/src/asm.h @@ -1,8 +1,8 @@ #ifndef ASM_H_ #define ASM_H_ -#define enable_intr() asm volatile ("cpsie i") -#define disable_intr() asm volatile ("cpsid i") +#define enable_intr() asm volatile ("cpsie if") +#define disable_intr() asm volatile ("cpsid if") #define mem_barrier() asm volatile ("dmb" ::: "memory") #define delay(x) asm volatile ( \ @@ -10,4 +10,6 @@ "bne 0b\n\t" \ :: "r"(x) : "cc") +#define halt_cpu() asm volatile("wfe"); + #endif /* ASM_H_ */