From 9a7e8ee2977b3ceb8dc9edc3452d5a9ca88c7341 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 27 Nov 2020 16:14:34 +0100 Subject: [PATCH] configuration --- cube/User/Src/eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cube/User/Src/eeprom.c b/cube/User/Src/eeprom.c index c162411..bf26ce9 100644 --- a/cube/User/Src/eeprom.c +++ b/cube/User/Src/eeprom.c @@ -133,13 +133,13 @@ void eepromReadConfigBlock(uint8_t blockNum, t_configBlock *destConfigBlock) { static_assert((sizeof(*destConfigBlock) % EEPROM_WRITE_BLOCK_SIZE == 0), "config block has illegal size, must be dividable by 32"); for (uint8_t i = 0; i < (sizeof(*destConfigBlock) / EEPROM_WRITE_BLOCK_SIZE); i++) { - eepromRead(BLOCK_ADDR[blockNum] + (i * EEPROM_WRITE_BLOCK_SIZE), (uint8_t*) (destConfigBlock + (i * EEPROM_WRITE_BLOCK_SIZE)), EEPROM_WRITE_BLOCK_SIZE); + eepromRead(BLOCK_ADDR[blockNum] + (i * EEPROM_WRITE_BLOCK_SIZE), ((uint8_t*)destConfigBlock) + (i * EEPROM_WRITE_BLOCK_SIZE), EEPROM_WRITE_BLOCK_SIZE); } } void eepromWriteConfigBlock(uint8_t blockNum, t_configBlock *destConfigBlock) { for (uint8_t i = 0; i < (sizeof(*destConfigBlock) / EEPROM_WRITE_BLOCK_SIZE); i++) { - eepromWrite(BLOCK_ADDR[blockNum] + (i * EEPROM_WRITE_BLOCK_SIZE), (uint8_t*) (destConfigBlock + (i * EEPROM_WRITE_BLOCK_SIZE)), EEPROM_WRITE_BLOCK_SIZE); + eepromWrite(BLOCK_ADDR[blockNum] + (i * EEPROM_WRITE_BLOCK_SIZE), ((uint8_t*)destConfigBlock) + (i * EEPROM_WRITE_BLOCK_SIZE), EEPROM_WRITE_BLOCK_SIZE); } }