|
@@ -27,7 +27,7 @@
|
27
|
27
|
bool PersistentStore::access_start() { return true; }
|
28
|
28
|
bool PersistentStore::access_finish() { return true; }
|
29
|
29
|
|
30
|
|
-bool PersistentStore::write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
|
|
30
|
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
31
|
31
|
while (size--) {
|
32
|
32
|
uint8_t * const p = (uint8_t * const)pos;
|
33
|
33
|
uint8_t v = *value;
|
|
@@ -47,7 +47,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, uint16_t size,
|
47
|
47
|
return false;
|
48
|
48
|
}
|
49
|
49
|
|
50
|
|
-bool PersistentStore::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
|
|
50
|
+bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
51
|
51
|
do {
|
52
|
52
|
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
53
|
53
|
if (writing) *value = c;
|