aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/mgmt-misc.c
diff options
context:
space:
mode:
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)