File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class bondStoreCBs : public FCStoreCallbacks {
4343};
4444
4545static bondStoreCBs _callbacks;
46- static FCStore bondStore (&_callbacks , 1024 );
46+ static FCStore bondStore (&_callbacks , flash_get_page_size() );
4747
4848int ble_bond_nvs_save_entry (uint32_t id, char *value) {
4949 if (!bondStore.write (id, (uint8_t *)value, strlen (value) + 1 )) {
Original file line number Diff line number Diff line change 2727#include < FC_Store.h>
2828#include < type_traits>
2929
30- #ifndef EEPROM_SIZE_BYTES
31- #define EEPROM_SIZE_BYTES 4096
32- #endif
33-
3430class EEPROMStoreCBs : public FCStoreCallbacks {
3531 uint32_t getPageSize () {
3632 return flash_get_page_size ();
3733 }
3834 uint32_t getStoreBeginPage () {
39- return flash_get_store_page (EEPROM_SIZE_BYTES * 2 );
35+ return flash_get_store_page (flash_get_page_size () * 2 );
4036 }
4137 void flashWriteWord (uint32_t address, uint32_t value) {
4238 flash_write_word (address, value);
@@ -54,7 +50,7 @@ class EEPROMClass {
5450 FCStore _store;
5551
5652 public:
57- EEPROMClass (): _store(&_eepCBs, EEPROM_SIZE_BYTES ){}
53+ EEPROMClass (): _store(&_eepCBs, flash_get_page_size() ){}
5854
5955 void begin () { _store.begin ();}
6056
You can’t perform that action at this time.
0 commit comments