34#ifndef _FREERTOS_DRIVERS_COMMON_EEPROM_HXX_
35#define _FREERTOS_DRIVERS_COMMON_EEPROM_HXX_
69 virtual void write(
unsigned int index,
const void *buf,
size_t len) = 0;
76 virtual void read(
unsigned int index,
void *buf,
size_t len) = 0;
Common base class for all EEPROM access.
EEPROM()
Default constructor.
off_t lseek(File *file, off_t offset, int whence) OVERRIDE
Seek method.
size_t fileSize
Maximum file size we can grow to.
void enable() OVERRIDE
function to enable device
virtual void read(unsigned int index, void *buf, size_t len)=0
Read from the EEPROM.
void flush_buffers() OVERRIDE
function to disable device
virtual void write(unsigned int index, const void *buf, size_t len)=0
Write to the EEPROM.
EEPROM(const char *name, size_t file_size)
Constructor.
size_t file_size()
Get the maximum file size of the EEPROM file.
int open(File *file, const char *path, int flags, int mode) OVERRIDE
Open a device.
void disable() OVERRIDE
This will be called when reference count goes from non-zero to 0.
const char * name
device name
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.