diff options
| author | Keith Packard <keithp@keithp.com> | 2011-04-01 14:11:44 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-04-01 14:11:44 -0700 | 
| commit | 9f8a96a8516e13878b329dbf1da855ed9a3219c4 (patch) | |
| tree | 0b66f21fdb2dee96260394e06694ebefec4e8fce | |
| parent | 4f243a282f9aeb7433ccb2942850d380a091e603 (diff) | |
altos: Make ao_serial_drain public
Allow external code to discard serial input
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rw-r--r-- | src/ao.h | 3 | ||||
| -rw-r--r-- | src/ao_serial.c | 2 | 
2 files changed, 4 insertions, 1 deletions
@@ -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))  | 
