diff options
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]); } |