summaryrefslogtreecommitdiffstats
path: root/nuttx/arch/arm/src/common
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-02-27 21:27:20 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-02-27 21:27:20 +0000
commitb82fdd50842676ed6972e5b85e55eb9b6207b610 (patch)
treec15b2bfbaf3e434818a98b3b25b4f031ca4eeab0 /nuttx/arch/arm/src/common
parentab53fe7d5beb43ef3fe90e8e3b0059ace5510846 (diff)
Special IDLE for STM32 will execut WFI to sleep until an interrupt occurs
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3324 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/common')
-rw-r--r--nuttx/arch/arm/src/common/up_idle.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/common/up_idle.c b/nuttx/arch/arm/src/common/up_idle.c
index ba6affb0e8..62557c3a8d 100644
--- a/nuttx/arch/arm/src/common/up_idle.c
+++ b/nuttx/arch/arm/src/common/up_idle.c
@@ -62,32 +62,30 @@
* Name: up_idle
*
* Description:
- * up_idle() is the logic that will be executed when their
- * is no other ready-to-run task. This is processor idle
- * time and will continue until some interrupt occurs to
- * cause a context switch from the idle task.
+ * up_idle() is the logic that will be executed when their is no other
+ * ready-to-run task. This is processor idle time and will continue until
+ * some interrupt occurs to cause a context switch from the idle task.
*
- * Processing in this state may be processor-specific. e.g.,
- * this is where power management operations might be
- * performed.
+ * Processing in this state may be processor-specific. e.g., this is where
+ * power management operations might be performed.
*
****************************************************************************/
void up_idle(void)
{
#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS)
- /* If the system is idle and there are no timer interrupts,
- * then process "fake" timer interrupts. Hopefully, something
- * will wake up.
+ /* If the system is idle and there are no timer interrupts, then process
+ * "fake" timer interrupts. Hopefully, something will wake up.
*/
sched_process_timer();
-#endif
+#else
/* Sleep until an interrupt occurs to save power */
#if 0
asm("WFI"); /* For example */
#endif
+#endif
}