diff options
author | Rob Austein <sra@hactrn.net> | 2018-05-27 16:54:00 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2018-05-27 16:54:13 -0400 |
commit | 0aef9c398815a63e7a7cc0a6ffd42aa440c8a48b (patch) | |
tree | 29a9615faea2e8b8360668307a6844ac8eeb5356 /stm-fmc.h | |
parent | 64126d628fe4b6e49bcd143f199710c40115817a (diff) |
FMC cleanup: constification, gratuitous pointer.
Diffstat (limited to 'stm-fmc.h')
-rw-r--r-- | stm-fmc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)); |