From 89cd6853e753c32903a9a6d48e3fe26be8999f97 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 21 Aug 2009 09:32:58 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1095 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-G++/Makefile | 14 ++++++++------ demos/ARM7-LPC214x-G++/board.c | 6 +++--- demos/ARM7-LPC214x-G++/main.cpp | 12 ++++++++---- 3 files changed, 19 insertions(+), 13 deletions(-) (limited to 'demos/ARM7-LPC214x-G++') 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 #include +#include #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 #include - -#include +#include #include +#include -#include -#include +#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. -- cgit v1.2.3