aboutsummaryrefslogtreecommitdiffstats
path: root/ports/ARMCM3/chcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/ARMCM3/chcore.h')
-rw-r--r--ports/ARMCM3/chcore.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h
index c213b9ffd..a0f0c4f4e 100644
--- a/ports/ARMCM3/chcore.h
+++ b/ports/ARMCM3/chcore.h
@@ -186,6 +186,13 @@ typedef struct {
*/
#define sys_enable_from_isr() sys_enable()
+/**
+ * Disables all the interrupt sources, even those having a priority higher
+ * to the kernel.
+ * In the Cortex-M3 it raises the priority mask to level 0.
+ */
+#define sys_disable_all() asm volatile ("cpsid i")
+
#if ENABLE_WFI_IDLE != 0
/**
* This port function is implemented as inlined code for performance reasons.