Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bxparks
Copy link
Owner

@bxparks bxparks commented Mar 8, 2021

  • 0.5.0 (2021-03-08)
    • Add unit tests for CrcEeprom using EpoxyPromAvr and EpoxyPromEsp
      libraries from EpoxyDuino.
    • Change default CRC32 calculator to crc32_nibblem for the ESP8266
      only, since it is 2.7X faster than crc32_nibble on the ESP8266 platform.
    • Add an optional contextId to CrcEeprom() constructor. This is an
      application-provided identifier that is stored into EEPROM along with the
      data and its CRC. When the data is read by CrcEeprom::readWithCrc(), the
      contextId must match. This prevents data from a different application
      that happen to have the same length from being marked as valid.
    • Add CrcEeprom::toContextId() helper to generate the contextId.
    • Add CrcEeprom::toSavedSize() to calculate the minimum size to pass to
      CrcEeprom::begin().
    • Add BufferedEEPROM global object for STM32 which implements the
      ESP-flavored API, and uses the "buffered" versions of the low-level EEPROM
      functions.
      • Accessed through #include <AceUtilsStm32BufferedEeprom.h>.
      • The default EEPROM is unbuffered, which means every EEPROM.write()
        operation causes the entire flash page to be wiped and rewritten.
    • Add EspEepromAdapter and AvrEepromAdapter template classes,
      implementing IEepromAdapter interface. These smooth over the API
      differences between the AVR-flavored EEPROM API and the ESP-flavored
      EEPROM API and allow the CrcEeprom class to support both API flavors.
    • Breaking Change: The constructor of CrcEeprom now accepts an
      instance of IEepromAdapter, instead of using the global EEPROM
      object directly.
      • Creating the BufferedEEPROM object for the STM32 meant that there
        can be 2 EEPROM objects active concurrently. So the CrcEeprom
        needs to be told which one to use.
      • Add contextId to the CrcEeprom constructor, defaulting to 0x00.
    • Breaking Change: Rename CrcEeprom::writeWithCrc() and
      readWithCrc() to writeDataWithCrc() and readDataWithCrc().
      • Replace them with signatures which are easier to use:
        • writeWithCrc(size_t address, const T& data)
        • readWithCrc(size_t address, T& data).
      • The compiler compiler automatically figures out the sizeof(T) then
        calls the underlying writeDataWithCrc() and readDataWithCrc().

…st of libraries; new CrcEeprom.cpp is picked up by EpoxyDuino.mk, which then pulls in dependent libraries
…row down interaction with underlying EEPROM to 3 function: write(), read() and commit()
…pter classes; feed IEepromAdapter into CrcEeprom
…s.{h,cpp}; rename BUFFERED_EEPROM to BufferedEEPROM; update demo code
@bxparks bxparks merged commit eb3320f into master Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants