From 8e2d082b7bb0c2b9d938f7bb32dc9425767b645d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 1 Aug 2008 09:24:16 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@380 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARMCM3/chcore.c | 4 +++- ports/ARMCM3/chcore.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'ports') diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c index 199c71fd9..b9c7ce39a 100644 --- a/ports/ARMCM3/chcore.c +++ b/ports/ARMCM3/chcore.c @@ -27,7 +27,9 @@ __attribute__((weak)) void _IdleThread(void *p) { while (TRUE) { -// asm volatile ("wfi"); +#if ENABLE_WFI_IDLE != 0 + asm volatile ("wfi"); +#endif } } diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index 17b9e5b0b..1e451dfc7 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -29,6 +29,7 @@ typedef void *regarm; */ #define BASEPRI_USER 0 /* User level BASEPRI, 0 = disabled. */ #define BASEPRI_KERNEL 0x10 /* BASEPRI level within kernel lock. */ +#define ENABLE_WFI_IDLE 0 /* Enables the use of the WFI ins. */ /* * Interrupt saved context, empty in this architecture. -- cgit v1.2.3