diff --git a/tests/periph_uart/main.c b/tests/periph_uart/main.c index fbab5ef4bc442f955860103e4fba881821df5510..850f6962d5e68331dfad4017f35085287d1eb3f0 100644 --- a/tests/periph_uart/main.c +++ b/tests/periph_uart/main.c @@ -133,7 +133,7 @@ static int cmd_init(int argc, char **argv) if (dev < 0) { return 1; } - baud = atoi(argv[2]); + baud = strtol(argv[2], NULL, 0); /* initialize UART */ res = uart_init(UART_DEV(dev), baud, rx_cb, (void *)dev); @@ -145,7 +145,7 @@ static int cmd_init(int argc, char **argv) puts("Error: Unable to initialize UART device\n"); return 1; } - printf("Success: Successfully initialized UART_DEV(%i)\n", dev); + printf("Success: Initialized UART_DEV(%i) at BAUD %"PRIu32"\n", dev, baud); /* also test if poweron() and poweroff() work (or at least don't break * anything) */