[rtems commit] bsp/lpc32xx: Add idle thread body
Sebastian Huber
sebh at rtems.org
Tue Dec 18 10:18:04 UTC 2012
Module: rtems
Branch: master
Commit: f25d31f52b4c21d5bf2ea01642939e2a0b4ac08c
Changeset: http://git.rtems.org/rtems/commit/?id=f25d31f52b4c21d5bf2ea01642939e2a0b4ac08c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Dec 17 16:40:23 2012 +0100
bsp/lpc32xx: Add idle thread body
---
c/src/lib/libbsp/arm/lpc32xx/Makefile.am | 1 +
c/src/lib/libbsp/arm/lpc32xx/include/bsp.h | 4 +++
c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c | 34 +++++++++++++++++++++++
3 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
index 09c385d..37a4793 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
@@ -137,6 +137,7 @@ libbsp_a_SOURCES += misc/restart.c
libbsp_a_SOURCES += misc/system-clocks.c
libbsp_a_SOURCES += misc/timer.c
libbsp_a_SOURCES += misc/nand-select.c
+libbsp_a_SOURCES += misc/idle-thread.c
# SSP
diff --git a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
index 5d9d18a..5e6800f 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
@@ -149,6 +149,10 @@ void lpc32xx_select_nand_controller(lpc32xx_nand_controller nand_controller);
void bsp_restart(void *addr);
+void *bsp_idle_thread(uintptr_t arg);
+
+#define BSP_IDLE_TASK_BODY bsp_idle_thread
+
#define BSP_CONSOLE_UART_BASE LPC32XX_BASE_UART_5
/**
diff --git a/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c b/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c
new file mode 100644
index 0000000..0ac51c0
--- /dev/null
+++ b/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ *
+ * @ingroup lpc32xx
+ *
+ * @brief bsp_idle_thread() implementation.
+ */
+
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <bsp.h>
+
+#include <libcpu/arm-cp15.h>
+
+void *bsp_idle_thread(uintptr_t arg)
+{
+ while (true) {
+ arm_cp15_wait_for_interrupt();
+ }
+
+ return NULL;
+}
More information about the vc
mailing list