aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/zpu/lib/hal_io.c
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-01-17 14:51:06 -0800
committerNick Foster <nick@nerdnetworks.org>2011-01-17 14:51:06 -0800
commitcaa911aa270ee4aef7244f3159b9fd402a454069 (patch)
tree57e85e00e9727aade1a4dafaa6da98eb5e2b4b6c /firmware/zpu/lib/hal_io.c
parentd521bd1c28acf0ca159f8c84a8189bef11fdf65d (diff)
downloaduhd-caa911aa270ee4aef7244f3159b9fd402a454069.tar.gz
uhd-caa911aa270ee4aef7244f3159b9fd402a454069.tar.bz2
uhd-caa911aa270ee4aef7244f3159b9fd402a454069.zip
next: fngets() fixed for GPS driver. polling/timeout moved to host side. small changes to GPS output text.
Diffstat (limited to 'firmware/zpu/lib/hal_io.c')
-rw-r--r--firmware/zpu/lib/hal_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/zpu/lib/hal_io.c b/firmware/zpu/lib/hal_io.c
index be4c570c7..1d137943c 100644
--- a/firmware/zpu/lib/hal_io.c
+++ b/firmware/zpu/lib/hal_io.c
@@ -253,11 +253,11 @@ fngets(hal_uart_name_t u, char * const s, int len)
}
int
-fngets_timeout(hal_uart_name_t u, char * const s, int len)
+fngets_noblock(hal_uart_name_t u, char * const s, int len)
{
char *x = s;
- while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && (*x != -1) && ((x-s) < len)) x++;
+ while(((*x=(char)hal_uart_getc_noblock(u)) != '\n') && (*x != 255) && ((x-s) < len)) x++;
*x = 0;
//printf("Returning from fngets() with string %d of length %d\n", s[0], x-s);
return (x-s);