summaryrefslogtreecommitdiff
path: root/src/core/ao.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-01-03 20:41:15 -0800
committerKeith Packard <keithp@keithp.com>2012-01-03 20:41:15 -0800
commit7a42f2e0f145d2d520aed8e241fa39f7cb62b19f (patch)
treef4935b5c16a58849d8fb70d3831278efc57fd382 /src/core/ao.h
parent085625ff3992454b59583d95a3c415597c51f754 (diff)
altos: Add support for UART0 in async mode
And copy bytes from it to stdout. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao.h')
-rw-r--r--src/core/ao.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/ao.h b/src/core/ao.h
index 1fbcf7df..494993f1 100644
--- a/src/core/ao.h
+++ b/src/core/ao.h
@@ -938,6 +938,35 @@ void
ao_serial_init(void);
#endif
+#ifndef HAS_SERIAL_0
+#define HAS_SERIAL_0 0
+#endif
+
+#if HAS_SERIAL_0
+void
+ao_serial0_rx0_isr(void) ao_arch_interrupt(2);
+
+void
+ao_serial0_tx0_isr(void) ao_arch_interrupt(7);
+
+char
+ao_serial0_getchar(void) __critical;
+
+void
+ao_serial0_putchar(char c) __critical;
+
+void
+ao_serial0_drain(void) __critical;
+
+void
+ao_serial0_set_speed(uint8_t speed);
+
+void
+ao_serial0_init(void);
+
+#endif
+
+
/*
* ao_spi.c
*/