This module provides “gentle” EEPROM writing routines to help extend the life of the on-chip EEPROM. Before each EEPROM data byte is written, these functions read the byte from the EEPROM and only write the new byte if the values are different.
To use the EEPROM writing functions, use this:
#include <eeprom-gentle.h>
Writes a single byte val to EEPROM address addr, but only if the byte in the EEPROM is different.
Writes the bytes of a single 16 bit word val to EEPROM address addr, but only the bytes that are different than what is currently found in the EEPROM.
Writes the bytes of a single 32 bit word val to EEPROM address addr, but only the bytes that are different than what is currently found in the EEPROM.
Writes n bytes of the block pointed to by buf to EEPROM address addr, but only the bytes that are different than what is currently found in the EEPROM.