aboutsummaryrefslogtreecommitdiff
path: root/libraries/EEPROM/examples/eeprom_crc
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_crc')
-rw-r--r--libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino b/libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino
index 40b08bd..a4baacc 100644
--- a/libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino
+++ b/libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino
@@ -38,7 +38,7 @@ unsigned long eeprom_crc( void ){
unsigned long crc = ~0L;
- for( int index = 0 ; index < 32 ; ++index ){
+ for( int index = 0 ; index < EEPROM.length() ; ++index ){
crc = crc_table[( crc ^ EEPROM[index] ) & 0x0f] ^ (crc >> 4);
crc = crc_table[( crc ^ ( EEPROM[index] >> 4 )) & 0x0f] ^ (crc >> 4);
crc = ~crc;