From b5a130afb51c971fd7ceca8834b6055f1eada253 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 6 Jul 2015 15:18:33 +0200 Subject: Examples: mass code format. See example_formatter.conf --- .../EEPROM/examples/eeprom_clear/eeprom_clear.ino | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino') diff --git a/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino index 49eb5fe..73d64a7 100644 --- a/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino +++ b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino @@ -10,26 +10,28 @@ #include -void setup() -{ +void setup() { /*** - Iterate through each byte of the EEPROM storage. - + Iterate through each byte of the EEPROM storage. + Larger AVR processors have larger EEPROM sizes, E.g: - Arduno Duemilanove: 512b EEPROM storage. - Arduino Uno: 1kb EEPROM storage. - Arduino Mega: 4kb EEPROM storage. - + Rather than hard-coding the length, you should use the pre-provided length function. - This will make your code portable to all AVR processors. + This will make your code portable to all AVR processors. ***/ - - for ( int i = 0 ; i < EEPROM.length() ; i++ ) + + for (int i = 0 ; i < EEPROM.length() ; i++) { EEPROM.write(i, 0); + } // turn the LED on when we're done digitalWrite(13, HIGH); } -void loop(){ /** Empty loop. **/ } +void loop() { + /** Empty loop. **/ +} -- cgit v1.2.3-18-g5258