Skip to content

Commit

Permalink
- Support of more boards
Browse files Browse the repository at this point in the history
- Added documentation for installation
  • Loading branch information
thijse committed Apr 24, 2015
1 parent a85d380 commit 636d658
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 7 deletions.
12 changes: 8 additions & 4 deletions EEPROMex.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,35 @@
#include <inttypes.h>
#include <avr/eeprom.h>

// Boards with ATmega328, Duemilanove, Uno, UnoSMD, Lilypad - 1024 bytes (1 kilobyte)
// Boards with ATmega1280 or 2560, Arduino Mega series – 4096 bytes (4 kilobytes)
// Boards with ATmega168, Lilypad, old Nano, Diecimila – 512 bytes (1/2 kilobyte)

#define EEPROMSizeATmega168 512
#define EEPROMSizeATmega328 1024
#define EEPROMSizeATmega1280 4096
#define EEPROMSizeATmega32u4 1024
#define EEPROMSizeAT90USB1286 4096
#define EEPROMSizeMK20DX128 2048
#define EEPROMSizeMK20DX256 2048
#define EEPROMSizeATSAMD21G18 16384

#define EEPROMSizeUno EEPROMSizeATmega328
#define EEPROMSizeUnoSMD EEPROMSizeATmega328
#define EEPROMSizeLilypad EEPROMSizeATmega328
#define EEPROMSizeDuemilanove EEPROMSizeATmega328
#define EEPROMSizePro EEPROMSizeATmega328
#define EEPROMSizeFio EEPROMSizeATmega328
#define EEPROMSizeMega EEPROMSizeATmega1280
#define EEPROMSizeDiecimila EEPROMSizeATmega168
#define EEPROMSizeNano EEPROMSizeATmega168
#define EEPROMSizeTeensy2 EEPROMSizeATmega32u4
#define EEPROMSizeLeonardo EEPROMSizeATmega32u4
#define EEPROMSizeMicro EEPROMSizeATmega32u4
#define EEPROMSizeEsplora EEPROMSizeATmega32u4
#define EEPROMSizeYun EEPROMSizeATmega32u4
#define EEPROMSizeTre EEPROMSizeATmega32u4
#define EEPROMSizeZero EEPROMSizeATSAMD21G18
#define EEPROMSizeTeensy2pp EEPROMSizeAT90USB1286
#define EEPROMSizeTeensy3 EEPROMSizeMK20DX128

#define EEPROMSizeTeensy31 EEPROMSizeMK20DX256
class EEPROMClassEx
{

Expand Down
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,33 @@ The EEPROMex library is an extension of the standard Arduino EEPROM library. It
* Enabling write limitation: In theory one can burn out a memory cell in a few minutes: a write/erase cycle takes approximately 4 ms, so writing 100.000 times to a single cell takes 6 1/2 min. Limiting the number of writes during the debug phase helps prevent this.
* Debugging of writing out of memory range.

You can download the library here:
[http://thijs.elenbaas.net/downloads/?did=3](http://thijs.elenbaas.net/downloads)


And find detailed explanation and samples of the functionality here:
[http://thijs.elenbaas.net/2012/07/extended-eeprom-library-for-arduino](http://thijs.elenbaas.net/2012/07/extended-eeprom-library-for-arduino)

## Downloading

This package can be downloaded in different manners


- The Arduino Library Manager: [see here how to use it](http://www.arduino.cc/en/guide/libraries#toc3).
- The PlatformIO package manager: [see here how to use it](http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides).
- By directly loading fetching the Archive from GitHub:
1. Go to [https://github.com/thijse/Arduino-EEPROMEx](https://github.com/thijse/Arduino-EEPROMEx)
2. Click the DOWNLOAD ZIP button in the panel on the
3. Rename the uncompressed folder **Arduino-EEPROMEx-master** to **EEPROMEx**.
4. You may need to create the libraries subfolder if its your first library.
5. Place the **EEPROMEx** library folder in your **arduinosketchfolder/libraries/** folder.
5. Restart the IDE.
6. For more information, [read this extended manual](http://thijs.elenbaas.net/2012/07/installing-an-arduino-library/)
- If you want to have a package that includes all referenced libraries, use the pre-packaged library
1. Download the package as a zipfile [here](https://github.com/thijse/Zipballs/blob/master/EEPROMEx/EEPROMEx.zip?raw=true) or as a tarball [here ](https://github.com/thijse/Zipballs/blob/master/EEPROMEx/EEPROMEx.tar.gz?raw=true).
2. Copy the folders inside the **libraries** folder to you your **arduinosketchfolder/libraries/** folder.
3. Restart the IDE.
3. For more information, [read this extended manual](http://thijs.elenbaas.net/2012/07/installing-an-arduino-library/)



### Using different data formats

The aim of the library is to also support other standard data types: it currently implements writing and reading to int, long, float and double.
Expand Down Expand Up @@ -137,3 +158,13 @@ All of the read/write functions make sure the EEPROM is ready to be accessed. Si
```
bool isReady();
```

## On using and modifying libraries

- [http://www.arduino.cc/en/Main/Libraries](http://www.arduino.cc/en/Main/Libraries)
- [http://www.arduino.cc/en/Reference/Libraries](http://www.arduino.cc/en/Reference/Libraries)


## Copyright

EEPROMEx is provided Copyright © 2013,2014,2015 under LGPL License.

0 comments on commit 636d658

Please sign in to comment.