aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/test-fmc.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-17 00:27:11 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-17 00:27:11 -0400
commit03b14b4cd4a214a92e3968ff33a13c2086896864 (patch)
tree4b391205211d55a0cba4750682784f5d1799fb44 /projects/cli-test/test-fmc.c
parent5af4a915edf3e77705fa2625081200b61f8dda26 (diff)
Overhaul UART API
MGMT is the default UART, and no one should have to explicitly refer to the UART unless they need USER (hsm.c:hal_serial_send_char). The default UART is now exposed in the header file, so that the default-using functions can be macros, which saves a few bytes in code space, and a few microseconds in function call overhead.
Diffstat (limited to 'projects/cli-test/test-fmc.c')
-rw-r--r--projects/cli-test/test-fmc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/projects/cli-test/test-fmc.c b/projects/cli-test/test-fmc.c
index a1d6eea..87f80ce 100644
--- a/projects/cli-test/test-fmc.c
+++ b/projects/cli-test/test-fmc.c
@@ -121,9 +121,9 @@ int test_fpga_data_bus(struct cli_def *cli, uint32_t test_rounds)
data_diff = buf ^ rnd;
if (data_diff) {
cli_print(cli, "Data bus FAIL: expected %lx got %lx", rnd, buf);
- uart_send_string2(STM_UART_MGMT, (char *) "Binary diff: ");
- uart_send_number2(STM_UART_MGMT, data_diff, 32, 2);
- uart_send_string2(STM_UART_MGMT, "\r\n");
+ uart_send_string((char *) "Binary diff: ");
+ uart_send_binary(data_diff, 32);
+ uart_send_string("\r\n");
break;
}
@@ -192,9 +192,9 @@ int test_fpga_address_bus(struct cli_def *cli, uint32_t test_rounds)
addr_diff = buf ^ addr;
if (addr_diff) {
cli_print(cli, "Address bus FAIL: expected 0x%lx got 0x%lx", addr, buf);
- uart_send_string2(STM_UART_MGMT, (char *) "Binary diff: ");
- uart_send_number2(STM_UART_MGMT, addr_diff, 32, 2);
- uart_send_string2(STM_UART_MGMT, "\r\n");
+ uart_send_string((char *) "Binary diff: ");
+ uart_send_binary(addr_diff, 32);
+ uart_send_string("\r\n");
break;
}