aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/mgmt-misc.c
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-07-08 18:10:42 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-07-08 18:10:42 +0200
commit3ea10bf4fba185a8bfbb33a8c67a69f70b95755a (patch)
treea44b31dd9c704c5538646cddb7a96047f58c2a20 /projects/cli-test/mgmt-misc.c
parent5e33e972b58aca7955c14aa12a22d715d6a2c239 (diff)
merge test code from projects/hsm/
Diffstat (limited to 'projects/cli-test/mgmt-misc.c')
-rw-r--r--projects/cli-test/mgmt-misc.c13
1 files changed, 7 insertions, 6 deletions
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)