I2C EEPROM library from 24C01 to 24C1025
Dependents: Digitalni_Sat_MG_AN EEROM_1768 EEPROM_kamal EEPROM_MY ... more
EEPROM Class Reference
#include <eeprom.h>
Public Member Functions | |
EEPROM (PinName sda, PinName scl, uint8_t address, TypeEeprom type) | |
Constructor, initialize the eeprom on i2c interface. | |
void | read (uint32_t address, int8_t &data) |
Random read byte. | |
void | read (uint32_t address, int16_t &data) |
Random read short. | |
void | read (uint32_t address, int32_t &data) |
Random read long. | |
void | read (uint32_t address, float &data) |
Random read float. | |
void | read (uint32_t address, void *data, uint32_t size) |
Random read anything. | |
void | read (int8_t &data) |
Current address read byte. | |
void | read (uint32_t address, int8_t *data, uint32_t size) |
Sequential read byte. | |
void | write (uint32_t address, int8_t data) |
Write byte. | |
void | write (uint32_t address, int16_t data) |
Write short. | |
void | write (uint32_t address, int32_t data) |
Write long. | |
void | write (uint32_t address, float data) |
Write float. | |
void | write (uint32_t address, void *data, uint32_t size) |
Write anything (use the page write mode) | |
void | write (uint32_t address, int8_t data[], uint32_t size) |
Write array of bytes (use the page mode) | |
void | ready (void) |
Wait eeprom ready. | |
uint32_t | getSize (void) |
Get eeprom size in bytes. | |
const char * | getName (void) |
Get eeprom name. | |
void | clear (void) |
Clear eeprom (write with 0) | |
uint8_t | getError (void) |
Get the current error number (EEPROM_NoError if no error) | |
std::string | getErrorMessage (void) |
Get current error message. |
Detailed Description
EEPROM Class.
Definition at line 379 of file eeprom.h.
Constructor & Destructor Documentation
EEPROM | ( | PinName | sda, |
PinName | scl, | ||
uint8_t | address, | ||
TypeEeprom | type | ||
) |
Constructor, initialize the eeprom on i2c interface.
EEPROM(PinName sda, PinName scl, uint8_t address, TypeEeprom type) : _i2c(sda, scl)
- Parameters:
-
sda sda i2c pin (PinName) scl scl i2c pin (PinName) address eeprom address, according to eeprom type (uint8_t) type eeprom type (TypeEeprom)
- Returns:
- none
Constructor, initialize the eeprom on i2c interface.
- Parameters:
-
sda sda i2c pin (PinName) scl scl i2c pin (PinName) address eeprom address, according to eeprom type (uint8_t) type eeprom type (TypeEeprom)
- Returns:
- none
Definition at line 45 of file eeprom.cpp.
Member Function Documentation
void clear | ( | void | ) |
Clear eeprom (write with 0)
void clear(void)
- Parameters:
-
none
- Returns:
- none
Clear eeprom (write with 0)
- Parameters:
-
none
- Returns:
- none
Definition at line 882 of file eeprom.cpp.
uint8_t getError | ( | void | ) |
Get the current error number (EEPROM_NoError if no error)
uint8_t getError(void)
- Parameters:
-
none
- Returns:
- none
Get the current error number (EEPROM_NoError if no error)
- Parameters:
-
none
- Returns:
- none
Definition at line 996 of file eeprom.cpp.
std::string getErrorMessage | ( | void | ) |
const char * getName | ( | void | ) |
Get eeprom name.
const char* getName(void)
- Parameters:
-
none
- Returns:
- name (const char*)
Get eeprom name
- Parameters:
-
none
- Returns:
- name (const char*)
Definition at line 943 of file eeprom.cpp.
uint32_t getSize | ( | void | ) |
Get eeprom size in bytes.
uint32_t getSize(void)
- Parameters:
-
none
- Returns:
- size in bytes (uint32_t)
Get eeprom size in bytes
- Parameters:
-
none
- Returns:
- size in bytes (uint32_t)
Definition at line 931 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int8_t * | data, | ||
uint32_t | size | ||
) |
Sequential read byte.
void read(uint32_t address, int8_t *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data bytes array to read (int8_t[]&) size number of bytes to read (uint32_t)
- Returns:
- none
Sequential read byte
- Parameters:
-
address start address (uint32_t) data bytes array to read (int8_t[]&) size number of bytes to read (uint32_t)
- Returns:
- none
Definition at line 661 of file eeprom.cpp.
void read | ( | uint32_t | address, |
float & | data | ||
) |
Random read float.
void read(uint32_t address, float& data)
- Parameters:
-
address start address (uint32_t) data float to read (float&)
- Returns:
- none
Random read float
- Parameters:
-
address start address (uint32_t) data float to read (float&)
- Returns:
- none
Definition at line 817 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int16_t & | data | ||
) |
Random read short.
void read(uint32_t address, int16_t& data)
- Parameters:
-
address start address (uint32_t) data short to read (int16_t&)
- Returns:
- none
Random read short
- Parameters:
-
address start address (uint32_t) data short to read (int16_t&)
- Returns:
- none
Definition at line 761 of file eeprom.cpp.
void read | ( | uint32_t | address, |
void * | data, | ||
uint32_t | size | ||
) |
Random read anything.
void read(uint32_t address, void *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data data to read (void *) size number of bytes to read (uint32_t)
- Returns:
- none
Random read anything
- Parameters:
-
address start address (uint32_t) data data to read (void *) size number of bytes to read (uint32_t)
- Returns:
- none
Definition at line 846 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int8_t & | data | ||
) |
Random read byte.
void read(uint32_t address, int8_t& data)
- Parameters:
-
address start address (uint32_t) data byte to read (int8_t&)
- Returns:
- none
Random read byte
- Parameters:
-
address start address (uint32_t) data byte to read (int8_t&)
- Returns:
- none
Definition at line 594 of file eeprom.cpp.
void read | ( | int8_t & | data ) |
Current address read byte.
void read(int8_t& data)
- Parameters:
-
data byte to read (int8_t&)
- Returns:
- none
Current address read byte
- Parameters:
-
data byte to read (int8_t&)
- Returns:
- none
Definition at line 732 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int32_t & | data | ||
) |
Random read long.
void read(uint32_t address, int32_t& data)
- Parameters:
-
address start address (uint32_t) data long to read (int32_t&)
- Returns:
- none
Random read long
- Parameters:
-
address start address (uint32_t) data long to read (int32_t&)
- Returns:
- none
Definition at line 789 of file eeprom.cpp.
void ready | ( | void | ) |
Wait eeprom ready.
void ready(void)
- Parameters:
-
none
- Returns:
- none
Wait eeprom ready
- Parameters:
-
none
- Returns:
- none
Definition at line 901 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int32_t | data | ||
) |
Write long.
void write(uint32_t address, int32_t data)
- Parameters:
-
address start address (uint32_t) data long to write (int32_t)
- Returns:
- none
Write long
- Parameters:
-
address start address (uint32_t) data long to write (int32_t)
- Returns:
- none
Definition at line 501 of file eeprom.cpp.
void write | ( | uint32_t | address, |
float | data | ||
) |
Write float.
void write(uint32_t address, float data)
- Parameters:
-
address start address (uint32_t) data float to write (float)
- Returns:
- none
Write float
- Parameters:
-
address start address (uint32_t) data float to write (float)
- Returns:
- none
Definition at line 529 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int8_t | data[], | ||
uint32_t | length | ||
) |
Write array of bytes (use the page mode)
void write(uint32_t address, int8_t data[], uint32_t length)
- Parameters:
-
address start address (uint32_t) data bytes array to write (int8_t[]) size number of bytes to write (uint32_t)
- Returns:
- none
Write array of bytes (use the page mode)
- Parameters:
-
address start address (uint32_t) data bytes array to write (int8_t[]) size number of bytes to write (uint32_t)
- Returns:
- none
Definition at line 214 of file eeprom.cpp.
void write | ( | uint32_t | address, |
void * | data, | ||
uint32_t | size | ||
) |
Write anything (use the page write mode)
void write(uint32_t address, void *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data data to write (void *) size number of bytes to write (uint32_t)
- Returns:
- none
Write anything (use the page write mode)
- Parameters:
-
address start address (uint32_t) data data to write (void *) size number of bytes to write (uint32_t)
- Returns:
- none
Definition at line 558 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int16_t | data | ||
) |
Write short.
void write(uint32_t address, int16_t data)
- Parameters:
-
address start address (uint32_t) data short to write (int16_t)
- Returns:
- none
Write short
- Parameters:
-
address start address (uint32_t) data short to write (int16_t)
- Returns:
- none
Definition at line 473 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int8_t | data | ||
) |
Write byte.
void write(uint32_t address, int8_t data)
- Parameters:
-
address start address (uint32_t) data byte to write (int8_t)
- Returns:
- none
Write byte
- Parameters:
-
address start address (uint32_t) data byte to write (int8_t)
- Returns:
- none
Definition at line 146 of file eeprom.cpp.
Generated on Tue Jul 12 2022 23:24:15 by 1.7.2