projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4f243a2
)
altos: Make ao_serial_drain public
author
Keith Packard
<keithp@keithp.com>
Fri, 1 Apr 2011 21:11:44 +0000
(14:11 -0700)
committer
Keith 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
patch
|
blob
|
history
src/ao_serial.c
patch
|
blob
|
history
diff --git
a/src/ao.h
b/src/ao.h
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
diff --git
a/src/ao_serial.c
b/src/ao_serial.c
index d6395810064fced74a96432caa33d25481f9e9cc..e9373e232cb700fd735a3a72968b04d1c787c078 100644
(file)
--- 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))