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:
Dean Camera 2010-05-26 11:54:55 +00:00
parent bb9fb1051c
commit 670413603f
6 changed files with 23 additions and 10 deletions

View file

@ -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);
}
}