diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2015-07-06 15:18:33 +0200 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2015-07-06 15:19:05 +0200 |
commit | b5a130afb51c971fd7ceca8834b6055f1eada253 (patch) | |
tree | d1e964f67822e9b3f10382573a9579c85b9c3e3f /libraries/EEPROM/examples/eeprom_clear | |
parent | c13cf02651e178ea7941a82bee364d82c6b19b9c (diff) |
Examples: mass code format. See example_formatter.conf
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_clear')
-rw-r--r-- | libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino | 20 |
1 files changed, 11 insertions, 9 deletions
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 <EEPROM.h> -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. **/ +} |