From 03b14b4cd4a214a92e3968ff33a13c2086896864 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 17 Oct 2017 00:27:11 -0400 Subject: 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. --- projects/cli-test/mgmt-masterkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'projects/cli-test/mgmt-masterkey.c') diff --git a/projects/cli-test/mgmt-masterkey.c b/projects/cli-test/mgmt-masterkey.c index 0f6e352..811e15b 100644 --- a/projects/cli-test/mgmt-masterkey.c +++ b/projects/cli-test/mgmt-masterkey.c @@ -102,7 +102,7 @@ static int cmd_masterkey_status(struct cli_def *cli, const char *command, char * status = hal_mkm_volatile_read(&buf[0], sizeof(buf)); if (status == LIBHAL_OK || status == HAL_ERROR_MASTERKEY_NOT_SET) { cli_print(cli, "\nVolatile read-out:\n"); - uart_send_hexdump(STM_UART_MGMT, buf, 0, sizeof(buf) - 1); + uart_send_hexdump(buf, 0, sizeof(buf) - 1); cli_print(cli, "\n"); } else { cli_print(cli, "Failed reading from volatile memory: %s", hal_error_string(status)); @@ -111,7 +111,7 @@ static int cmd_masterkey_status(struct cli_def *cli, const char *command, char * status = hal_mkm_flash_read(&buf[0], sizeof(buf)); if (status == LIBHAL_OK || status == HAL_ERROR_MASTERKEY_NOT_SET) { cli_print(cli, "\nFlash read-out:\n"); - uart_send_hexdump(STM_UART_MGMT, buf, 0, sizeof(buf) - 1); + uart_send_hexdump(buf, 0, sizeof(buf) - 1); cli_print(cli, "\n"); } else { cli_print(cli, "Failed reading from flash: %s", hal_error_string(status)); @@ -134,7 +134,7 @@ static int cmd_masterkey_set(struct cli_def *cli, const char *command, char *arg } cli_print(cli, "Parsed key:\n"); - uart_send_hexdump(STM_UART_MGMT, buf, 0, sizeof(buf) - 1); + uart_send_hexdump(buf, 0, sizeof(buf) - 1); cli_print(cli, "\n"); if ((err = hal_mkm_volatile_write(buf, sizeof(buf))) == LIBHAL_OK) { @@ -175,7 +175,7 @@ static int cmd_masterkey_unsecure_set(struct cli_def *cli, const char *command, } cli_print(cli, "Parsed key:\n"); - uart_send_hexdump(STM_UART_MGMT, buf, 0, sizeof(buf) - 1); + uart_send_hexdump(buf, 0, sizeof(buf) - 1); cli_print(cli, "\n"); if ((err = hal_mkm_flash_write(buf, sizeof(buf))) == LIBHAL_OK) { -- cgit v1.2.3