aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/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/cli-test/mgmt-fpga.c
parent91cc61352451093e26605f4a9bbe83798da02fd0 (diff)
Use a fresh port of libcli, which retains more of the original API.
Diffstat (limited to 'projects/cli-test/mgmt-fpga.c')
-rw-r--r--projects/cli-test/mgmt-fpga.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/projects/cli-test/mgmt-fpga.c b/projects/cli-test/mgmt-fpga.c
index 059e4a9..31a6e27 100644
--- a/projects/cli-test/mgmt-fpga.c
+++ b/projects/cli-test/mgmt-fpga.c
@@ -122,16 +122,19 @@ static int cmd_fpga_reset_registers(struct cli_def *cli, const char *command, ch
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);
+
/* fpga reset */
- cli_command_node(fpga, reset, "Reset FPGA (config reset)");
+ struct cli_command *c_reset = cli_register_command(cli, c, "reset", cmd_fpga_reset, 0, 0, "Reset FPGA (config reset)");
+
/* fpga reset registers */
- cli_command_node(fpga_reset, registers, "Reset FPGA registers (soft reset)");
+ cli_register_command(cli, c_reset, "registers", cmd_fpga_reset_registers, 0, 0, "Reset FPGA registers (soft reset)");
+
+ struct cli_command *c_bitstream = cli_register_command(cli, c, "bitstream", NULL, 0, 0, NULL);
- 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");
}