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_io.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_io.c')
-rw-r--r-- | firmware/microblaze/lib/hal_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/microblaze/lib/hal_io.c index 0e3754958..f93b20030 100644 --- a/firmware/microblaze/lib/hal_io.c +++ b/firmware/microblaze/lib/hal_io.c @@ -258,6 +258,7 @@ fngets_timeout(hal_uart_name_t u, char * const s, int len) char *x = s; while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && ((x-s) < len)) x++; *x = 0; + if(x==s) return 0; return (x-s)-1; } |