aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-G++/main.cpp
diff options
context:
space:
mode:
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.