diff options
author | Keith Packard <keithp@keithp.com> | 2009-11-04 21:29:37 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-11-04 21:29:37 -0800 |
commit | bc62bb254085cc705203b57260c04ac5e14c6611 (patch) | |
tree | 3cc8e9ccb2d1b11a752379b25d797d11afa88ec3 /src/ao_packet_master.c | |
parent | 27ebaf8e13aed06bb1ea6e770f767495a02be6c5 (diff) |
In packet master, move USB flush from packet thread to echo thread
This keeps the packet thread from blocking on USB and also makes the
flush happen after every packet (slightly more USB traffic, but
packets are slow anyway).
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_packet_master.c')
-rw-r--r-- | src/ao_packet_master.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ao_packet_master.c b/src/ao_packet_master.c index 2751f414..d03899d1 100644 --- a/src/ao_packet_master.c +++ b/src/ao_packet_master.c @@ -27,6 +27,7 @@ ao_packet_getchar(void) break; if (ao_packet_master_sleeping) ao_wake_task(&ao_packet_task); + flush(); ao_sleep(&ao_stdin_ready); } return c; @@ -94,8 +95,6 @@ ao_packet_master(void) continue; if (ao_rx_packet.packet.len) ao_packet_master_busy(); - else - flush(); ao_packet_master_sleeping = 1; ao_delay(ao_packet_master_delay); ao_packet_master_sleeping = 0; |