diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-17 03:36:47 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-17 03:50:07 -0700 |
commit | ac089d4fb930b7dbc4161259fd9bddba94395ebc (patch) | |
tree | ee17589ffa43eee5be5e1eb1b4fac67ebb581624 /src/lpcxpresso/ao_demo.c | |
parent | 185e6d15bcda229949a984910d7394203d301db9 (diff) |
altos/lpc: Get USB working
The lpc demo now has a USB command line.
Also allocates system stack so we know when ram is tight at build time
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpcxpresso/ao_demo.c')
-rw-r--r-- | src/lpcxpresso/ao_demo.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/lpcxpresso/ao_demo.c b/src/lpcxpresso/ao_demo.c index eae9503e..0c931611 100644 --- a/src/lpcxpresso/ao_demo.c +++ b/src/lpcxpresso/ao_demo.c @@ -15,24 +15,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "ao.h" - -struct ao_task demo_task; - -static void demo(void) { - for (;;) { - ao_delay(100); - ao_led_toggle(AO_LED_RED); - } -} - -static struct ao_task serial_task; - -static void serial(void) { - for (;;) { - printf ("hello, world\n"); - } -} +#include <ao.h> +#include <ao_usb.h> int main(void) @@ -44,12 +28,10 @@ main(void) ao_timer_init(); ao_serial_init(); - + ao_usb_init(); + ao_cmd_init(); ao_task_init(); - ao_add_task(&demo_task, demo, "demo"); - ao_add_task(&serial_task, serial, "serial"); - ao_start_scheduler(); for (;;) { |