diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-21 09:32:58 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-21 09:32:58 +0000 |
commit | 89cd6853e753c32903a9a6d48e3fe26be8999f97 (patch) | |
tree | e14379985a15e41677518e35b77d9f83484471ed /demos | |
parent | eea9d6ba8ee39a2ff814412f06a66288be39d709 (diff) | |
download | ChibiOS-89cd6853e753c32903a9a6d48e3fe26be8999f97.tar.gz ChibiOS-89cd6853e753c32903a9a6d48e3fe26be8999f97.tar.bz2 ChibiOS-89cd6853e753c32903a9a6d48e3fe26be8999f97.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1095 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-LPC214x-G++/Makefile | 14 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/board.c | 6 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/main.cpp | 12 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/Makefile | 9 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/board.c | 2 |
5 files changed, 25 insertions, 18 deletions
diff --git a/demos/ARM7-LPC214x-G++/Makefile b/demos/ARM7-LPC214x-G++/Makefile index 5709a5dd3..1940c8509 100644 --- a/demos/ARM7-LPC214x-G++/Makefile +++ b/demos/ARM7-LPC214x-G++/Makefile @@ -53,15 +53,16 @@ CSRC = ${PORTSRC} \ ${KERNSRC} \
${TESTSRC} \
../../os/io/pal.c \
- ../../os/ports/GCC//ARM7/LPC214x/vic.c \
- ../../os/ports/GCC/ARM7/LPC214x/pal_lld.c \
- ../../os/ports/GCC/ARM7/LPC214x/lpc214x_serial.c \
+ ../../os/io/serial.c \
+ ../../os/io/platforms/LPC214x/pal_lld.c \
+ ../../os/io/platforms/LPC214x/serial_lld.c \
+ ../../os/io/platforms/LPC214x/vic.c \
../../os/various/evtimer.c \
board.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CPPSRC = ../../src/lib/ch.cpp main.cpp
+CPPSRC = ../../os/various/ch.cpp main.cpp
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@@ -89,8 +90,9 @@ ASMSRC = $(PORTASM) \ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
../../os/io \
- ../../os/ports/GCC/ARM7/LPC214x \
- ../../os/various
+ ../../os/io/platforms/LPC214x \
+ ../../os/various \
+ ../../os/ports/GCC/ARM7/LPC214x
#
# Project, sources and paths
diff --git a/demos/ARM7-LPC214x-G++/board.c b/demos/ARM7-LPC214x-G++/board.c index 68b060dbd..eba3f59e3 100644 --- a/demos/ARM7-LPC214x-G++/board.c +++ b/demos/ARM7-LPC214x-G++/board.c @@ -19,11 +19,11 @@ #include <ch.h>
#include <pal.h>
+#include <serial.h>
#include "lpc214x.h"
#include "vic.h"
-#include "lpc214x_serial.h"
-#include "lpc214x_ssp.h"
+//#include "lpc214x_ssp.h"
#include "board.h"
//#include "mmcsd.h"
@@ -144,7 +144,7 @@ void hwinit1(void) { /*
* Other subsystems.
*/
- serial_init(1, 2);
+ sdInit();
// ssp_init();
// InitMMC();
// InitBuzzer();
diff --git a/demos/ARM7-LPC214x-G++/main.cpp b/demos/ARM7-LPC214x-G++/main.cpp index 683c2675d..b217e86a2 100644 --- a/demos/ARM7-LPC214x-G++/main.cpp +++ b/demos/ARM7-LPC214x-G++/main.cpp @@ -19,12 +19,11 @@ #include <ch.hpp>
#include <pal.h>
-
-#include <evtimer.h>
+#include <serial.h>
#include <test.h>
+#include <evtimer.h>
-#include <board.h>
-#include <lpc214x_serial.h>
+#include "board.h"
#define BOTH_BUTTONS (PAL_PORT_BIT(PA_BUTTON1) | PAL_PORT_BIT(PA_BUTTON2))
@@ -155,6 +154,11 @@ int main(int argc, char **argv) { static EvTimer evt;
struct EventListener el0;
+ /*
+ * Activates the communication port 1 using the driver default configuration.
+ */
+ sdStart(&COM1, NULL);
+
evtInit(&evt, 500); // Initializes an event timer.
evtStart(&evt); // Starts the event timer.
chEvtRegister(&evt.et_es, &el0, 0); // Registers a listener on the source.
diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile b/demos/ARM7-LPC214x-GCC-minimal/Makefile index 358b12597..23b74db74 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile @@ -53,8 +53,8 @@ CSRC = ${PORTSRC} \ ${KERNSRC} \
${TESTSRC} \
../../os/io/pal.c \
- ../../os/ports/GCC//ARM7/LPC214x/vic.c \
- ../../os/ports/GCC/ARM7/LPC214x/pal_lld.c \
+ ../../os/io/platforms/LPC214x/pal_lld.c \
+ ../../os/io/platforms/LPC214x/vic.c \
board.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -87,8 +87,9 @@ ASMSRC = $(PORTASM) \ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
../../os/io \
- ../../os/ports/GCC/ARM7/LPC214x \
- ../../os/various
+ ../../os/io/platforms/LPC214x \
+ ../../os/various \
+ ../../os/ports/GCC/ARM7/LPC214x
#
# Project, sources and paths
diff --git a/demos/ARM7-LPC214x-GCC-minimal/board.c b/demos/ARM7-LPC214x-GCC-minimal/board.c index 95732cfef..bcf430ade 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/board.c +++ b/demos/ARM7-LPC214x-GCC-minimal/board.c @@ -144,7 +144,7 @@ void hwinit1(void) { /*
* Other subsystems.
*/
-// serial_init(1, 2);
+// sdInit();
// ssp_init();
// InitMMC();
// InitBuzzer();
|