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