File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 6666Error : EEPROM start address must be divisble by 8192
6767#endif
6868
69- // By limiting EEPROM size to 1024 bytes, we reduce the amount of SRAM required and
70- // time needed to read/write words into flash. It can be increased
71- // to 2048 if needed
69+ // Operations on psuedo-EEPROM require a read-write-modify cycle on the entire
70+ // configured memory area because flash pages cannot be partially erased. The
71+ // larger the memory area the longer this operation will take. Here are some
72+ // benchmarks:
7273 // 1024 = 19ms update time
7374 // 2048 = 23ms update time
7475 const uint16_t AP3_DEFAULT_FLASH_EEPROM_SIZE = 1024 ; // In bytes
@@ -185,7 +186,7 @@ struct EEPROMClass
185186 }
186187 void setLength (uint16_t length)
187188 {
188- allowedSize = length;
189+ allowedSize = ( length <= AP3_EEPROM_MAX_LENGTH) ? length : AP3_EEPROM_MAX_LENGTH ;
189190 }
190191
191192 // Functionality to 'get' and 'put' objects to and from EEPROM.
You can’t perform that action at this time.
0 commit comments