File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 66
66
Error : EEPROM start address must be divisble by 8192
67
67
#endif
68
68
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:
72
73
// 1024 = 19ms update time
73
74
// 2048 = 23ms update time
74
75
const uint16_t AP3_DEFAULT_FLASH_EEPROM_SIZE = 1024 ; // In bytes
@@ -185,7 +186,7 @@ struct EEPROMClass
185
186
}
186
187
void setLength (uint16_t length)
187
188
{
188
- allowedSize = length;
189
+ allowedSize = ( length <= AP3_EEPROM_MAX_LENGTH) ? length : AP3_EEPROM_MAX_LENGTH ;
189
190
}
190
191
191
192
// Functionality to 'get' and 'put' objects to and from EEPROM.
You can’t perform that action at this time.
0 commit comments