I2C EEPROM library. Split from uRTCLib.
More...
|
|
uint8_t | page_size = 32 |
| | : EEPROM page size control
|
| |
◆ uEEPROMLib() [1/3]
| uEEPROMLib::uEEPROMLib |
( |
const int |
addr | ) |
|
Constructor.
- Parameters
-
| addr | I2C address of EEPROM |
◆ uEEPROMLib() [2/3]
| uEEPROMLib::uEEPROMLib |
( |
bool |
skipInit | ) |
|
Constructor.
- Parameters
-
| skipInit | Set true to skip Wire.init (needed for STM32, SAM and Arduino, at least) |
◆ uEEPROMLib() [3/3]
| uEEPROMLib::uEEPROMLib |
( |
bool |
skipInit, |
|
|
const int |
addr |
|
) |
| |
Constructor.
- Parameters
-
| skipInit | Set true to skip Wire.init (needed for STM32, SAM and Arduino, at least) |
| addr | I2C address of EEPROM |
◆ eeprom_read() [1/3]
| byte uEEPROMLib::eeprom_read |
( |
const unsigned int |
address | ) |
|
Read a byte from EEPROM address.
- Parameters
-
| address | Address inside EEPROM to read from |
- Returns
- Read data
◆ eeprom_read() [2/3]
| bool uEEPROMLib::eeprom_read |
( |
const unsigned int |
address, |
|
|
byte * |
data, |
|
|
unsigned int |
n |
|
) |
| |
Read sequence of n bytes.
Public function, can read any arbitrary data length
- Parameters
-
| address | Address inside EEPROM to read from |
| data | Pointer to where read data to |
| number | of bytes to read |
- Returns
- true if bytes read are the same as requested
◆ eeprom_read() [3/3]
template<typename TR >
| void uEEPROMLib::eeprom_read |
( |
const unsigned int |
address, |
|
|
TR * |
data |
|
) |
| |
Read any datatype from EEPROM address.
- Parameters
-
| address | Address inside EEPROM to read from |
- Returns
- read data (any type)
◆ eeprom_write() [1/4]
| bool uEEPROMLib::eeprom_write |
( |
const unsigned int |
address, |
|
|
char |
data |
|
) |
| |
Write one byte to EEPROM address.
- Parameters
-
| address | Address inside EEPROM to write to |
| data | data to write |
- Returns
- true if successful
◆ eeprom_write() [2/4]
template<typename TW >
| bool uEEPROMLib::eeprom_write |
( |
const unsigned int |
address, |
|
|
const TW |
data |
|
) |
| |
Write any datatype to EEPROM address.
- Parameters
-
◆ eeprom_write() [3/4]
| bool uEEPROMLib::eeprom_write |
( |
const unsigned int |
address, |
|
|
unsigned char |
data |
|
) |
| |
Write one byte to EEPROM address.
- Parameters
-
| address | Address inside EEPROM to write to |
| data | data to write |
- Returns
- true if successful
◆ eeprom_write() [4/4]
| bool uEEPROMLib::eeprom_write |
( |
const unsigned int |
address, |
|
|
void * |
data, |
|
|
const unsigned int |
n = 0 |
|
) |
| |
Write sequence of n bytes.
- Parameters
-
| address | initial addesss to write to |
| data | pointer to data to write (without offset) |
| n | number of bytes to write |
- Returns
- true if successful
◆ set_address()
| void uEEPROMLib::set_address |
( |
const uint8_t |
addr | ) |
|
Sets EEPROM i2c addres.
- Parameters
-
| skipInit | Set true to skip Wire.init (needed for STM32, SAM and Arduino, at least) |
| addr | I2C address of EEPROM |
The documentation for this class was generated from the following files: