aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-G++
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-21 09:32:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-21 09:32:58 +0000
commit89cd6853e753c32903a9a6d48e3fe26be8999f97 (patch)
treee14379985a15e41677518e35b77d9f83484471ed /demos/ARM7-LPC214x-G++
parenteea9d6ba8ee39a2ff814412f06a66288be39d709 (diff)
downloadChibiOS-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/ARM7-LPC214x-G++')
-rw-r--r--demos/ARM7-LPC214x-G++/Makefile14
-rw-r--r--demos/ARM7-LPC214x-G++/board.c6
-rw-r--r--demos/ARM7-LPC214x-G++/main.cpp12
3 files changed, 19 insertions, 13 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.