Koduino
|
EEPROM library (call with global object EEPROM
)
More...
#include <EEPROM.h>
EEPROM library (call with global object EEPROM
)
This file is part of koduino https://github.com/avikde/koduino
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/.
This class allows storing data / parameters in non-volatile memory that you may not want to hard-code in the source file, e.g. the zero-position for a motor. Note: unlike Arduino, in which each address corresponds to a byte, here each address from 0-31 corresponds to a 32-bit value (convenient for ints and floats).
Public Member Functions | |
uint16_t | read (uint16_t address) |
Read a 16-bit integer from EEPROM. More... | |
void | write (uint16_t address, uint16_t data) |
Store a 16-bit integer in EEPROM. More... | |
uint16_t EEPROMClass::read | ( | uint16_t | address | ) |
Read a 16-bit integer from EEPROM.
address | Address between 0 and 31 |
void EEPROMClass::write | ( | uint16_t | address, |
uint16_t | value | ||
) |
Store a 16-bit integer in EEPROM.
address | Address between 0 and 31 |
value |