int at24cxxx_set(const at24cxxx_t *dev, uint32_t pos, uint8_t val, size_t len)
Set len bytes from a given position pos to the value val.
int at24cxxx_erase(const at24cxxx_t *dev)
Set the entire EEPROM memory to AT24CXXX_CLEAR_BYTE.
int at24cxxx_init(at24cxxx_t *dev, const at24cxxx_params_t *params)
Initialize an AT24CXXX device handle with AT24CXXX parameters.
struct at24cxxx_params at24cxxx_params_t
Struct that holds initialization parameters.
unsigned int i2c_t
Default i2c_t type definition.
uint8_t dev_addr
I2C device address.
int at24cxxx_enable_write_protect(const at24cxxx_t *dev)
Enable write protection.
uint8_t page_size
page size
int at24cxxx_clear(const at24cxxx_t *dev, uint32_t pos, size_t len)
Set len bytes from position pos to AT24CXXX_CLEAR_BYTE.
int at24cxxx_disable_write_protect(const at24cxxx_t *dev)
Disable write protection.
gpio_t pin_wp
write protect pin
uint32_t eeprom_size
EEPROM memory capacity.
int at24cxxx_write_byte(const at24cxxx_t *dev, uint32_t pos, uint8_t data)
Write a byte at a given position pos.
int at24cxxx_read(const at24cxxx_t *dev, uint32_t pos, void *data, size_t len)
Sequentially read len bytes from a given position pos.
uint8_t max_polls
number of ACK poll attempts
int at24cxxx_write(const at24cxxx_t *dev, uint32_t pos, const void *data, size_t len)
Sequentially write len bytes from a given position pos.
int at24cxxx_write_page(const at24cxxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len)
Sequentially write len bytes to a given page.
Low-level GPIO peripheral driver interface definitions.
Struct that represents an AT24CXXX device.
at24cxxx_params_t params
parameters
Low-level I2C peripheral driver interface definition.
Struct that holds initialization parameters.
int at24cxxx_read_byte(const at24cxxx_t *dev, uint32_t pos, void *dest)
Read a byte at a given position pos.