4 Commits
Author SHA1 Message Date
Tomas HübnerandGitHub e0eba70c85 Test cases for I2C_eeprom initialization (#15)
Added test cases for I2C_eeprom initialization to verify that the page size is chosen correctly and that it sets the address size properly.

Fixed a bug with the larger eeprom sizes having incorrect intervals.
2021-01-08 14:46:57 +01:00
Tomas HübnerandGitHub 5bfc57b1d2 Bug fixes and unit tests (#14)
Added unit tests for I2C_eeprom_cyclic_store and fixed a bug in the format() method and a possible bug with the "empty" marker literal being expressed as ~0UL (which isn't necessarily the same size as a uint32_t).
2021-01-07 18:05:51 +01:00
Tomas HübnerandGitHub cd9ea6fb4c Added documentation for I2C_eeprom_cyclic_store (#11)
* Update I2C_eeprom.cpp

Added page sizes for larger memory sizes (still deriving from the ATxxCxxx datasheets)

* Update I2C_eeprom.cpp

* Update I2C_eeprom.cpp

* Added the cyclic store implementation.

* Added an example

* Removed redundant #ifdef in include file.
Added an incude directive for base "I2c_eeprom.h" file to get the Arduino IDE of the Github workflow to compile the file properly.
Added entries to keywords.txt for syntax highlighting the new class and it's members.

* Removed debug code that shouldn't have been left in there.

* Removed reduntant member and changed the type of the _pageSize to 8-bits.

* Changed signature of begin() to match page size data type.

* Made the initialization propagate read failures. Added method to get metrics. Fixed bugs in binary search and wrapping of slot index. Tidied up comments.

* Added the getMetrics() method to keywords.txt for highlighting

* Changed the way getMetrics() works when eeprom is empty.

* Titantompa/readme (#7)

* Added readme for the cyclic store
* Added link from main readme to cyclic store readme.
2021-01-05 10:06:33 +01:00
Tomas HübnerandGitHub 98235dfd82 Addition of a utility class for cycling writes (#8)
I2C_eeprom
*  Added page sizes for larger memory sizes (still deriving from the ATxxCxxx datasheets)

I2C_eeprom_cyclic_store
* Add the cyclic store implementation.
* Add an example for cyclic use of EEPROM.
* Update keywords.txt for syntax highlighting the new class and it's members.
* Changed signature of begin() to match page size data type.
* Add getMetrics() to have an indication about lifetime
2021-01-04 08:33:22 +01:00