diff options
author | Keith Packard <keithp@keithp.com> | 2011-04-01 14:08:37 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-04-01 14:08:37 -0700 |
commit | 39bde78edc863d9d2ef50a59b8f28ab6274892b4 (patch) | |
tree | 16f6f6bf6ef81423e7ebe6e95700acefe4232194 /src | |
parent | 01952da35a57ae4da062facb26b3c6d7de29190f (diff) |
altos: Allow any stdio to be used with packet forwarding
There's no reason to restrict packet forwarding to work only from
USB.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao_packet_master.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ao_packet_master.c b/src/ao_packet_master.c index 069bc5df..e721ffba 100644 --- a/src/ao_packet_master.c +++ b/src/ao_packet_master.c @@ -26,7 +26,7 @@ ao_packet_getchar(void) __critical break; if (ao_packet_master_sleeping) ao_wakeup(&ao_packet_master_sleeping); - ao_usb_flush(); + flush(); ao_sleep(&ao_stdin_ready); } return c; @@ -39,7 +39,7 @@ ao_packet_echo(void) __reentrant while (ao_packet_enable) { c = ao_packet_getchar(); if (c != AO_READ_AGAIN) - ao_usb_putchar(c); + putchar(c); } ao_exit(); } @@ -112,7 +112,7 @@ ao_packet_forward(void) __reentrant ao_set_monitor(0); ao_add_task(&ao_packet_task, ao_packet_master, "master"); ao_add_task(&ao_packet_echo_task, ao_packet_echo, "echo"); - while ((c = ao_usb_getchar()) != '~') { + while ((c = getchar()) != '~') { if (c == '\r') c = '\n'; ao_packet_putchar(c); } |