34#ifndef _FREERTOS_DRIVERS_TI_CC32XXEEPROMEMULATION_HXX_
35#define _FREERTOS_DRIVERS_TI_CC32XXEEPROMEMULATION_HXX_
100 void write(
unsigned int index,
const void *buf,
size_t len)
override;
107 void read(
unsigned int index,
void *buf,
size_t len)
override;
118 unsigned sector, uint32_t open_mode,
bool ignore_error =
false);
Emulates EEPROM in SPI-FLASH for the CC32xx platform.
uint8_t isDirty_
non-zero if we have unflushed writes.
void mount()
Must be called exactly once after creation, after the simplelink stack has been started.
uint8_t * data_
Holds the file payload in memory.
int open_file(unsigned sector, uint32_t open_mode, bool ignore_error=false)
Opens a SL file.
~CC32xxEEPROMEmulation()
Destructor.
void flush()
Instructs the driver to write all changed data to disk.
void flush_buffers() OVERRIDE
REQUIRED: lock_ is held.
void write(unsigned int index, const void *buf, size_t len) override
Write to the EEPROM.
void read(unsigned int index, void *buf, size_t len) override
Read from the EEPROM.
static const uint8_t SECTOR_COUNT
The total number of files which we are round-robining.
uint8_t readSector_
The sector number of the last sector we used for reading.
unsigned fileVersion_
This number is increased by one every time the contents are flushed to a file.
Common base class for all EEPROM access.
const char * name
device name
OSMutex lock_
protects internal structures.
Class to allow convenient locking and unlocking of mutexes in a C context.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...