EEPROM
Overview
The EEPROM API provides read and write access to Electrically Erasable Programmable Read-Only Memory (EEPROM) devices.
EEPROMs have an erase block size of 1 byte, a long lifetime, and allow overwriting data on byte-by-byte access.
Configuration Options
Related configuration options:
API Reference
- group eeprom_interface
EEPROM Interface.
Typedefs
Functions
-
int eeprom_read(const struct device *dev, off_t offset, void *data, size_t len)
Read data from EEPROM.
- Parameters
dev – EEPROM device
offset – Address offset to read from.
data – Buffer to store read data.
len – Number of bytes to read.
- Returns
0 on success, negative errno code on failure.
-
int eeprom_write(const struct device *dev, off_t offset, const void *data, size_t len)
Write data to EEPROM.
- Parameters
dev – EEPROM device
offset – Address offset to write data to.
data – Buffer with data to write.
len – Number of bytes to write.
- Returns
0 on success, negative errno code on failure.
-
struct eeprom_driver_api
- #include <eeprom.h>
-
int eeprom_read(const struct device *dev, off_t offset, void *data, size_t len)