AceUtils  0.5.0
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
Public Member Functions | List of all members
ace_utils::crc_eeprom::IEepromAdapter Class Referenceabstract

The base EEPROM API used by CrcEeprom class. More...

#include <CrcEeprom.h>

Inheritance diagram for ace_utils::crc_eeprom::IEepromAdapter:
Inheritance graph
[legend]

Public Member Functions

virtual void begin (size_t size)=0
 Initialize the size of the EEPROM space. More...
 
virtual void write (size_t address, uint8_t val)=0
 Write thte byte at address, potentially buffered.
 
virtual uint8_t read (size_t address) const =0
 Return the byte at address.
 
virtual bool commit ()=0
 Flush the buffer if it is used.
 

Detailed Description

The base EEPROM API used by CrcEeprom class.

Different platforms have implemented the EEPROM object in different ways. There are at least 2 different APIs: AVR-flavor (AVR, Teensy, STM32) and ESP-flavor (ESP8266, ESP32). Sometimes, it makes sense to implement both versions, for example, on the STM32 where the default EEPROM is horribly inefficient so a buffered version (See stm32_eeprom in this project) should be used.

Definition at line 24 of file CrcEeprom.h.

Member Function Documentation

◆ begin()

virtual void ace_utils::crc_eeprom::IEepromAdapter::begin ( size_t  size)
pure virtual

Initialize the size of the EEPROM space.

On AVR-flavored EEPROM, this does nothing.

Implemented in ace_utils::crc_eeprom::EspEepromAdapter< E >, and ace_utils::crc_eeprom::AvrEepromAdapter< E >.


The documentation for this class was generated from the following file: