summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-01 14:11:44 -0700
committerKeith Packard <keithp@keithp.com>2011-04-01 14:11:44 -0700
commit9f8a96a8516e13878b329dbf1da855ed9a3219c4 (patch)
tree0b66f21fdb2dee96260394e06694ebefec4e8fce /src
parent4f243a282f9aeb7433ccb2942850d380a091e603 (diff)
altos: Make ao_serial_drain public
Allow external code to discard serial input Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/ao.h3
-rw-r--r--src/ao_serial.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ao.h b/src/ao.h
index 77f3259e..b92e623f 100644
--- a/src/ao.h
+++ b/src/ao.h
@@ -935,6 +935,9 @@ ao_serial_set_stdin(uint8_t stdin);
void
ao_serial_putchar(char c) __critical;
+void
+ao_serial_drain(void) __critical;
+
#define AO_SERIAL_SPEED_4800 0
#define AO_SERIAL_SPEED_9600 1
#define AO_SERIAL_SPEED_19200 2
diff --git a/src/ao_serial.c b/src/ao_serial.c
index d6395810..e9373e23 100644
--- a/src/ao_serial.c
+++ b/src/ao_serial.c
@@ -100,7 +100,7 @@ ao_serial_putchar(char c) __critical
ao_serial_tx1_start();
}
-static void
+void
ao_serial_drain(void) __critical
{
while (!ao_fifo_empty(ao_usart1_tx_fifo))