configuration
This commit is contained in:
parent
4e3f086fa0
commit
39ca9d963b
@ -19,6 +19,6 @@ void eepromRead(uint16_t addr, uint8_t *buf, uint8_t len);
|
||||
void eepromSpiTxCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
t_deviceStats* getGlobalDeviceStats();
|
||||
void eepromReadConfigBlock(uint8_t blockNum, t_configBlock *destConfigBlock);
|
||||
|
||||
void eepromWriteConfigBlock(uint8_t blockNum, t_configBlock *srcConfigBlock);
|
||||
|
||||
#endif /* EEPROM_H_ */
|
||||
|
@ -137,9 +137,9 @@ void eepromReadConfigBlock(uint8_t blockNum, t_configBlock *destConfigBlock) {
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
void eepromWriteConfigBlock(uint8_t blockNum, t_configBlock *srcConfigBlock) {
|
||||
for (uint8_t i = 0; i < (sizeof(*srcConfigBlock) / EEPROM_WRITE_BLOCK_SIZE); i++) {
|
||||
eepromWrite(BLOCK_ADDR[blockNum] + (i * EEPROM_WRITE_BLOCK_SIZE), ((uint8_t*)srcConfigBlock) + (i * EEPROM_WRITE_BLOCK_SIZE), EEPROM_WRITE_BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user