Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
I2C EEPROM Slave Driver API

I2C EEPROM Slave Driver API. More...

Functions

int eeprom_slave_program (const struct device *dev, const uint8_t *eeprom_data, unsigned int length)
 Program memory of the virtual EEPROM. More...
 
int eeprom_slave_read (const struct device *dev, uint8_t *eeprom_data, unsigned int offset)
 Read single byte of virtual EEPROM memory. More...
 

Detailed Description

I2C EEPROM Slave Driver API.

Function Documentation

◆ eeprom_slave_program()

int eeprom_slave_program ( const struct device dev,
const uint8_t eeprom_data,
unsigned int  length 
)

#include <include/drivers/i2c/slave/eeprom.h>

Program memory of the virtual EEPROM.

Parameters
devPointer to the device structure for the driver instance.
eeprom_dataPointer of data to program into the virtual eeprom memory
lengthLength of data to program into the virtual eeprom memory
Return values
0If successful.
-EINVALInvalid data size

◆ eeprom_slave_read()

int eeprom_slave_read ( const struct device dev,
uint8_t eeprom_data,
unsigned int  offset 
)

#include <include/drivers/i2c/slave/eeprom.h>

Read single byte of virtual EEPROM memory.

Parameters
devPointer to the device structure for the driver instance.
eeprom_dataPointer of byte where to store the virtual eeprom memory
offsetOffset into EEPROM memory where to read the byte
Return values
0If successful.
-EINVALInvalid data pointer or offset