altos: Make ao_serial_drain public
authorKeith Packard <keithp@keithp.com>
Fri, 1 Apr 2011 21:11:44 +0000 (14:11 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 1 Apr 2011 21:11:44 +0000 (14:11 -0700)
Allow external code to discard serial input

Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao.h
src/ao_serial.c

index 77f3259ee5ca5e22186c2662773314ce14cd2122..b92e623f040fb06741ada8978a544cede17c4d12 100644 (file)
--- 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
index d6395810064fced74a96432caa33d25481f9e9cc..e9373e232cb700fd735a3a72968b04d1c787c078 100644 (file)
@@ -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))