From dec8eecc8eaa46edad5b380c1d26c28c576c276b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 18 Jan 2009 09:12:08 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@630 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-GCC/Makefile | 2 +- ports/ARM7-LPC214x/chcore.c | 67 ----------------------------------------- ports/ARM7/chcore.c | 46 ++++++++++++++++++++++++++++ ports/ARM7/chcore.h | 2 +- 4 files changed, 48 insertions(+), 69 deletions(-) delete mode 100644 ports/ARM7-LPC214x/chcore.c create mode 100644 ports/ARM7/chcore.c diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 1eb4d602f..478e9a287 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -69,7 +69,7 @@ include ../../src/kernel.mk include ../../test/test.mk # List ARM-mode C source files here -ASRC = ../../ports/ARM7-LPC214x/chcore.c \ +ASRC = ../../ports/ARM7/chcore.c \ ../../ports/ARM7-LPC214x/vic.c \ ../../ports/ARM7-LPC214x/lpc214x_serial.c \ ../../ports/ARM7-LPC214x/lpc214x_ssp.c \ diff --git a/ports/ARM7-LPC214x/chcore.c b/ports/ARM7-LPC214x/chcore.c deleted file mode 100644 index 46f0bea04..000000000 --- a/ports/ARM7-LPC214x/chcore.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. - - This file is part of ChibiOS/RT. - - ChibiOS/RT is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - ChibiOS/RT is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/** - * @addtogroup ARM7_CORE - * @{ - */ - -#include - -#include "lpc214x.h" - -/* - * 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. - */ - -/** - * Prints a message on the system console. - * @param msg pointer to the message - */ -__attribute__((weak)) -void port_puts(char *msg) { -} - -/** - * Enters an architecture-dependent halt mode. The function is meant to return - * when an interrupt becomes pending. - */ -__attribute__((weak)) -void port_wait_for_interrupt(void) { - -#if ENABLE_WFI_IDLE != 0 - PCON = 1; -#endif -} - -/** - * Halts the system. - */ -__attribute__((weak)) -void port_halt(void) { - - port_disable(); - while (TRUE) { - } -} - -/** @} */ diff --git a/ports/ARM7/chcore.c b/ports/ARM7/chcore.c new file mode 100644 index 000000000..d7d51c85b --- /dev/null +++ b/ports/ARM7/chcore.c @@ -0,0 +1,46 @@ +/* + ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/** + * @addtogroup ARM7_CORE + * @{ + */ + +#include + +/** + * Prints a message on the system console. + * @param msg pointer to the message + */ +__attribute__((weak)) +void port_puts(char *msg) { +} + +/** + * Halts the system. + */ +__attribute__((weak)) +void port_halt(void) { + + port_disable(); + while (TRUE) { + } +} + +/** @} */ diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 1a949ad79..cd6d40590 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -31,6 +31,7 @@ #ifndef ENABLE_WFI_IDLE #define ENABLE_WFI_IDLE 0 #endif +#include /** * Macro defining the ARM7 architecture. @@ -265,7 +266,6 @@ typedef struct { extern "C" { #endif void port_puts(char *msg); - void port_wait_for_interrupt(void); void port_halt(void); #ifdef THUMB void _port_lock_thumb(void); -- cgit v1.2.3