From 0aef9c398815a63e7a7cc0a6ffd42aa440c8a48b Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 27 May 2018 16:54:00 -0400 Subject: FMC cleanup: constification, gratuitous pointer. --- stm-fmc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'stm-fmc.h') 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)); -- cgit v1.2.3