Can I suggest you add something like this to the documentation: “The firmware will delay performing the erase until it’s absolutely necessary. However, because the erase stalls the MCU for a few hundred milliseconds, the following two API methods allow applications to check whether an erase is necessary in the future, and perform it at a time that is most convenience for the application.”
On second thought, this doesn’t give me any indication just how urgent it is to perform the erase. If I happily write into EEPROM once per hour/minute/whatever, hasPendingErase() will turn true at some point (how quickly?) Then it will stay true, and if I don’t do anything, the firmware will perform the erase at some point. Should I manually perform the erase as soon as it turns true, or wait for … how long? Some kind of level indicator would be useful, so I can say my app will run erase manually as soon as it hits 80% or such.
On third thought – sorry, I’m a little slow today, that must be from yesterday’s Christmas food – it seems I can provide that level indicator myself if I count my writes times size and compare with 2*EEPROM.length(). Right?