Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
eeprom.h File Reference

Public APIs for the I2C EEPROM Target driver. More...

#include <stddef.h>
#include <sys/types.h>

Go to the source code of this file.

Typedefs

typedef void(* eeprom_target_changed_handler_t) (const struct device *dev, void *user_data)
 Define the application callback handler function signature.

Functions

void eeprom_target_set_changed_callback (const struct device *dev, eeprom_target_changed_handler_t handler, void *user_data)
 Set the EEPROM changed callback handler.
size_t eeprom_target_get_size (const struct device *dev)
 Get size of the virtual EEPROM.
int eeprom_target_read_data (const struct device *dev, off_t offset, void *data, size_t len)
 Read data from the virtual EEPROM.
int eeprom_target_write_data (const struct device *dev, off_t offset, const void *data, size_t len)
 Write data to the virtual EEPROM.
static int eeprom_target_program (const struct device *dev, const uint8_t *eeprom_data, unsigned int length)
 Program memory of the virtual EEPROM.
static int eeprom_target_read (const struct device *dev, uint8_t *eeprom_data, unsigned int offset)
 Read single byte of virtual EEPROM memory.
int eeprom_target_set_addr (const struct device *dev, uint8_t addr)
 Change the address of eeprom target at runtime.

Detailed Description

Public APIs for the I2C EEPROM Target driver.