aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/mgmt-fpga.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-07-21 16:32:43 -0400
committerPaul Selkirk <paul@psgd.org>2016-07-21 16:32:43 -0400
commite3fe7d89b6094bfef42f42329e15631f684f0748 (patch)
treedbaca9b4ce50dca6950a658cef99d20d5d7922ae /projects/hsm/mgmt-fpga.c
parent91cc61352451093e26605f4a9bbe83798da02fd0 (diff)
Use a fresh port of libcli, which retains more of the original API.
Diffstat (limited to 'projects/hsm/mgmt-fpga.c')
-rw-r--r--projects/hsm/mgmt-fpga.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/projects/hsm/mgmt-fpga.c b/projects/hsm/mgmt-fpga.c
index adb45b3..778ded9 100644
--- a/projects/hsm/mgmt-fpga.c
+++ b/projects/hsm/mgmt-fpga.c
@@ -145,19 +145,20 @@ static int cmd_fpga_show_cores(struct cli_def *cli, const char *command, char *a
void configure_cli_fpga(struct cli_def *cli)
{
- /* fpga */
- cli_command_root(fpga);
+ struct cli_command *c = cli_register_command(cli, NULL, "fpga", NULL, 0, 0, NULL);
- cli_command_branch(fpga, show);
- /* show fpga cores*/
- cli_command_node(fpga_show, cores, "Show FPGA core names and versions");
+ struct cli_command *c_show = cli_register_command(cli, c, "show", NULL, 0, 0, NULL);
+ struct cli_command *c_bitstream = cli_register_command(cli, c, "bitstream", NULL, 0, 0, NULL);
+
+ /* fpga show cores */
+ cli_register_command(cli, c_show, "cores", cmd_fpga_show_cores, 0, 0, "Show FPGA core names and versions");
/* fpga reset */
- cli_command_node(fpga, reset, "Reset FPGA (config reset)");
+ cli_register_command(cli, c, "reset", cmd_fpga_reset, 0, 0, "Reset FPGA (config reset)");
- cli_command_branch(fpga, bitstream);
/* fpga bitstream upload */
- cli_command_node(fpga_bitstream, upload, "Upload new FPGA bitstream");
+ cli_register_command(cli, c_bitstream, "upload", cmd_fpga_bitstream_upload, 0, 0, "Upload new FPGA bitstream");
+
/* fpga bitstream erase */
- cli_command_node(fpga_bitstream, erase, "Erase FPGA config memory");
+ cli_register_command(cli, c_bitstream, "erase", cmd_fpga_bitstream_erase, 0, 0, "Erase FPGA config memory");
}