diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 13:07:14 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 13:07:14 -0700 |
commit | d96e9f907e17900a59247ba6d28d33c26a1c4468 (patch) | |
tree | 584fc735ec37be3e506bd2004cdc0955eeebed2a /firmware/microblaze/lib/hal_uart.c | |
parent | 6bde8e29eb28b746109531553d38fec91a89dc73 (diff) | |
download | uhd-d96e9f907e17900a59247ba6d28d33c26a1c4468.tar.gz uhd-d96e9f907e17900a59247ba6d28d33c26a1c4468.tar.bz2 uhd-d96e9f907e17900a59247ba6d28d33c26a1c4468.zip |
Increased UART timeout for slow Jackson Labs GPSDO. Fixed up timeout code.
Diffstat (limited to 'firmware/microblaze/lib/hal_uart.c')
-rw-r--r-- | firmware/microblaze/lib/hal_uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/microblaze/lib/hal_uart.c b/firmware/microblaze/lib/hal_uart.c index 4d754d5e5..9697f5b20 100644 --- a/firmware/microblaze/lib/hal_uart.c +++ b/firmware/microblaze/lib/hal_uart.c @@ -109,7 +109,7 @@ hal_uart_getc_timeout(hal_uart_name_t u) while (((uart_regs[u].rxlevel) == 0) && (timeout++ < HAL_UART_TIMEOUT_MS)) mdelay(1); - return (uart_regs[u].rxlevel == 0) ? 0 : uart_regs[u].rxchar; + return (timeout == HAL_UART_TIMEOUT_MS) ? '\n' : uart_regs[u].rxchar; //return a newline if nothing there, this will trip fngets to quit } int hal_uart_rx_flush(hal_uart_name_t u) |