summaryrefslogtreecommitdiff
path: root/src/lpcxpresso/ao_demo.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-20 00:20:55 -0500
committerKeith Packard <keithp@keithp.com>2013-05-17 03:50:07 -0700
commit9e8f6ba8b779cd9635f82d6da5f113715c3ee4c7 (patch)
tree1fe626c49e3749630063b623a17f9a8c578cc112 /src/lpcxpresso/ao_demo.c
parentf9d0eb3f3154f98abb0c8952d7171f3e7d3de9b2 (diff)
altos/lpc: Get USART running
Adds a simple demo thread that spews data to the serial port Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpcxpresso/ao_demo.c')
-rw-r--r--src/lpcxpresso/ao_demo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lpcxpresso/ao_demo.c b/src/lpcxpresso/ao_demo.c
index 56fef706..eae9503e 100644
--- a/src/lpcxpresso/ao_demo.c
+++ b/src/lpcxpresso/ao_demo.c
@@ -26,6 +26,14 @@ static void demo(void) {
}
}
+static struct ao_task serial_task;
+
+static void serial(void) {
+ for (;;) {
+ printf ("hello, world\n");
+ }
+}
+
int
main(void)
{
@@ -35,9 +43,12 @@ main(void)
ao_clock_init();
ao_timer_init();
+ ao_serial_init();
+
ao_task_init();
ao_add_task(&demo_task, demo, "demo");
+ ao_add_task(&serial_task, serial, "serial");
ao_start_scheduler();