The EEPROM stream read/write functions now use eeprom_update_byte() instead of eeprom_write_byte(), so that only changed bytes are written to EEPROM to preserve its lifespan.
Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile parameters to EEPROM to preserve its lifespan.
This commit is contained in:
@@ -308,6 +308,6 @@ void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
|
||||
if (LoggingInterval500MS_SRAM != ReportParams->LogInterval500MS)
|
||||
{
|
||||
LoggingInterval500MS_SRAM = ReportParams->LogInterval500MS;
|
||||
eeprom_write_byte(&LoggingInterval500MS_EEPROM, LoggingInterval500MS_SRAM);
|
||||
eeprom_update_byte(&LoggingInterval500MS_EEPROM, LoggingInterval500MS_SRAM);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user