From 48c87272fef9287a301176e9a83737fb5e78ba51 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 10 Jan 2009 15:02:43 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@608 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARM7-AT91SAM7X/chcore.c | 2 ++ ports/ARM7-LPC214x/chcore.c | 2 ++ ports/ARM7/chcore.h | 7 +++++++ ports/MSP430/chcore.h | 4 ++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ports/ARM7-AT91SAM7X/chcore.c b/ports/ARM7-AT91SAM7X/chcore.c index d2a77950a..1d40a840a 100644 --- a/ports/ARM7-AT91SAM7X/chcore.c +++ b/ports/ARM7-AT91SAM7X/chcore.c @@ -48,7 +48,9 @@ void sys_puts(char *msg) { __attribute__((weak)) void sys_wait_for_interrupt(void) { +#if ENABLE_WFI_IDLE != 0 PCON = 1; +#endif } /** diff --git a/ports/ARM7-LPC214x/chcore.c b/ports/ARM7-LPC214x/chcore.c index 8969e8ee7..858214ea3 100644 --- a/ports/ARM7-LPC214x/chcore.c +++ b/ports/ARM7-LPC214x/chcore.c @@ -48,7 +48,9 @@ void sys_puts(char *msg) { __attribute__((weak)) void sys_wait_for_interrupt(void) { +#if ENABLE_WFI_IDLE != 0 PCON = 1; +#endif } /** diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index ae914b8bd..a446fdb7e 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -25,6 +25,13 @@ #ifndef _CHCORE_H_ #define _CHCORE_H_ +/** + * If enabled allows the idle thread to enter a low power mode. + */ +#ifndef ENABLE_WFI_IDLE +#define ENABLE_WFI_IDLE 0 +#endif + /** * Macro defining the ARM7 architecture. */ diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index 6481d8658..7f27c3f8b 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -28,8 +28,8 @@ #include #include -/* - * Port-related configuration parameters. +/** + * If enabled allows the idle thread to enter a low power mode. */ #ifndef ENABLE_WFI_IDLE #define ENABLE_WFI_IDLE 0