diff options
author | Paul Selkirk <paul@psgd.org> | 2016-07-21 16:32:43 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-07-21 16:32:43 -0400 |
commit | e3fe7d89b6094bfef42f42329e15631f684f0748 (patch) | |
tree | dbaca9b4ce50dca6950a658cef99d20d5d7922ae /projects/cli-test/mgmt-dfu.c | |
parent | 91cc61352451093e26605f4a9bbe83798da02fd0 (diff) |
Use a fresh port of libcli, which retains more of the original API.
Diffstat (limited to 'projects/cli-test/mgmt-dfu.c')
-rw-r--r-- | projects/cli-test/mgmt-dfu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/projects/cli-test/mgmt-dfu.c b/projects/cli-test/mgmt-dfu.c index e57c521..8f258ea 100644 --- a/projects/cli-test/mgmt-dfu.c +++ b/projects/cli-test/mgmt-dfu.c @@ -115,9 +115,11 @@ static int cmd_dfu_jump(struct cli_def *cli, const char *command, char *argv[], void configure_cli_dfu(struct cli_def *cli) { - cli_command_root(dfu); + struct cli_command *c; - cli_command_node(dfu, dump, "Show the first 256 bytes of the loaded firmware"); - cli_command_node(dfu, jump, "Jump to the loaded firmware"); - cli_command_node(dfu, erase, "Erase the firmware memory (will crash the CLI)"); + c = cli_register_command(cli, NULL, "dfu", NULL, 0, 0, NULL); + + cli_register_command(cli, c, "dump", cmd_dfu_dump, 0, 0, "Show the first 256 bytes of the loaded firmware"); + cli_register_command(cli, c, "jump", cmd_dfu_jump, 0, 0, "Jump to the loaded firmware"); + cli_register_command(cli, c, "erase", cmd_dfu_erase, 0, 0, "Erase the firmware memory (will crash the CLI)"); } |