aboutsummaryrefslogtreecommitdiff
path: root/projects/board-test/fmc-test.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2018-07-16 15:00:16 -0400
committerPaul Selkirk <paul@psgd.org>2018-12-12 10:40:54 -0500
commite79ecc525cf92134e6d67600a41a302e88ae89e3 (patch)
treec30f5c2415929120bb5f7ad3ecbb81cac2d015e7 /projects/board-test/fmc-test.c
parent7d78334b762315de69fc0c380f3bb7315b0e2a10 (diff)
Whack various bits of sw/stm32 test code to compile on fmc_clk branch.
Diffstat (limited to 'projects/board-test/fmc-test.c')
-rw-r--r--projects/board-test/fmc-test.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/projects/board-test/fmc-test.c b/projects/board-test/fmc-test.c
index 1421db0..bd30dd5 100644
--- a/projects/board-test/fmc-test.c
+++ b/projects/board-test/fmc-test.c
@@ -158,7 +158,7 @@ int main(void)
int test_fpga_data_bus(void)
//------------------------------------------------------------------------------
{
- int c, ok;
+ int c;
uint32_t rnd, buf;
HAL_StatusTypeDef hal_result;
@@ -171,12 +171,10 @@ int test_fpga_data_bus(void)
if (hal_result != HAL_OK) break;
// write value to fpga at address 0
- ok = fmc_write_32(0, rnd);
- if (ok != 0) break;
+ fmc_write_32(0, rnd);
// read value from fpga
- ok = fmc_read_32(0, &buf);
- if (ok != 0) break;
+ fmc_read_32(0, &buf);
// compare (abort testing in case of error)
if (buf != rnd)
@@ -218,7 +216,7 @@ int test_fpga_data_bus(void)
int test_fpga_address_bus(void)
//------------------------------------------------------------------------------
{
- int c, ok;
+ int c;
uint32_t rnd, buf;
HAL_StatusTypeDef hal_result;
@@ -239,12 +237,10 @@ int test_fpga_address_bus(void)
if (rnd == 0) continue;
// write dummy value to fpga at some non-zero address
- ok = fmc_write_32(rnd, buf);
- if (ok != 0) break;
+ fmc_write_32(rnd, buf);
// read value from fpga
- ok = fmc_read_32(0, &buf);
- if (ok != 0) break;
+ fmc_read_32(0, &buf);
// fpga receives address of 32-bit word, while we need
// byte address here to compare