aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/mgmt-firmware.c
diff options
context:
space:
mode:
Diffstat (limited to 'projects/hsm/mgmt-firmware.c')
-rw-r--r--projects/hsm/mgmt-firmware.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/projects/hsm/mgmt-firmware.c b/projects/hsm/mgmt-firmware.c
index 1a0e184..ec8a69d 100644
--- a/projects/hsm/mgmt-firmware.c
+++ b/projects/hsm/mgmt-firmware.c
@@ -35,10 +35,11 @@
/* Rename both CMSIS HAL_OK and libhal HAL_OK to disambiguate */
#define HAL_OK CMSIS_HAL_OK
#include "stm-init.h"
-#include "mgmt-cli.h"
#include "stm-uart.h"
#include "stm-flash.h"
+#include "mgmt-cli.h"
+
#undef HAL_OK
#define HAL_OK LIBHAL_OK
#include "hal.h"
@@ -63,7 +64,9 @@ static int cmd_firmware_upload(struct cli_def *cli, const char *command, char *a
void configure_cli_firmware(struct cli_def *cli)
{
- cli_command_root(firmware);
+ struct cli_command *c;
+
+ c = cli_register_command(cli, NULL, "firmware", NULL, 0, 0, NULL);
- cli_command_node(firmware, upload, "Upload new firmware image");
+ cli_register_command(cli, c, "upload", cmd_firmware_upload, 0, 0, "Upload new firmware image");
}