From 3ea10bf4fba185a8bfbb33a8c67a69f70b95755a Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Fri, 8 Jul 2016 18:10:42 +0200 Subject: merge test code from projects/hsm/ --- projects/cli-test/mgmt-misc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'projects/cli-test/mgmt-misc.c') diff --git a/projects/cli-test/mgmt-misc.c b/projects/cli-test/mgmt-misc.c index aea790a..67bc875 100644 --- a/projects/cli-test/mgmt-misc.c +++ b/projects/cli-test/mgmt-misc.c @@ -44,10 +44,9 @@ extern uint32_t update_crc(uint32_t crc, uint8_t *buf, int len); -volatile uint32_t demo_crc = 0; +static volatile uint32_t demo_crc = 0; - -int _count_bytes_callback(uint8_t *buf, size_t len) { +static int _count_bytes_callback(uint8_t *buf, size_t len) { demo_crc = update_crc(demo_crc, buf, len); return 1; } @@ -110,7 +109,7 @@ int cli_receive_data(struct cli_def *cli, uint8_t *buf, size_t len, cli_data_cal return CLI_OK; } -int cmd_filetransfer(struct cli_def *cli, const char *command, char *argv[], int argc) +static int cmd_filetransfer(struct cli_def *cli, const char *command, char *argv[], int argc) { uint8_t buf[FILETRANSFER_UPLOAD_CHUNK_SIZE]; @@ -120,11 +119,13 @@ int cmd_filetransfer(struct cli_def *cli, const char *command, char *argv[], int return CLI_OK; } -int cmd_reboot(struct cli_def *cli, const char *command, char *argv[], int argc) +static int cmd_reboot(struct cli_def *cli, const char *command, char *argv[], int argc) { cli_print(cli, "\n\n\nRebooting\n\n\n"); HAL_NVIC_SystemReset(); - while (1) {}; + + /*NOTREACHED*/ + return CLI_OK; } void configure_cli_misc(struct cli_def *cli) -- cgit v1.2.3