aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2018-05-27 16:54:00 -0400
committerRob Austein <sra@hactrn.net>2018-05-27 16:54:13 -0400
commit0aef9c398815a63e7a7cc0a6ffd42aa440c8a48b (patch)
tree29a9615faea2e8b8360668307a6844ac8eeb5356 /projects/cli-test
parent64126d628fe4b6e49bcd143f199710c40115817a (diff)
FMC cleanup: constification, gratuitous pointer.
Diffstat (limited to 'projects/cli-test')
-rw-r--r--projects/cli-test/test-fmc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/projects/cli-test/test-fmc.c b/projects/cli-test/test-fmc.c
index 87f80ce..6773cfc 100644
--- a/projects/cli-test/test-fmc.c
+++ b/projects/cli-test/test-fmc.c
@@ -76,7 +76,7 @@ volatile uint32_t data_diff = 0;
volatile uint32_t addr_diff = 0;
-static int _write_then_read(struct cli_def *cli, uint32_t addr, uint32_t *write_buf, uint32_t *read_buf)
+static int _write_then_read(struct cli_def *cli, uint32_t addr, uint32_t write_buf, uint32_t *read_buf)
{
int ok;
@@ -115,7 +115,7 @@ int test_fpga_data_bus(struct cli_def *cli, uint32_t test_rounds)
}
/* write value to fpga at address 0 and then read it back from the test register */
- if (! _write_then_read(cli, 0, &rnd, &buf)) break;
+ if (! _write_then_read(cli, 0, rnd, &buf)) break;
/* compare (abort testing in case of error) */
data_diff = buf ^ rnd;
@@ -137,7 +137,7 @@ int test_fpga_data_bus(struct cli_def *cli, uint32_t test_rounds)
for (i = 0; i < 31; i++) {
data = 1 << i;
- if (! _write_then_read(cli, 0, &data, &buf)) break;
+ if (! _write_then_read(cli, 0, data, &buf)) break;
if (data == buf) {
cli_print(cli, "Data 0x%08lx (FMC_D%02i) - OK", data, i + 1);
@@ -181,7 +181,7 @@ int test_fpga_address_bus(struct cli_def *cli, uint32_t test_rounds)
/* write dummy value to fpga at some non-zero address and then read from the
test register to see what address the FPGA thought we wrote to
*/
- if (! _write_then_read(cli, addr, &dummy, &buf)) break;
+ if (! _write_then_read(cli, addr, dummy, &buf)) break;
/* fpga receives address of 32-bit word, while we need
byte address here to compare
@@ -210,7 +210,7 @@ int test_fpga_address_bus(struct cli_def *cli, uint32_t test_rounds)
shifted_addr = addr << 2;
- if (! _write_then_read(cli, shifted_addr, &dummy, &buf)) break;
+ if (! _write_then_read(cli, shifted_addr, dummy, &buf)) break;
if (addr == buf) {
cli_print(cli, "Address 0x%08lx (FMC_A%02i) - OK", addr, i + 1);