126 const void *data,
size_t len);
int at25xxx_clear(const at25xxx_t *dev, uint32_t pos, size_t len)
Set len bytes from position pos to 0.
int at25xxx_read(const at25xxx_t *dev, uint32_t pos, void *data, size_t len)
Sequentially read len bytes from a given position pos.
int at25xxx_write_page(const at25xxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len)
Sequentially write len bytes to a given page.
int at25xxx_set(const at25xxx_t *dev, uint32_t pos, uint8_t val, size_t len)
Set len bytes from a given position pos to the value val.
int at25xxx_init(at25xxx_t *dev, const at25xxx_params_t *params)
Initialize an AT25XXX device handle with AT25XXX parameters.
int at25xxx_write(const at25xxx_t *dev, uint32_t pos, const void *data, size_t len)
Sequentially write len bytes from a given position pos.
uint8_t at25xxx_read_byte(const at25xxx_t *dev, uint32_t pos)
Read a byte at a given position pos.
void at25xxx_write_byte(const at25xxx_t *dev, uint32_t pos, uint8_t data)
Write a byte at a given position pos.
Low-level GPIO peripheral driver interface definitions.
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Low-level SPI peripheral driver interface definition.
struct holding all params needed for device initialization
spi_cs_t cs_pin
GPIO pin connected to chip select.
spi_clk_t spi_clk
SPI clock speed to use.
uint16_t page_size
Page Size of the EEPROM in bytes.
gpio_t wp_pin
GPIO pin connected to the write-protect pin.
gpio_t hold_pin
GPIO pin connected to the hold pin.
uint32_t size
Size of the EEPROM in bytes.
spi_t spi
SPI bus the device is connected to.
struct that represents an AT25XXX device
at25xxx_params_t params
parameters