diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-12 18:13:45 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-12 18:13:45 -0700 |
commit | 6be2b64ce86f4bb9f36bae8758d7de2ddbabe2b1 (patch) | |
tree | b3f0745f41dec7531aabc9c5a3a73dca869fc84f /firmware/microblaze/lib | |
parent | e2fcb815141b05205ea9334e2db78f9ceffa62c3 (diff) | |
download | uhd-6be2b64ce86f4bb9f36bae8758d7de2ddbabe2b1.tar.gz uhd-6be2b64ce86f4bb9f36bae8758d7de2ddbabe2b1.tar.bz2 uhd-6be2b64ce86f4bb9f36bae8758d7de2ddbabe2b1.zip |
Fixed GPS UART stuff. Works OK.
Diffstat (limited to 'firmware/microblaze/lib')
-rw-r--r-- | firmware/microblaze/lib/hal_io.c | 6 | ||||
-rw-r--r-- | firmware/microblaze/lib/hal_uart.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/microblaze/lib/hal_io.c index 549990311..18cc34aaf 100644 --- a/firmware/microblaze/lib/hal_io.c +++ b/firmware/microblaze/lib/hal_io.c @@ -208,11 +208,9 @@ fputstr(hal_uart_name_t u, const char *s) int fnputstr(hal_uart_name_t u, const char *s, int len) { - int x; - while (*s && (len > x)) { + int x = 0; + while (*s && (len > x++)) fputchar(u, *s++); - x++; - } return x; } diff --git a/firmware/microblaze/lib/hal_uart.c b/firmware/microblaze/lib/hal_uart.c index c85bcaca3..a8344daf5 100644 --- a/firmware/microblaze/lib/hal_uart.c +++ b/firmware/microblaze/lib/hal_uart.c @@ -64,7 +64,7 @@ void hal_uart_set_speed(hal_uart_name_t uart, hal_uart_speed_t speed) void hal_uart_init(void) { - for(int i = 0; i < 2; i++) { //uart 3 is unused + for(int i = 0; i < 3; i++) { hal_uart_set_mode(i, uart_mode[i]); hal_uart_set_speed(i, uart_speeds[i]); } |