aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/mgmt-fpga.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-11 21:26:27 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-11 21:26:27 -0400
commitb159bf0bb24a99c7d3ff1b3855f840add63198e5 (patch)
tree9e3861da94bb69412025ef51db5a686d717d7a84 /projects/cli-test/mgmt-fpga.c
parent4026cce22d330d3b9c4b218dd2e19d4f60412e05 (diff)
Cleanup 'unused parameter' warnings, a couple of which are actual coding errors.
Diffstat (limited to 'projects/cli-test/mgmt-fpga.c')
-rw-r--r--projects/cli-test/mgmt-fpga.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/projects/cli-test/mgmt-fpga.c b/projects/cli-test/mgmt-fpga.c
index b1b0973..da539f1 100644
--- a/projects/cli-test/mgmt-fpga.c
+++ b/projects/cli-test/mgmt-fpga.c
@@ -54,8 +54,8 @@ static int _flash_write_callback(uint8_t *buf, size_t len)
if (fpgacfg_erase_sector(dfu_offset / FPGACFG_SECTOR_SIZE) != 1)
return CLI_ERROR;
- int res = fpgacfg_write_data(dfu_offset, buf, BITSTREAM_UPLOAD_CHUNK_SIZE) == 1;
- dfu_offset += BITSTREAM_UPLOAD_CHUNK_SIZE;
+ int res = fpgacfg_write_data(dfu_offset, buf, len) == 1;
+ dfu_offset += len;
return res;
}
@@ -63,6 +63,10 @@ static int cmd_fpga_bitstream_upload(struct cli_def *cli, const char *command, c
{
uint8_t buf[BITSTREAM_UPLOAD_CHUNK_SIZE];
+ command = command;
+ argv = argv;
+ argc = argc;
+
dfu_offset = 0;
fpgacfg_access_control(ALLOW_ARM);
@@ -83,6 +87,10 @@ static int cmd_fpga_bitstream_upload(struct cli_def *cli, const char *command, c
static int cmd_fpga_bitstream_erase(struct cli_def *cli, const char *command, char *argv[], int argc)
{
+ command = command;
+ argv = argv;
+ argc = argc;
+
fpgacfg_access_control(ALLOW_ARM);
cli_print(cli, "Checking if FPGA config memory is accessible");
@@ -110,6 +118,10 @@ static int cmd_fpga_bitstream_erase(struct cli_def *cli, const char *command, ch
static int cmd_fpga_reset(struct cli_def *cli, const char *command, char *argv[], int argc)
{
+ command = command;
+ argv = argv;
+ argc = argc;
+
fpgacfg_access_control(ALLOW_FPGA);
fpgacfg_reset_fpga(RESET_FULL);
cli_print(cli, "FPGA has been reset");
@@ -119,6 +131,10 @@ static int cmd_fpga_reset(struct cli_def *cli, const char *command, char *argv[]
static int cmd_fpga_reset_registers(struct cli_def *cli, const char *command, char *argv[], int argc)
{
+ command = command;
+ argv = argv;
+ argc = argc;
+
fpgacfg_access_control(ALLOW_FPGA);
fpgacfg_reset_fpga(RESET_REGISTERS);
cli_print(cli, "FPGA registers have been reset");