aboutsummaryrefslogtreecommitdiff
path: root/libraries/EEPROM/examples/eeprom_crc
diff options
context:
space:
mode:
authorChris--A <chris@genx.biz>2015-03-24 13:58:01 +1000
committerChris--A <chris@genx.biz>2015-03-24 13:58:01 +1000
commit5da9792cd61b5ba9eed9fb80874edb52081d6232 (patch)
tree13ea73606522e092346c2b9c84020870e8efae72 /libraries/EEPROM/examples/eeprom_crc
parent26577474efcb8874dad687467a8ba2f01678ff4c (diff)
Fixed EEPROM examples and added readme
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;