Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
EEPROM Interface

EEPROM Interface . More...

Functions

int eeprom_read (const struct device *dev, off_t offset, void *data, size_t len)
 Read data from EEPROM.
 
int eeprom_write (const struct device *dev, off_t offset, const void *data, size_t len)
 Write data to EEPROM.
 
size_t eeprom_get_size (const struct device *dev)
 Get the size of the EEPROM in bytes.
 

Detailed Description

EEPROM Interface .

Since
2.1
Version
1.0.0

Function Documentation

◆ eeprom_get_size()

size_t eeprom_get_size ( const struct device * dev)

#include <zephyr/drivers/eeprom.h>

Get the size of the EEPROM in bytes.

Parameters
devEEPROM device.
Returns
EEPROM size in bytes.

◆ eeprom_read()

int eeprom_read ( const struct device * dev,
off_t offset,
void * data,
size_t len )

#include <zephyr/drivers/eeprom.h>

Read data from EEPROM.

Parameters
devEEPROM device
offsetAddress offset to read from.
dataBuffer to store read data.
lenNumber of bytes to read.
Returns
0 on success, negative errno code on failure.

◆ eeprom_write()

int eeprom_write ( const struct device * dev,
off_t offset,
const void * data,
size_t len )

#include <zephyr/drivers/eeprom.h>

Write data to EEPROM.

Parameters
devEEPROM device
offsetAddress offset to write data to.
dataBuffer with data to write.
lenNumber of bytes to write.
Returns
0 on success, negative errno code on failure.