IoAbstraction
Public Member Functions | List of all members
AvrEeprom Class Reference

#include <EepromAbstraction.h>

Inheritance diagram for AvrEeprom:
EepromAbstraction

Public Member Functions

virtual uint8_t read8 (EepromPosition position)
 
virtual void write8 (EepromPosition position, uint8_t val)
 
virtual uint16_t read16 (EepromPosition position)
 
virtual void write16 (EepromPosition position, uint16_t val)
 
virtual uint32_t read32 (EepromPosition position)
 
virtual void write32 (EepromPosition position, uint32_t val)
 
virtual void readIntoMemArray (uint8_t *memDest, EepromPosition romSrc, uint8_t len)
 
virtual void writeArrayToRom (EepromPosition romDest, const uint8_t *memSrc, uint8_t len)
 
- Public Member Functions inherited from EepromAbstraction
virtual bool hasErrorOccurred ()
 

Detailed Description

An implementation of eeprom that uses the standard AVR EEPROM built into most 8 bit chips. This will only write values to eeprom if they have actually changed. Preserving write capacity.

Member Function Documentation

◆ read8()

uint8_t AvrEeprom::read8 ( EepromPosition  position)
virtual

Read an 8 bit (byte) value at a specified position

Parameters
positionaddress at which to read

Implements EepromAbstraction.

◆ write8()

void AvrEeprom::write8 ( EepromPosition  position,
uint8_t  val 
)
virtual

write an 8 bit (byte) value to the specified position

Parameters
positionthe position at which to write
valthe new value

Implements EepromAbstraction.

◆ read16()

uint16_t AvrEeprom::read16 ( EepromPosition  position)
virtual

read a 16 bit value at position at a specified position

Parameters
positionthe position at which to read

Implements EepromAbstraction.

◆ write16()

void AvrEeprom::write16 ( EepromPosition  position,
uint16_t  val 
)
virtual

write a 16 bit value to the specified position

Parameters
positionthe position at which to write
valthe value to read

Implements EepromAbstraction.

◆ read32()

uint32_t AvrEeprom::read32 ( EepromPosition  position)
virtual

read a 32 bit value at a specified position

Parameters
positionthe position at which to read

Implements EepromAbstraction.

◆ write32()

void AvrEeprom::write32 ( EepromPosition  position,
uint32_t  val 
)
virtual

write a 32 bit value to position

Parameters
positionthe position at which to write
valthe value to write out.

Implements EepromAbstraction.

◆ readIntoMemArray()

void AvrEeprom::readIntoMemArray ( uint8_t *  memDest,
EepromPosition  romSrc,
uint8_t  len 
)
virtual

Read an array of bytes from EEPROM into memory

Parameters
memDestthe memory where the EEPROM data should be copied to
romSrcthe source position in EEPROM storage
lenthe length of the array

Implements EepromAbstraction.

◆ writeArrayToRom()

void AvrEeprom::writeArrayToRom ( EepromPosition  romDest,
const uint8_t *  memSrc,
uint8_t  len 
)
virtual

Writes an array of bytes from memory to EEPROM storage

Parameters
romDestthe start position in eeprom storage that the array should be copied to
memSrcthe memory where the rom should be copied from
lenthe length of the array

Implements EepromAbstraction.


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