aboutsummaryrefslogtreecommitdiff
path: root/stm-fmc.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2019-04-06 17:54:06 -0400
committerPaul Selkirk <paul@psgd.org>2019-04-06 17:54:06 -0400
commite203f797dddfcd03419e7ac336a86a6186fce0c1 (patch)
tree688c131327b2f15b2e3a9d1ce672130551e3767c /stm-fmc.h
parenta590fe12485603003101b5a4ba2f616083d040f4 (diff)
Remove fmc_[read|write]_32, since we now memcpy in hal_io_[read|write].
Diffstat (limited to 'stm-fmc.h')
-rw-r--r--stm-fmc.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/stm-fmc.h b/stm-fmc.h
index 92b261b..c01d4ff 100644
--- a/stm-fmc.h
+++ b/stm-fmc.h
@@ -52,22 +52,9 @@
extern void fmc_init(void);
-static inline void fmc_write_32(const uint32_t addr, const uint32_t data)
+static inline void *fmc_fpga_addr(off_t addr)
{
- // calculate target fpga address
- uint32_t *ptr = (uint32_t *) (FMC_FPGA_BASE_ADDR + (addr & FMC_FPGA_ADDR_MASK));
-
- // write data to fpga
- *ptr = data;
-}
-
-static inline void fmc_read_32(const uint32_t addr, uint32_t * const data)
-{
- // calculate target fpga address
- uint32_t *ptr = (uint32_t *) (FMC_FPGA_BASE_ADDR + (addr & FMC_FPGA_ADDR_MASK));
-
- // read data from fpga
- *data = *ptr;
+ return (void *)(FMC_FPGA_BASE_ADDR + (addr & FMC_FPGA_ADDR_MASK));
}
#endif /* __STM_FMC_H */