aboutsummaryrefslogtreecommitdiff
path: root/stm-fmc.h
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 /stm-fmc.h
parent64126d628fe4b6e49bcd143f199710c40115817a (diff)
FMC cleanup: constification, gratuitous pointer.
Diffstat (limited to 'stm-fmc.h')
-rw-r--r--stm-fmc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/stm-fmc.h b/stm-fmc.h
index 86e83d9..eab053d 100644
--- a/stm-fmc.h
+++ b/stm-fmc.h
@@ -73,19 +73,19 @@ static inline HAL_StatusTypeDef _fmc_nwait_idle(void)
return HAL_ERROR;
}
-static inline HAL_StatusTypeDef fmc_write_32(uint32_t addr, uint32_t *data)
+static inline HAL_StatusTypeDef fmc_write_32(const uint32_t addr, const uint32_t data)
{
// calculate target fpga address
uint32_t *ptr = (uint32_t *) (FMC_FPGA_BASE_ADDR + (addr & FMC_FPGA_ADDR_MASK));
// write data to fpga
- *ptr = *data;
+ *ptr = data;
// wait for transaction to complete
return _fmc_nwait_idle();
}
-static inline HAL_StatusTypeDef fmc_read_32(uint32_t addr, uint32_t *data)
+static inline HAL_StatusTypeDef 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));