Cleanup, comment "wired" eeproms
This commit is contained in:
@@ -25,20 +25,25 @@
|
||||
|
||||
#if USE_WIRED_EEPROM
|
||||
|
||||
#include "../shared/eeprom_if.h"
|
||||
/**
|
||||
* PersistentStore for Arduino-style EEPROM interface
|
||||
* with implementations supplied by the framework.
|
||||
*/
|
||||
|
||||
#include "../shared/eeprom_api.h"
|
||||
|
||||
#ifndef EEPROM_SIZE
|
||||
#define EEPROM_SIZE 0x8000 // 32kB
|
||||
#endif
|
||||
|
||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
||||
bool PersistentStore::access_finish() { return true; }
|
||||
|
||||
bool PersistentStore::access_start() {
|
||||
TERN_(SPI_EEPROM, eeprom_init());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PersistentStore::access_finish() { return true; }
|
||||
|
||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||
while (size--) {
|
||||
uint8_t v = *value;
|
||||
@@ -75,7 +80,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
||||
|
||||
#endif // USE_WIRED_EEPROM
|
||||
#endif // TARGET_LPC1768
|
||||
|
Reference in New Issue
Block a user