aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-G++/main.cpp
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++/main.cpp
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++/main.cpp')
-rw-r--r--demos/ARM7-LPC214x-G++/main.cpp12
1 files changed, 8 insertions, 4 deletions
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.