sparkfun / OpenLCD

An open source serial LCD (HD44780) controller based on the ATmega328.
Other
32 stars 16 forks source link

Updated all references of EEPROM.write to EEPROM.update #18

Closed makinako closed 5 years ago

makinako commented 5 years ago

Patch to reduce unnecessary EEPROM writes by using .update() method, which compares the current value first. The comparatively small cost of the read should be more than made up for by the reduction in writes for the majority of operations. Also since there is currently no way to read the settings back, it reduces writes where application firmware needs to set the OpenLCD to an initial state at reset.

This resolves issue #16 and has been tested using a Serial connection only.

nseidle commented 5 years ago

I had just pulled hardware out to work on this and you've got it done! Thank you so much.