From 5da9792cd61b5ba9eed9fb80874edb52081d6232 Mon Sep 17 00:00:00 2001 From: Chris--A Date: Tue, 24 Mar 2015 13:58:01 +1000 Subject: Fixed EEPROM examples and added readme --- libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/EEPROM/examples/eeprom_crc/eeprom_crc.ino') 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; -- cgit v1.2.3-18-g5258