From 40faee2e6d87f7364a0c0c2cf310f1483c0331cf Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Mon, 16 Aug 2010 16:09:52 -0700 Subject: Finished GPS driver, more or less. Should detect any 115kbaud GPS on the serial port, as long as it outputs GPRMC packets. Tweaked the serial driver for a stupid off-by-one mistake. --- firmware/microblaze/lib/hal_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/microblaze/lib/hal_uart.c') diff --git a/firmware/microblaze/lib/hal_uart.c b/firmware/microblaze/lib/hal_uart.c index 0ac6abd69..7836240fe 100644 --- a/firmware/microblaze/lib/hal_uart.c +++ b/firmware/microblaze/lib/hal_uart.c @@ -108,7 +108,7 @@ hal_uart_getc_timeout(hal_uart_name_t u) int timeout = 0; while (((uart_regs[u].rxlevel) == 0) && (timeout++ < HAL_UART_TIMEOUT_MS)) mdelay(1); - return (timeout == HAL_UART_TIMEOUT_MS) ? -1 : uart_regs[u].rxchar; //return -1 if nothing there, cause fngets to quit + return (timeout >= HAL_UART_TIMEOUT_MS) ? -1 : uart_regs[u].rxchar; //return -1 if nothing there, cause fngets to quit } int hal_uart_rx_flush(hal_uart_name_t u) -- cgit v1.2.3