diff --git a/src/kaleidoscope/driver/storage/AVREEPROM.h b/src/kaleidoscope/driver/storage/AVREEPROM.h index 88585ef8..a91d1d04 100644 --- a/src/kaleidoscope/driver/storage/AVREEPROM.h +++ b/src/kaleidoscope/driver/storage/AVREEPROM.h @@ -56,6 +56,14 @@ class AVREEPROM : public kaleidoscope::driver::storage::Base<_StorageProps> { void update(int idx, uint8_t val) { EEPROM.update(idx, val); } + + bool isSliceUninitialized(uint16_t offset, uint16_t size) { + for (uint16_t o = offset; o < offset + size; o++) { + if (this->read(o) != _StorageProps::uninitialized_byte) + return false; + } + return true; + } }; } // namespace storage diff --git a/src/kaleidoscope/driver/storage/Base.h b/src/kaleidoscope/driver/storage/Base.h index ccf99a33..5f7c76d9 100644 --- a/src/kaleidoscope/driver/storage/Base.h +++ b/src/kaleidoscope/driver/storage/Base.h @@ -50,11 +50,7 @@ class Base { void update(int idx, uint8_t val) {} bool isSliceUninitialized(uint16_t offset, uint16_t size) { - for (uint16_t o = offset; o < offset + size; o++) { - if (read(o) != _StorageProps::uninitialized_byte) - return false; - } - return true; + return false; } const uint16_t length() {