aboutsummaryrefslogtreecommitdiffstats
path: root/ports/ARM7-LPC214x
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 14:56:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 14:56:02 +0000
commitea60d55415892ca1a98c735d95c310637b835bf3 (patch)
tree115e04acb0ff10b1e67c244c7441ba8940bbba1a /ports/ARM7-LPC214x
parent078651da50beaf9058569513eb6b6d7ea88df02e (diff)
downloadChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.tar.gz
ChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.tar.bz2
ChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@606 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/ARM7-LPC214x')
-rw-r--r--ports/ARM7-LPC214x/chcore.c55
1 files changed, 34 insertions, 21 deletions
diff --git a/ports/ARM7-LPC214x/chcore.c b/ports/ARM7-LPC214x/chcore.c
index 01f3e2d68..8969e8ee7 100644
--- a/ports/ARM7-LPC214x/chcore.c
+++ b/ports/ARM7-LPC214x/chcore.c
@@ -17,38 +17,51 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * @addtogroup ARM7_CORE
+ * @{
+ */
+
#include <ch.h>
#include "lpc214x.h"
/*
- * System idle thread loop.
+ * This file is a template of the system driver functions provided by a port.
+ * Some of the following functions may be implemented as macros in chcore.h if
+ * the implementer decides that there is an advantage in doing so, as example
+ * because performance concerns.
*/
-void _idle(void *p) {
- while (TRUE) {
-// Note, it is disabled because it causes trouble with the JTAG probe.
-// Enable it in the final code only.
-// PCON = 1;
- }
+/**
+ * Prints a message on the system console.
+ * @param msg pointer to the message
+ */
+__attribute__((weak))
+void sys_puts(char *msg) {
}
-/*
- * System console message (not implemented).
+/**
+ * Enters an architecture-dependent halt mode. The function is meant to return
+ * when an interrupt becomes pending.
*/
-void chSysPuts(char *msg) {
+__attribute__((weak))
+void sys_wait_for_interrupt(void) {
+
+ PCON = 1;
}
-/*
- * System halt.
+/**
+ * Halts the system. This function is invoked by the operating system when an
+ * unrecoverable error is detected (as example because a programming error in
+ * the application code that triggers an assertion while in debug mode).
*/
-__attribute__((naked, weak))
-void chSysHalt(void) {
-
-#ifdef THUMB
- asm volatile ("ldr r0, =_halt16");
- asm volatile ("bx r0");
-#else
- asm volatile ("b _halt32");
-#endif
+__attribute__((weak))
+void sys_halt(void) {
+
+ sys_disable_all();
+ while (TRUE) {
+ }
}
+
+/** @} */