X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Fasm.h;h=fc1075dc6924ec17cb259d793c1d9184fbf67f09;hp=f5440009ec6e5964d0ec79b252ffb658f9a17bb2;hb=574147e84aafb61db3cf8b595d2a12ce5ba160de;hpb=993155fee2327f1f3cda285c9548bbb09688a3f3 diff --git a/src/asm.h b/src/asm.h index f544000..fc1075d 100644 --- a/src/asm.h +++ b/src/asm.h @@ -1,15 +1,15 @@ #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 ( \ "0: subs %0, %0, #1\n\t" \ "bne 0b\n\t" \ :: "r"(x) : "cc") -*/ + +#define halt_cpu() asm volatile("wfe"); #endif /* ASM_H_ */